From 499d68cbb7678296a1d59adc4192606c55f05be4 Mon Sep 17 00:00:00 2001 From: Littlegnal <8847263+littleGnAl@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:54:28 +0800 Subject: [PATCH] feat: Upgrade native sdk 4.3.0 (#1462) --- .github/workflows/build.yml | 55 +- README.md | 4 +- android/build.gradle | 8 +- .../third_party/include/agora_rtc/AgoraBase.h | 609 ++-- .../include/agora_rtc/AgoraMediaBase.h | 102 +- .../include/agora_rtc/AgoraMediaPlayerTypes.h | 109 +- .../include/agora_rtc/IAgoraH265Transcoder.h | 8 +- .../third_party/include/agora_rtc/IAgoraLog.h | 4 +- .../include/agora_rtc/IAgoraMediaEngine.h | 11 +- .../include/agora_rtc/IAgoraMediaPlayer.h | 39 +- .../agora_rtc/IAgoraMediaPlayerSource.h | 74 +- .../include/agora_rtc/IAgoraMediaRecorder.h | 4 +- .../agora_rtc/IAgoraMusicContentCenter.h | 50 +- .../include/agora_rtc/IAgoraParameter.h | 5 +- .../include/agora_rtc/IAgoraRhythmPlayer.h | 14 +- .../include/agora_rtc/IAgoraRtcEngine.h | 1057 +++--- .../include/agora_rtc/IAgoraRtcEngineEx.h | 97 +- .../include/agora_rtc/IAgoraSpatialAudio.h | 202 +- .../cpp/third_party/include/iris/iris_base.h | 9 +- .../include/iris/iris_engine_base.h | 6 +- .../include/iris/iris_media_base_cxx.h | 9 - .../third_party/include/iris/iris_module.h | 14 +- .../third_party/include/iris/iris_platform.h | 8 - .../cpp/third_party/include/iris/iris_queue.h | 69 - .../include/iris/iris_rtc_api_type.h | 937 ------ .../third_party/include/iris/iris_rtc_base.h | 13 - .../third_party/include/iris/iris_rtc_c_api.h | 14 +- .../include/iris/iris_rtc_engine.h | 33 - .../iris/iris_rtc_high_performance_c_api.h | 6 +- .../include/iris/iris_rtc_rendering_c.h | 4 +- .../include/iris/iris_rtc_rendering_cxx.h | 2 +- ci/rendering_test_android.sh | 2 + ci/run_flutter_macos_integration_test.sh | 1 + ci/setup-crash-dumps.ps1 | 16 + .../agora_rtc_flutter_example/MainActivity.kt | 31 + .../VideoRawDataController.kt | 102 + example/ios/Runner.xcodeproj/project.pbxproj | 6 + example/ios/Runner/AppDelegate.m | 43 + example/ios/Runner/VideoRawDataController.h | 12 + example/ios/Runner/VideoRawDataController.m | 50 + .../channel_media_relay.dart | 2 +- example/lib/examples/advanced/index.dart | 2 +- .../advanced/media_player/media_player.dart | 9 +- .../media_recorder/media_recorder.dart | 2 +- .../advanced/music_player/music_player.dart | 16 +- .../process_video_raw_data.dart | 25 +- .../rtmp_streaming/rtmp_streaming.dart | 2 +- .../screen_sharing/screen_sharing.dart | 8 +- .../send_multi_video_stream.dart | 7 +- .../spatial_audio_with_media_player.dart | 7 +- .../start_local_video_transcoder.dart | 22 +- .../stream_message/stream_message.dart | 3 +- example/web/index.html | 2 +- ios/agora_rtc_engine.podspec | 4 +- lib/agora_rtc_engine.dart | 1 + lib/src/agora_base.dart | 543 +-- lib/src/agora_base.g.dart | 260 +- lib/src/agora_h265_transcoder.dart | 108 + lib/src/agora_h265_transcoder.g.dart | 24 + lib/src/agora_log.dart | 4 +- lib/src/agora_media_base.dart | 88 +- lib/src/agora_media_base.g.dart | 25 +- lib/src/agora_media_engine.dart | 18 +- lib/src/agora_media_player.dart | 72 +- lib/src/agora_media_player_source.dart | 27 +- lib/src/agora_media_player_types.dart | 124 +- lib/src/agora_media_player_types.g.dart | 83 +- lib/src/agora_music_content_center.dart | 72 +- lib/src/agora_music_content_center.g.dart | 30 +- lib/src/agora_rhythm_player.dart | 20 +- lib/src/agora_rhythm_player.g.dart | 12 +- lib/src/agora_rtc_engine.dart | 806 ++--- lib/src/agora_rtc_engine.g.dart | 16 +- lib/src/agora_rtc_engine_ex.dart | 101 +- lib/src/agora_rtc_engine_ext.dart | 8 +- lib/src/agora_spatial_audio.dart | 242 +- lib/src/audio_device_manager.dart | 57 +- lib/src/binding/agora_base_event_impl.dart | 8 +- .../agora_h265_transcoder_event_impl.dart | 90 + .../binding/agora_h265_transcoder_impl.dart | 119 + .../binding/agora_media_base_event_impl.dart | 40 +- lib/src/binding/agora_media_base_impl.dart | 39 + lib/src/binding/agora_media_engine_impl.dart | 28 +- .../agora_media_player_event_impl.dart | 2 +- lib/src/binding/agora_media_player_impl.dart | 126 +- .../agora_media_player_source_event_impl.dart | 64 +- .../binding/agora_media_recorder_impl.dart | 6 +- ...agora_music_content_center_event_impl.dart | 46 +- .../agora_music_content_center_impl.dart | 50 +- .../binding/agora_rtc_engine_event_impl.dart | 514 +-- lib/src/binding/agora_rtc_engine_ex_impl.dart | 171 +- lib/src/binding/agora_rtc_engine_impl.dart | 774 ++--- lib/src/binding/agora_spatial_audio_impl.dart | 288 +- .../binding/audio_device_manager_impl.dart | 46 +- .../call_api_event_handler_buffer_ext.dart | 50 +- .../binding/call_api_impl_params_json.dart | 2 +- lib/src/binding/event_handler_param_json.dart | 561 ++-- .../binding/event_handler_param_json.g.dart | 670 ++-- lib/src/binding/impl_forward_export.dart | 3 + lib/src/binding_forward_export.dart | 2 + .../agora_h265_transcoder_impl_override.dart | 44 + .../agora_media_engine_impl_override.dart | 16 +- .../agora_media_recorder_impl_override.dart | 6 +- ...ra_music_content_center_impl_override.dart | 19 +- lib/src/impl/agora_rtc_engine_impl.dart | 197 +- .../agora_spatial_audio_impl_override.dart | 2 +- lib/src/impl/audio_device_manager_impl.dart | 4 +- lib/src/impl/json_converters.dart | 53 + lib/src/impl/json_converters.g.dart | 29 + .../impl/media_player_controller_impl.dart | 8 + lib/src/impl/media_player_impl.dart | 40 +- ...tive_iris_api_engine_binding_delegate.dart | 13 +- macos/agora_rtc_engine.podspec | 4 +- pubspec.yaml | 4 +- scripts/artifacts_version.sh | 8 +- scripts/build-iris-android.sh | 2 +- scripts/build-iris-macos.sh | 13 +- scripts/code_gen.sh | 2 + scripts/iris_web_version.js | 4 +- test/agora_media_base_test.dart | 25 + test_shard/fake_test_app/android/build.gradle | 2 +- .../integration_test/apis_call_fake_test.dart | 13 +- .../eventhandlers_fake_test.dart | 38 +- ...udiodevicemanager_fake_test.generated.dart | 179 +- ...patialaudioengine_fake_test.generated.dart | 430 --- .../generated/event_ids_mapping_gen.dart | 519 +++ .../h265transcoder_fake_test.generated.dart | 221 ++ ...ranscoderobserver_testcases.generated.dart | 216 ++ ...patialaudioengine_fake_test.generated.dart | 524 ++- ...udioframeobserver_testcases.generated.dart | 28 +- .../mediaengine_fake_test.generated.dart | 98 +- ...odedframeobserver_testcases.generated.dart | 30 +- ...ideoframeobserver_testcases.generated.dart | 114 +- ...audiopcmframesink_testcases.generated.dart | 21 +- ...ospectrumobserver_testcases.generated.dart | 45 +- .../mediaplayer_fake_test.generated.dart | 351 +- ...yersourceobserver_testcases.generated.dart | 416 ++- ...ideoframeobserver_testcases.generated.dart | 26 +- .../mediarecorder_fake_test.generated.dart | 18 +- ...arecorderobserver_testcases.generated.dart | 52 +- ...usiccontentcenter_fake_test.generated.dart | 92 +- ...entereventhandler_testcases.generated.dart | 160 +- ...odedframeobserver_testcases.generated.dart | 70 +- ...ospectrumobserver_testcases.generated.dart | 45 +- .../rtcengine_fake_test.generated.dart | 1893 +++++++---- ..._metadataobserver_testcases.generated.dart | 24 +- ...ngineeventhandler_testcases.generated.dart | 2900 ++++++++--------- .../rtcengineex_fake_test.generated.dart | 289 +- ...ideodevicemanager_fake_test.generated.dart | 45 +- .../testcases/event_ids_mapping.dart | 8 + .../localspatialaudioengine_testcases.dart | 100 - .../testcases/rtcengine_debug_testcases.dart | 3 - ...ngine_rtcengineeventhandler_testcases.dart | 27 +- .../testcases/rtcengine_testcases.dart | 111 +- .../testcases/rtcengineex_testcases.dart | 127 +- test_shard/fake_test_app/macos/Podfile | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 11 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- ...ayercachemanager_smoke_test.generated.dart | 90 +- .../testcases/agora_video_view_testcases.dart | 2 +- .../fake_agora_video_view_testcases.dart | 24 +- .../mediaplayer_smoke_test_testcases.dart | 6 +- .../mediarecorder_fake_test_testcases.dart | 41 +- .../lib/fake_remote_user.dart | 2 +- test_shard/integration_test_app/macos/Podfile | 11 +- .../macos/Runner.xcodeproj/project.pbxproj | 11 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../src/platform/io/iris_tester_bindings.dart | 12 + .../lib/src/platform/io/iris_tester_io.dart | 4 +- .../agora_video_view_render_test.dart | 5 - .../agora_video_view_smoke_test.dart | 1 - .../common/fake_camera_local_video_view.dart | 1 + .../integration_test/local_video_view.dart | 2 +- .../integration_test/remote_video_view.dart | 2 +- test_shard/rendering_test/pubspec.yaml | 1 + tool/terra/.gitignore | 3 +- tool/terra/.yarnrc.yml | 1 - tool/terra/build.sh | 15 +- tool/terra/configs/cud_node_parser.config.ts | 441 +++ tool/terra/configs/merge_node_list.ts | 13 + tool/terra/legacy_terra_config.yaml | 37 + tool/terra/package.json | 5 +- tool/terra/parsers/cud_node_parser.ts | 199 ++ tool/terra/parsers/dart_syntax_parser.ts | 216 ++ tool/terra/parsers/iris_api_id_parser.ts | 53 + .../merge_rtc_engine_event_handler_parser.ts | 71 + tool/terra/prepare.sh | 16 + .../renderers/event_handlers_renderer.ts | 233 ++ .../renderers/event_ids_mapping_renderer.ts | 85 + .../renderers/forward_export_renderer.ts | 70 + tool/terra/renderers/utils.ts | 18 + tool/terra/terra_config_main.yaml | 58 +- tool/terra/yarn.lock | 1023 +++--- .../bin/event_handler_gen_config.dart | 109 +- .../bin/method_call_gen_config.dart | 32 +- tool/testcase_gen/bin/testcase_gen.dart | 1 + tool/testcase_gen/lib/default_generator.dart | 122 +- .../testcase_gen/lib/templated_generator.dart | 46 +- windows/CMakeLists.txt | 4 +- 199 files changed, 13313 insertions(+), 9908 deletions(-) delete mode 100644 android/src/main/cpp/third_party/include/iris/iris_media_base_cxx.h delete mode 100644 android/src/main/cpp/third_party/include/iris/iris_queue.h delete mode 100644 android/src/main/cpp/third_party/include/iris/iris_rtc_api_type.h delete mode 100644 android/src/main/cpp/third_party/include/iris/iris_rtc_base.h delete mode 100644 android/src/main/cpp/third_party/include/iris/iris_rtc_engine.h create mode 100644 ci/setup-crash-dumps.ps1 create mode 100644 example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/VideoRawDataController.kt create mode 100644 example/ios/Runner/VideoRawDataController.h create mode 100644 example/ios/Runner/VideoRawDataController.m create mode 100644 lib/src/agora_h265_transcoder.dart create mode 100644 lib/src/agora_h265_transcoder.g.dart create mode 100644 lib/src/binding/agora_h265_transcoder_event_impl.dart create mode 100644 lib/src/binding/agora_h265_transcoder_impl.dart create mode 100644 lib/src/binding/agora_media_base_impl.dart create mode 100644 lib/src/impl/agora_h265_transcoder_impl_override.dart create mode 100644 lib/src/impl/json_converters.dart create mode 100644 lib/src/impl/json_converters.g.dart create mode 100644 test/agora_media_base_test.dart delete mode 100644 test_shard/fake_test_app/integration_test/generated/basespatialaudioengine_fake_test.generated.dart create mode 100644 test_shard/fake_test_app/integration_test/generated/event_ids_mapping_gen.dart create mode 100644 test_shard/fake_test_app/integration_test/generated/h265transcoder_fake_test.generated.dart create mode 100644 test_shard/fake_test_app/integration_test/generated/h265transcoder_h265transcoderobserver_testcases.generated.dart create mode 100644 test_shard/fake_test_app/integration_test/testcases/event_ids_mapping.dart delete mode 100644 tool/terra/.yarnrc.yml create mode 100644 tool/terra/configs/cud_node_parser.config.ts create mode 100644 tool/terra/configs/merge_node_list.ts create mode 100644 tool/terra/legacy_terra_config.yaml create mode 100644 tool/terra/parsers/cud_node_parser.ts create mode 100644 tool/terra/parsers/dart_syntax_parser.ts create mode 100644 tool/terra/parsers/iris_api_id_parser.ts create mode 100644 tool/terra/parsers/merge_rtc_engine_event_handler_parser.ts create mode 100644 tool/terra/prepare.sh create mode 100644 tool/terra/renderers/event_handlers_renderer.ts create mode 100644 tool/terra/renderers/event_ids_mapping_renderer.ts create mode 100644 tool/terra/renderers/forward_export_renderer.ts create mode 100644 tool/terra/renderers/utils.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90bef35f1..9049d418c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,18 @@ jobs: echo Pub Score too low. exit 1 fi + + flutter_ut: + name: Flutter unit test + if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + - run: flutter test + attach_docs: name: Attach dartdoc runs-on: ubuntu-latest @@ -137,6 +149,32 @@ jobs: cache: true - run: flutter config --enable-macos-desktop - run: bash ci/run_flutter_macos_integration_test.sh + - name: Get iris logs macos + if: always() + run: | + sleep 30 + + mkdir iris-logs-macos + if [ -f "${HOME}/Library/Containers/com.example.fakeTestApp/Data/Library/agora-iris.log" ]; then + cp -RP ${HOME}/Library/Containers/com.example.fakeTestApp/Data/Library/agora-iris.log ./iris-logs-macos/agora-iris-fake-test.log + fi + if [ -f "${HOME}/Library/Containers/com.example.integrationTestApp/Data/Library/agora-iris.log" ]; then + cp -RP ${HOME}/Library/Containers/com.example.integrationTestApp/Data/Library/agora-iris.log ./iris-logs-macos/agora-iris-integration-test.log + fi + + CRASH_DIR="${HOME}/Library/Logs/DiagnosticReports/" + OUTPUT_CRASH_DIR=./iris-logs-macos/crash + mkdir -p ${OUTPUT_CRASH_DIR} + + # Copy all files + cp -RP $CRASH_DIR* $OUTPUT_CRASH_DIR + + - name: Upload iris logs macos + uses: actions/upload-artifact@v4 + if: always() + with: + name: iris-logs-macos-${{ matrix.version }} + path: iris-logs-macos/* integration_test_windows: name: Run Flutter Windows Integration Tests @@ -154,12 +192,22 @@ jobs: with: flutter-version: ${{ matrix.version }} cache: true + - name: Set up crash dump environment + run: .\ci\setup-crash-dumps.ps1 + shell: powershell - run: flutter config --enable-windows-desktop - name: Run windows integration test shell: bash run: | bash ci/run_flutter_windows_integration_test.sh + - name: Upload crash dumps if exist + uses: actions/upload-artifact@v4 + if: always() + with: + name: windows-crash-dumps-${{ matrix.version }} + path: ./CrashDumps/* + integration_test_web: name: Run Flutter Web Integration Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} @@ -435,7 +483,10 @@ jobs: --flutter-package-name=agora_rtc_engine \ --iris-macos-cdn-url=${IRIS_CDN_URL_MACOS} - run: flutter config --enable-macos-desktop - - run: bash ci/rendering_test_macos.sh + - name: Run macos rendering test + run: | + export SAVE_DEBUG_GOLDEN="true" + bash ci/rendering_test_macos.sh rendering_test_windows: name: Run Flutter Windows Rendering Tests @@ -482,6 +533,8 @@ jobs: - name: Run windows integration test shell: bash run: | + export SAVE_DEBUG_GOLDEN="true" + bash ci/rendering_test_windows.sh rendering_test_web: diff --git a/README.md b/README.md index e1a08ea0c..ced8307ae 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Download the `iris_web`(see the link below) artifact and include it as a ` ``` -Download: https://download.agora.io/staging/iris-web-rtc_n423_w4182_0.3.0.js +Download: https://download.agora.io/staging/iris-web-rtc_n430_w4182_0.5.0.js **For Testing Purposes** @@ -101,7 +101,7 @@ You can directly depend on the Agora CDN for testing purposes: ... ... - + ``` diff --git a/android/build.gradle b/android/build.gradle index cd3c74b3e..189d0fe5f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -55,11 +55,11 @@ android { dependencies { if (isDev(project)) { - implementation fileTree(dir: "libs", include: ["*.jar"]) + api fileTree(dir: "libs", include: ["*.jar"]) } else { - api 'io.agora.rtc:iris-rtc:4.2.6-build.3' - api 'io.agora.rtc:full-sdk:4.2.6' - api 'io.agora.rtc:full-screen-sharing:4.2.6' + api 'io.agora.rtc:iris-rtc:4.3.0-build.2' + api 'io.agora.rtc:full-sdk:4.3.0' + api 'io.agora.rtc:full-screen-sharing:4.3.0' } } diff --git a/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h b/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h index 81580b034..ed9308d1a 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h @@ -33,8 +33,10 @@ #if defined(AGORARTC_EXPORT) #define AGORA_API extern "C" __declspec(dllexport) +#define AGORA_CPP_API __declspec(dllexport) #else #define AGORA_API extern "C" __declspec(dllimport) +#define AGORA_CPP_API __declspec(dllimport) #endif // AGORARTC_EXPORT #define AGORA_CALL __cdecl @@ -46,11 +48,13 @@ #include #define AGORA_API extern "C" __attribute__((visibility("default"))) +#define AGORA_CPP_API __attribute__((visibility("default"))) #define AGORA_CALL #elif defined(__ANDROID__) || defined(__linux__) #define AGORA_API extern "C" __attribute__((visibility("default"))) +#define AGORA_CPP_API __attribute__((visibility("default"))) #define AGORA_CALL #define __deprecated @@ -58,6 +62,7 @@ #else // !_WIN32 && !__APPLE__ && !(__ANDROID__ || __linux__) #define AGORA_API extern "C" +#define AGORA_CPP_API #define AGORA_CALL #define __deprecated @@ -80,7 +85,7 @@ #endif #endif -#define INVALID_DISPLAY_ID 0xffff +#define INVALID_DISPLAY_ID (-2) namespace agora { namespace util { @@ -92,16 +97,16 @@ class AutoPtr { typedef T* pointer_type; public: - explicit AutoPtr(pointer_type p = NULL) : ptr_(p) {} + explicit AutoPtr(pointer_type p = OPTIONAL_NULLPTR) : ptr_(p) {} ~AutoPtr() { if (ptr_) { ptr_->release(); - ptr_ = NULL; + ptr_ = OPTIONAL_NULLPTR; } } - operator bool() const { return (ptr_ != NULL); } + operator bool() const { return (ptr_ != OPTIONAL_NULLPTR); } value_type& operator*() const { return *get(); } @@ -115,7 +120,7 @@ class AutoPtr { return ret; } - void reset(pointer_type ptr = NULL) { + void reset(pointer_type ptr = OPTIONAL_NULLPTR) { if (ptr != ptr_ && ptr_) { ptr_->release(); } @@ -125,12 +130,12 @@ class AutoPtr { template bool queryInterface(C1* c, C2 iid) { - pointer_type p = NULL; + pointer_type p = OPTIONAL_NULLPTR; if (c && !c->queryInterface(iid, reinterpret_cast(&p))) { reset(p); } - return (p != NULL); + return (p != OPTIONAL_NULLPTR); } private: @@ -153,7 +158,7 @@ class CopyableAutoPtr : public AutoPtr { return *this; } pointer_type clone() const { - if (!this->get()) return NULL; + if (!this->get()) return OPTIONAL_NULLPTR; return this->get()->clone(); } }; @@ -197,7 +202,7 @@ class AOutputIterator { typedef const value_type& const_reference; typedef value_type* pointer; typedef const value_type* const_pointer; - explicit AOutputIterator(IIterator* it = NULL) : p(it) {} + explicit AOutputIterator(IIterator* it = OPTIONAL_NULLPTR) : p(it) {} ~AOutputIterator() { if (p) p->release(); } @@ -215,7 +220,7 @@ class AOutputIterator { bool operator!=(const AOutputIterator& rhs) const { return !this->operator==(rhs); } reference operator*() { return *reinterpret_cast(p->current()); } const_reference operator*() const { return *reinterpret_cast(p->const_current()); } - bool valid() const { return p && p->current() != NULL; } + bool valid() const { return p && p->current() != OPTIONAL_NULLPTR; } }; template @@ -234,16 +239,16 @@ class AList { typedef const AOutputIterator const_iterator; public: - AList() : container(NULL), owner(false) {} + AList() : container(OPTIONAL_NULLPTR), owner(false) {} AList(IContainer* c, bool take_ownership) : container(c), owner(take_ownership) {} ~AList() { reset(); } - void reset(IContainer* c = NULL, bool take_ownership = false) { + void reset(IContainer* c = OPTIONAL_NULLPTR, bool take_ownership = false) { if (owner && container) container->release(); container = c; owner = take_ownership; } - iterator begin() { return container ? iterator(container->begin()) : iterator(NULL); } - iterator end() { return iterator(NULL); } + iterator begin() { return container ? iterator(container->begin()) : iterator(OPTIONAL_NULLPTR); } + iterator end() { return iterator(OPTIONAL_NULLPTR); } size_type size() const { return container ? container->size() : 0; } bool empty() const { return size() == 0; } }; @@ -731,10 +736,6 @@ enum ERROR_CODE_TYPE { * 1501: Video Device Module: The camera is not authorized. */ ERR_VDM_CAMERA_NOT_AUTHORIZED = 1501, - /** - * 2007: Audio Device Module: An error occurs in starting the application loopback. - */ - ERR_ADM_APPLICATION_LOOPBACK = 2007, }; enum LICENSE_ERROR_TYPE { @@ -854,12 +855,11 @@ enum INTERFACE_ID_TYPE { AGORA_IID_RTC_CONNECTION = 7, AGORA_IID_SIGNALING_ENGINE = 8, AGORA_IID_MEDIA_ENGINE_REGULATOR = 9, - AGORA_IID_CLOUD_SPATIAL_AUDIO = 10, AGORA_IID_LOCAL_SPATIAL_AUDIO = 11, AGORA_IID_STATE_SYNC = 13, - AGORA_IID_METACHAT_SERVICE = 14, + AGORA_IID_META_SERVICE = 14, AGORA_IID_MUSIC_CONTENT_CENTER = 15, - AGORA_IID_H265_TRANSCODER = 16, + AGORA_IID_H265_TRANSCODER = 16, }; /** @@ -1171,7 +1171,7 @@ enum VIDEO_CODEC_TYPE { */ VIDEO_CODEC_AV1 = 12, /** - * 5: VP9. + * 13: VP9. */ VIDEO_CODEC_VP9 = 13, /** @@ -1267,7 +1267,7 @@ struct SenderOptions { SenderOptions() : ccMode(CC_ENABLED), - codecType(VIDEO_CODEC_H264), + codecType(VIDEO_CODEC_H265), targetBitrate(6500) {} }; @@ -1542,12 +1542,23 @@ struct VideoSubscriptionOptions { VideoSubscriptionOptions() {} }; + +/** The maximum length of the user account. + */ +enum MAX_USER_ACCOUNT_LENGTH_TYPE +{ + /** The maximum length of the user account is 256 bytes. + */ + MAX_USER_ACCOUNT_LENGTH = 256 +}; + /** * The definition of the EncodedVideoFrameInfo struct, which contains the information of the external encoded video frame. */ struct EncodedVideoFrameInfo { EncodedVideoFrameInfo() - : codecType(VIDEO_CODEC_H264), + : uid(0), + codecType(VIDEO_CODEC_H264), width(0), height(0), framesPerSecond(0), @@ -1556,11 +1567,11 @@ struct EncodedVideoFrameInfo { trackId(0), captureTimeMs(0), decodeTimeMs(0), - uid(0), streamType(VIDEO_STREAM_HIGH) {} EncodedVideoFrameInfo(const EncodedVideoFrameInfo& rhs) - : codecType(rhs.codecType), + : uid(rhs.uid), + codecType(rhs.codecType), width(rhs.width), height(rhs.height), framesPerSecond(rhs.framesPerSecond), @@ -1569,11 +1580,11 @@ struct EncodedVideoFrameInfo { trackId(rhs.trackId), captureTimeMs(rhs.captureTimeMs), decodeTimeMs(rhs.decodeTimeMs), - uid(rhs.uid), streamType(rhs.streamType) {} EncodedVideoFrameInfo& operator=(const EncodedVideoFrameInfo& rhs) { if (this == &rhs) return *this; + uid = rhs.uid; codecType = rhs.codecType; width = rhs.width; height = rhs.height; @@ -1583,12 +1594,16 @@ struct EncodedVideoFrameInfo { trackId = rhs.trackId; captureTimeMs = rhs.captureTimeMs; decodeTimeMs = rhs.decodeTimeMs; - uid = rhs.uid; streamType = rhs.streamType; return *this; } + + /** + * ID of the user that pushes the the external encoded video frame.. + */ + uid_t uid; /** - * The codec type of the local video stream. See #VIDEO_CODEC_TYPE. The default value is `VIDEO_CODEC_H264 (2)`. + * The codec type of the local video stream. See #VIDEO_CODEC_TYPE. The default value is `VIDEO_CODEC_H265 (3)`. */ VIDEO_CODEC_TYPE codecType; /** @@ -1626,16 +1641,13 @@ struct EncodedVideoFrameInfo { * The timestamp for decoding the video. */ int64_t decodeTimeMs; - /** - * ID of the user that pushes the the external encoded video frame.. - */ - uid_t uid; /** * The stream type of video frame. */ VIDEO_STREAM_TYPE streamType; }; + /** * Video compression preference. */ @@ -1750,6 +1762,8 @@ struct CodecCapInfo { int codecCapMask; /** The codec capability level, estimated based on the device hardware.*/ CodecCapLevels codecLevels; + + CodecCapInfo(): codecType(VIDEO_CODEC_NONE), codecCapMask(0) {} }; /** @@ -1863,7 +1877,7 @@ struct VideoEncoderConfiguration { AdvanceOptions advanceOptions; VideoEncoderConfiguration(const VideoDimensions& d, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED) - : codecType(VIDEO_CODEC_H264), + : codecType(VIDEO_CODEC_NONE), dimensions(d), frameRate(f), bitrate(b), @@ -1873,7 +1887,7 @@ struct VideoEncoderConfiguration { mirrorMode(mirror), advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {} VideoEncoderConfiguration(int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED) - : codecType(VIDEO_CODEC_H264), + : codecType(VIDEO_CODEC_NONE), dimensions(width, height), frameRate(f), bitrate(b), @@ -1893,7 +1907,7 @@ struct VideoEncoderConfiguration { mirrorMode(config.mirrorMode), advanceOptions(config.advanceOptions) {} VideoEncoderConfiguration() - : codecType(VIDEO_CODEC_H264), + : codecType(VIDEO_CODEC_NONE), dimensions(FRAME_WIDTH_960, FRAME_HEIGHT_540), frameRate(FRAME_RATE_FPS_15), bitrate(STANDARD_BITRATE), @@ -2583,6 +2597,29 @@ enum VIDEO_APPLICATION_SCENARIO_TYPE { APPLICATION_SCENARIO_MEETING = 1, }; +/** + * The video QoE preference type. + */ +enum VIDEO_QOE_PREFERENCE_TYPE { + /** + * 1: Default QoE type, balance the delay, picture quality and fluency. + */ + VIDEO_QOE_PREFERENCE_BALANCE = 1, + /** + * 2: lower the e2e delay. + */ + VIDEO_QOE_PREFERENCE_DELAY_FIRST = 2, + /** + * 3: picture quality. + */ + VIDEO_QOE_PREFERENCE_PICTURE_QUALITY_FIRST = 3, + /** + * 4: more fluency. + */ + VIDEO_QOE_PREFERENCE_FLUENCY_FIRST = 4, + +}; + /** * The brightness level of the video image captured by the local camera. */ @@ -2627,50 +2664,50 @@ enum LOCAL_AUDIO_STREAM_STATE { /** * Local audio state error codes. */ -enum LOCAL_AUDIO_STREAM_ERROR { +enum LOCAL_AUDIO_STREAM_REASON { /** * 0: The local audio is normal. */ - LOCAL_AUDIO_STREAM_ERROR_OK = 0, + LOCAL_AUDIO_STREAM_REASON_OK = 0, /** * 1: No specified reason for the local audio failure. Remind your users to try to rejoin the channel. */ - LOCAL_AUDIO_STREAM_ERROR_FAILURE = 1, + LOCAL_AUDIO_STREAM_REASON_FAILURE = 1, /** * 2: No permission to use the local audio device. Remind your users to grant permission. */ - LOCAL_AUDIO_STREAM_ERROR_DEVICE_NO_PERMISSION = 2, + LOCAL_AUDIO_STREAM_REASON_DEVICE_NO_PERMISSION = 2, /** * 3: (Android and iOS only) The local audio capture device is used. Remind your users to check * whether another application occupies the microphone. Local audio capture automatically resume * after the microphone is idle for about five seconds. You can also try to rejoin the channel * after the microphone is idle. */ - LOCAL_AUDIO_STREAM_ERROR_DEVICE_BUSY = 3, + LOCAL_AUDIO_STREAM_REASON_DEVICE_BUSY = 3, /** * 4: The local audio capture failed. */ - LOCAL_AUDIO_STREAM_ERROR_RECORD_FAILURE = 4, + LOCAL_AUDIO_STREAM_REASON_RECORD_FAILURE = 4, /** * 5: The local audio encoding failed. */ - LOCAL_AUDIO_STREAM_ERROR_ENCODE_FAILURE = 5, + LOCAL_AUDIO_STREAM_REASON_ENCODE_FAILURE = 5, /** 6: The SDK cannot find the local audio recording device. */ - LOCAL_AUDIO_STREAM_ERROR_NO_RECORDING_DEVICE = 6, + LOCAL_AUDIO_STREAM_REASON_NO_RECORDING_DEVICE = 6, /** 7: The SDK cannot find the local audio playback device. */ - LOCAL_AUDIO_STREAM_ERROR_NO_PLAYOUT_DEVICE = 7, + LOCAL_AUDIO_STREAM_REASON_NO_PLAYOUT_DEVICE = 7, /** * 8: The local audio capturing is interrupted by the system call. */ - LOCAL_AUDIO_STREAM_ERROR_INTERRUPTED = 8, + LOCAL_AUDIO_STREAM_REASON_INTERRUPTED = 8, /** 9: An invalid audio capture device ID. */ - LOCAL_AUDIO_STREAM_ERROR_RECORD_INVALID_ID = 9, + LOCAL_AUDIO_STREAM_REASON_RECORD_INVALID_ID = 9, /** 10: An invalid audio playback device ID. */ - LOCAL_AUDIO_STREAM_ERROR_PLAYOUT_INVALID_ID = 10, + LOCAL_AUDIO_STREAM_REASON_PLAYOUT_INVALID_ID = 10, }; /** Local video state types. @@ -2698,73 +2735,73 @@ enum LOCAL_VIDEO_STREAM_STATE { /** * Local video state error codes. */ -enum LOCAL_VIDEO_STREAM_ERROR { +enum LOCAL_VIDEO_STREAM_REASON { /** * 0: The local video is normal. */ - LOCAL_VIDEO_STREAM_ERROR_OK = 0, + LOCAL_VIDEO_STREAM_REASON_OK = 0, /** * 1: No specified reason for the local video failure. */ - LOCAL_VIDEO_STREAM_ERROR_FAILURE = 1, + LOCAL_VIDEO_STREAM_REASON_FAILURE = 1, /** * 2: No permission to use the local video capturing device. Remind the user to grant permission * and rejoin the channel. */ - LOCAL_VIDEO_STREAM_ERROR_DEVICE_NO_PERMISSION = 2, + LOCAL_VIDEO_STREAM_REASON_DEVICE_NO_PERMISSION = 2, /** * 3: The local video capturing device is in use. Remind the user to check whether another * application occupies the camera. */ - LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY = 3, + LOCAL_VIDEO_STREAM_REASON_DEVICE_BUSY = 3, /** * 4: The local video capture fails. Remind the user to check whether the video capture device * is working properly or the camera is occupied by another application, and then to rejoin the * channel. */ - LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE = 4, + LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE = 4, /** * 5: The local video encoder is not supported. */ - LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE = 5, + LOCAL_VIDEO_STREAM_REASON_CODEC_NOT_SUPPORT = 5, /** * 6: (iOS only) The app is in the background. Remind the user that video capture cannot be * performed normally when the app is in the background. */ - LOCAL_VIDEO_STREAM_ERROR_CAPTURE_INBACKGROUND = 6, + LOCAL_VIDEO_STREAM_REASON_CAPTURE_INBACKGROUND = 6, /** * 7: (iOS only) The current application window is running in Slide Over, Split View, or Picture * in Picture mode, and another app is occupying the camera. Remind the user that the application * cannot capture video properly when the app is running in Slide Over, Split View, or Picture in * Picture mode and another app is occupying the camera. */ - LOCAL_VIDEO_STREAM_ERROR_CAPTURE_MULTIPLE_FOREGROUND_APPS = 7, + LOCAL_VIDEO_STREAM_REASON_CAPTURE_MULTIPLE_FOREGROUND_APPS = 7, /** * 8: Fails to find a local video capture device. Remind the user to check whether the camera is * connected to the device properly or the camera is working properly, and then to rejoin the * channel. */ - LOCAL_VIDEO_STREAM_ERROR_DEVICE_NOT_FOUND = 8, + LOCAL_VIDEO_STREAM_REASON_DEVICE_NOT_FOUND = 8, /** * 9: (macOS only) The video capture device currently in use is disconnected (such as being * unplugged). */ - LOCAL_VIDEO_STREAM_ERROR_DEVICE_DISCONNECTED = 9, + LOCAL_VIDEO_STREAM_REASON_DEVICE_DISCONNECTED = 9, /** * 10: (macOS and Windows only) The SDK cannot find the video device in the video device list. * Check whether the ID of the video device is valid. */ - LOCAL_VIDEO_STREAM_ERROR_DEVICE_INVALID_ID = 10, + LOCAL_VIDEO_STREAM_REASON_DEVICE_INVALID_ID = 10, /** * 101: The current video capture device is unavailable due to excessive system pressure. */ - LOCAL_VIDEO_STREAM_ERROR_DEVICE_SYSTEM_PRESSURE = 101, + LOCAL_VIDEO_STREAM_REASON_DEVICE_SYSTEM_PRESSURE = 101, /** * 11: (macOS only) The shared window is minimized when you call `startScreenCaptureByWindowId` * to share a window. The SDK cannot share a minimized window. You can cancel the minimization * of this window at the application layer, for example by maximizing this window. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_MINIMIZED = 11, + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_MINIMIZED = 11, /** * 12: (macOS and Windows only) The error code indicates that a window shared by the window ID * has been closed or a full-screen window shared by the window ID has exited full-screen mode. @@ -2779,31 +2816,38 @@ enum LOCAL_VIDEO_STREAM_ERROR { * then shares the window of the web video or document. After the user exits full-screen mode, * the SDK reports this error code. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_CLOSED = 12, + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_CLOSED = 12, /** 13: The local screen capture window is occluded. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_OCCLUDED = 13, + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_OCCLUDED = 13, /** 20: The local screen capture window is not supported. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_NOT_SUPPORTED = 20, + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_NOT_SUPPORTED = 20, /** 21: The screen capture fails. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_FAILURE = 21, + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_FAILURE = 21, /** 22: No permision to capture screen. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_NO_PERMISSION = 22, - /** - * 23: The screen capture paused. + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_NO_PERMISSION = 22, + /** + * 24: (Windows Only) An unexpected error (possibly due to window block failure) occurs during the screen + * sharing process, resulting in performance degradation. However, the screen sharing process itself is + * functioning normally. + */ + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_AUTO_FALLBACK = 24, + /** 25: (Windows only) The local screen capture window is currently hidden and not visible on the desktop. */ + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_HIDDEN = 25, + /** 26: (Windows only) The local screen capture window is recovered from its hidden state. */ + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_HIDDEN = 26, + /** 27:(Windows only) The window is recovered from miniminzed */ + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_MINIMIZED = 27, + /** + * 28: The screen capture paused. * * Common scenarios for reporting this error code: * - When the desktop switch to the secure desktop such as UAC dialog or the Winlogon desktop on * Windows platform, the SDK reports this error code. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_PAUSED = 23, - /** 24: The screen capture is resumed. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_RESUMED = 24, - /** 25: (Windows only) The local screen capture window is currently hidden and not visible on the desktop. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_HIDDEN = 25, - /** 26: (Windows only) The local screen capture window is recovered from its hidden state. */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_HIDDEN = 26, - /** 27:(Windows only) The window is recovered from miniminzed */ - LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_RECOVER_FROM_MINIMIZED = 27, + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_PAUSED = 28, + /** 29: The screen capture is resumed. */ + LOCAL_VIDEO_STREAM_REASON_SCREEN_CAPTURE_RESUMED = 29, + }; /** @@ -2991,7 +3035,6 @@ enum REMOTE_USER_STATE { * The remote user has enabled the local video capturing. */ USER_STATE_ENABLE_LOCAL_VIDEO = (1 << 8), - }; /** @@ -3001,7 +3044,7 @@ enum REMOTE_USER_STATE { struct VideoTrackInfo { VideoTrackInfo() : isLocal(false), ownerUid(0), trackId(0), channelId(OPTIONAL_NULLPTR) - , streamType(VIDEO_STREAM_HIGH), codecType(VIDEO_CODEC_H264) + , streamType(VIDEO_STREAM_HIGH), codecType(VIDEO_CODEC_H265) , encodedFrameOnly(false), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY) , observationPosition(agora::media::base::POSITION_POST_CAPTURER) {} /** @@ -3014,7 +3057,6 @@ struct VideoTrackInfo { * ID of the user who publishes the video track. */ uid_t ownerUid; - /** * ID of the video track. */ @@ -3145,7 +3187,7 @@ class IPacketObserver { */ unsigned int size; - Packet() : buffer(NULL), size(0) {} + Packet() : buffer(OPTIONAL_NULLPTR), size(0) {} }; /** * Occurs when the SDK is ready to send the audio packet. @@ -3278,6 +3320,18 @@ struct LocalAudioStats * The audio delay of the device, contains record and playout delay */ int audioDeviceDelay; + /** + * The playout delay of the device + */ + int audioPlayoutDelay; + /** + * The signal delay estimated from audio in-ear monitoring (ms). + */ + int earMonitorDelay; + /** + * The signal delay estimated during the AEC process from nearin and farin (ms). + */ + int aecEstimatedDelay; }; @@ -3316,74 +3370,74 @@ enum RTMP_STREAM_PUBLISH_STATE { /** * Error codes of the RTMP or RTMPS streaming. */ -enum RTMP_STREAM_PUBLISH_ERROR_TYPE { +enum RTMP_STREAM_PUBLISH_REASON { /** * 0: The RTMP or RTMPS streaming publishes successfully. */ - RTMP_STREAM_PUBLISH_ERROR_OK = 0, + RTMP_STREAM_PUBLISH_REASON_OK = 0, /** * 1: Invalid argument used. If, for example, you do not call the `setLiveTranscoding` method to configure the LiveTranscoding parameters before calling the addPublishStreamUrl method, * the SDK returns this error. Check whether you set the parameters in the `setLiveTranscoding` method properly. */ - RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT = 1, + RTMP_STREAM_PUBLISH_REASON_INVALID_ARGUMENT = 1, /** * 2: The RTMP or RTMPS streaming is encrypted and cannot be published. */ - RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED = 2, + RTMP_STREAM_PUBLISH_REASON_ENCRYPTED_STREAM_NOT_ALLOWED = 2, /** * 3: Timeout for the RTMP or RTMPS streaming. Call the `addPublishStreamUrl` method to publish the streaming again. */ - RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT = 3, + RTMP_STREAM_PUBLISH_REASON_CONNECTION_TIMEOUT = 3, /** * 4: An error occurs in Agora's streaming server. Call the `addPublishStreamUrl` method to publish the streaming again. */ - RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR = 4, + RTMP_STREAM_PUBLISH_REASON_INTERNAL_SERVER_ERROR = 4, /** * 5: An error occurs in the CDN server. */ - RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR = 5, + RTMP_STREAM_PUBLISH_REASON_RTMP_SERVER_ERROR = 5, /** * 6: The RTMP or RTMPS streaming publishes too frequently. */ - RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN = 6, + RTMP_STREAM_PUBLISH_REASON_TOO_OFTEN = 6, /** * 7: The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones. */ - RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT = 7, + RTMP_STREAM_PUBLISH_REASON_REACH_LIMIT = 7, /** * 8: The host manipulates other hosts' URLs. Check your app logic. */ - RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED = 8, + RTMP_STREAM_PUBLISH_REASON_NOT_AUTHORIZED = 8, /** * 9: Agora's server fails to find the RTMP or RTMPS streaming. */ - RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND = 9, + RTMP_STREAM_PUBLISH_REASON_STREAM_NOT_FOUND = 9, /** * 10: The format of the RTMP or RTMPS streaming URL is not supported. Check whether the URL format is correct. */ - RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED = 10, + RTMP_STREAM_PUBLISH_REASON_FORMAT_NOT_SUPPORTED = 10, /** * 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your application code logic. */ - RTMP_STREAM_PUBLISH_ERROR_NOT_BROADCASTER = 11, // Note: match to ERR_PUBLISH_STREAM_NOT_BROADCASTER in AgoraBase.h + RTMP_STREAM_PUBLISH_REASON_NOT_BROADCASTER = 11, // Note: match to ERR_PUBLISH_STREAM_NOT_BROADCASTER in AgoraBase.h /** * 13: The `updateRtmpTranscoding` or `setLiveTranscoding` method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic. */ - RTMP_STREAM_PUBLISH_ERROR_TRANSCODING_NO_MIX_STREAM = 13, // Note: match to ERR_PUBLISH_STREAM_TRANSCODING_NO_MIX_STREAM in AgoraBase.h + RTMP_STREAM_PUBLISH_REASON_TRANSCODING_NO_MIX_STREAM = 13, // Note: match to ERR_PUBLISH_STREAM_TRANSCODING_NO_MIX_STREAM in AgoraBase.h /** * 14: Errors occurred in the host's network. */ - RTMP_STREAM_PUBLISH_ERROR_NET_DOWN = 14, // Note: match to ERR_NET_DOWN in AgoraBase.h + RTMP_STREAM_PUBLISH_REASON_NET_DOWN = 14, // Note: match to ERR_NET_DOWN in AgoraBase.h /** * 15: Your App ID does not have permission to use the CDN live streaming function. */ - RTMP_STREAM_PUBLISH_ERROR_INVALID_APPID = 15, // Note: match to ERR_PUBLISH_STREAM_APPID_INVALID in AgoraBase.h + RTMP_STREAM_PUBLISH_REASON_INVALID_APPID = 15, // Note: match to ERR_PUBLISH_STREAM_APPID_INVALID in AgoraBase.h /** invalid privilege. */ - RTMP_STREAM_PUBLISH_ERROR_INVALID_PRIVILEGE = 16, + RTMP_STREAM_PUBLISH_REASON_INVALID_PRIVILEGE = 16, /** * 100: The streaming has been stopped normally. After you call `removePublishStreamUrl` to stop streaming, the SDK returns this value. */ - RTMP_STREAM_UNPUBLISH_ERROR_OK = 100, + RTMP_STREAM_UNPUBLISH_REASON_OK = 100, }; /** Events during the RTMP or RTMPS streaming. */ @@ -3445,7 +3499,7 @@ typedef struct RtcImage { */ double alpha; - RtcImage() : url(NULL), x(0), y(0), width(0), height(0), zOrder(0), alpha(1.0) {} + RtcImage() : url(OPTIONAL_NULLPTR), x(0), y(0), width(0), height(0), zOrder(0), alpha(1.0) {} } RtcImage; /** * The configuration for advanced features of the RTMP or RTMPS streaming with transcoding. @@ -3453,7 +3507,7 @@ typedef struct RtcImage { * If you want to enable the advanced features of streaming with transcoding, contact support@agora.io. */ struct LiveStreamAdvancedFeature { - LiveStreamAdvancedFeature() : featureName(NULL), opened(false) {} + LiveStreamAdvancedFeature() : featureName(OPTIONAL_NULLPTR), opened(false) {} LiveStreamAdvancedFeature(const char* feat_name, bool open) : featureName(feat_name), opened(open) {} /** The advanced feature for high-quality video with a lower bitrate. */ // static const char* LBHQ = "lbhq"; @@ -3573,6 +3627,7 @@ struct TranscodingUser { * @note If the value is not `0`, a special player is required. */ int audioChannel; + TranscodingUser() : uid(0), x(0), @@ -3692,7 +3747,31 @@ struct LiveTranscoding { /** The number of enabled advanced features. The default value is 0. */ unsigned int advancedFeatureCount; - LiveTranscoding() : width(360), height(640), videoBitrate(400), videoFramerate(15), lowLatency(false), videoGop(30), videoCodecProfile(VIDEO_CODEC_PROFILE_HIGH), backgroundColor(0x000000), videoCodecType(VIDEO_CODEC_H264_FOR_STREAM), userCount(0), transcodingUsers(NULL), transcodingExtraInfo(NULL), metadata(NULL), watermark(NULL), watermarkCount(0), backgroundImage(NULL), backgroundImageCount(0), audioSampleRate(AUDIO_SAMPLE_RATE_48000), audioBitrate(48), audioChannels(1), audioCodecProfile(AUDIO_CODEC_PROFILE_LC_AAC), advancedFeatures(NULL), advancedFeatureCount(0) {} + + LiveTranscoding() + : width(360), + height(640), + videoBitrate(400), + videoFramerate(15), + lowLatency(false), + videoGop(30), + videoCodecProfile(VIDEO_CODEC_PROFILE_HIGH), + backgroundColor(0x000000), + videoCodecType(VIDEO_CODEC_H264_FOR_STREAM), + userCount(0), + transcodingUsers(OPTIONAL_NULLPTR), + transcodingExtraInfo(OPTIONAL_NULLPTR), + metadata(OPTIONAL_NULLPTR), + watermark(OPTIONAL_NULLPTR), + watermarkCount(0), + backgroundImage(OPTIONAL_NULLPTR), + backgroundImageCount(0), + audioSampleRate(AUDIO_SAMPLE_RATE_48000), + audioBitrate(48), + audioChannels(1), + audioCodecProfile(AUDIO_CODEC_PROFILE_LC_AAC), + advancedFeatures(OPTIONAL_NULLPTR), + advancedFeatureCount(0) {} }; /** @@ -3754,7 +3833,7 @@ struct TranscodingVideoStream { TranscodingVideoStream() : sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), remoteUserUid(0), - imageUrl(NULL), + imageUrl(OPTIONAL_NULLPTR), x(0), y(0), width(0), @@ -3764,7 +3843,6 @@ struct TranscodingVideoStream { mirror(false) {} }; - /** * The configuration of the video mixing on the local client. */ @@ -3788,11 +3866,7 @@ struct LocalTranscoderConfiguration { */ bool syncWithPrimaryCamera; - LocalTranscoderConfiguration() - : streamCount(0), - videoInputStreams(NULL), - videoOutputConfiguration(), - syncWithPrimaryCamera(true) {} + LocalTranscoderConfiguration() : streamCount(0), videoInputStreams(OPTIONAL_NULLPTR), videoOutputConfiguration(), syncWithPrimaryCamera(true) {} }; enum VIDEO_TRANSCODER_ERROR { @@ -4014,10 +4088,18 @@ enum CONNECTION_CHANGED_REASON_TYPE * 21: The connection is failed due to license validation failure. */ CONNECTION_CHANGED_LICENSE_VALIDATION_FAILURE = 21, - /** + /* * 22: The connection is failed due to certification verify failure. */ CONNECTION_CHANGED_CERTIFICATION_VERYFY_FAILURE = 22, + /** + * 23: The connection is failed due to the lack of granting permission to the stream channel. + */ + CONNECTION_CHANGED_STREAM_CHANNEL_NOT_AVAILABLE = 23, + /** + * 24: The connection is failed due to join channel with an inconsistent appid. + */ + CONNECTION_CHANGED_INCONSISTENT_APPID = 24, }; /** @@ -4156,14 +4238,19 @@ enum VIDEO_VIEW_SETUP_MODE { * Attributes of video canvas object. */ struct VideoCanvas { - /** - * Video display window. - */ - view_t view; /** * The user id of local video. */ uid_t uid; + + /** + * The uid of video stream composing the video stream from transcoder which will be drawn on this video canvas. + */ + uid_t subviewUid; + /** + * Video display window. + */ + view_t view; /** * A RGBA value indicates background color of the render view. Defaults to 0x00000000. */ @@ -4205,28 +4292,37 @@ struct VideoCanvas { * The default value is empty(that is, if it has zero width or height), which means no cropping. */ Rectangle cropArea; - /** - * Whether to apply alpha mask to the video frame if exsit: - * true: Apply alpha mask to video frame. - * false: (Default) Do not apply alpha mask to video frame. - */ + * Whether to apply alpha mask to the video frame if exsit: + * true: Apply alpha mask to video frame. + * false: (Default) Do not apply alpha mask to video frame. + */ bool enableAlphaMask; - + /** + * The video frame position in pipeline. See \ref VIDEO_MODULE_POSITION "VIDEO_MODULE_POSITION". + * The default value is POSITION_POST_CAPTURER. + */ + media::base::VIDEO_MODULE_POSITION position; + VideoCanvas() - : view(NULL), uid(0), backgroundColor(0x00000000), renderMode(media::base::RENDER_MODE_HIDDEN), mirrorMode(VIDEO_MIRROR_MODE_AUTO), + : uid(0), subviewUid(0), view(NULL), backgroundColor(0x00000000), renderMode(media::base::RENDER_MODE_HIDDEN), mirrorMode(VIDEO_MIRROR_MODE_AUTO), setupMode(VIDEO_VIEW_SETUP_REPLACE), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY), - cropArea(0, 0, 0, 0), enableAlphaMask(false) {} + cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {} + + VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt) + : uid(0), subviewUid(0), view(v), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE), + sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY), + cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {} VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, uid_t u) - : view(v), uid(u), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE), + : uid(u), subviewUid(0), view(v), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY), - cropArea(0, 0, 0, 0), enableAlphaMask(false) {} + cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {} - VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, user_id_t) - : view(v), uid(0), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE), + VideoCanvas(view_t v, media::base::RENDER_MODE_TYPE m, VIDEO_MIRROR_MODE_TYPE mt, uid_t u, uid_t subu) + : uid(u), subviewUid(subu), view(v), backgroundColor(0x00000000), renderMode(m), mirrorMode(mt), setupMode(VIDEO_VIEW_SETUP_REPLACE), sourceType(VIDEO_SOURCE_CAMERA_PRIMARY), mediaPlayerId(-ERR_NOT_READY), - cropArea(0, 0, 0, 0), enableAlphaMask(false) {} + cropArea(0, 0, 0, 0), enableAlphaMask(false), position(media::base::POSITION_POST_CAPTURER) {} }; /** Image enhancement options. @@ -4438,7 +4534,7 @@ struct VirtualBackgroundSource { */ BACKGROUND_BLUR_DEGREE blur_degree; - VirtualBackgroundSource() : background_source_type(BACKGROUND_COLOR), color(0xffffff), source(NULL), blur_degree(BLUR_DEGREE_HIGH) {} + VirtualBackgroundSource() : background_source_type(BACKGROUND_COLOR), color(0xffffff), source(OPTIONAL_NULLPTR), blur_degree(BLUR_DEGREE_HIGH) {} }; struct SegmentationProperty { @@ -4836,22 +4932,22 @@ struct ScreenCaptureParameters { */ int excludeWindowCount; - /** The width (px) of the border. Defaults to 0, and the value range is [0,50]. - * - */ - int highLightWidth; - /** The color of the border in RGBA format. The default value is 0xFF8CBF26. - * - */ - unsigned int highLightColor; - /** Whether to place a border around the shared window or screen: - * - true: Place a border. - * - false: (Default) Do not place a border. - * - * @note When you share a part of a window or screen, the SDK places a border around the entire window or screen if you set `enableHighLight` as true. - * - */ - bool enableHighLight; + /** The width (px) of the border. Defaults to 0, and the value range is [0,50]. + * + */ + int highLightWidth; + /** The color of the border in RGBA format. The default value is 0xFF8CBF26. + * + */ + unsigned int highLightColor; + /** Whether to place a border around the shared window or screen: + * - true: Place a border. + * - false: (Default) Do not place a border. + * + * @note When you share a part of a window or screen, the SDK places a border around the entire window or screen if you set `enableHighLight` as true. + * + */ + bool enableHighLight; ScreenCaptureParameters() : dimensions(1920, 1080), frameRate(5), bitrate(STANDARD_BITRATE), captureMouseCursor(true), windowFocus(false), excludeWindowList(OPTIONAL_NULLPTR), excludeWindowCount(0), highLightWidth(0), highLightColor(0), enableHighLight(false) {} @@ -4968,7 +5064,7 @@ struct AudioRecordingConfiguration { int recordingChannel; AudioRecordingConfiguration() - : filePath(NULL), + : filePath(OPTIONAL_NULLPTR), encode(false), sampleRate(32000), fileRecordingType(AUDIO_FILE_RECORDING_MIXED), @@ -5172,59 +5268,6 @@ enum CHANNEL_MEDIA_RELAY_ERROR { RELAY_ERROR_DEST_TOKEN_EXPIRED = 11, }; -/** - * The event code of channel media relay. - */ -enum CHANNEL_MEDIA_RELAY_EVENT { - /** 0: The user disconnects from the server due to poor network connections. - */ - RELAY_EVENT_NETWORK_DISCONNECTED = 0, - /** 1: The user is connected to the server. - */ - RELAY_EVENT_NETWORK_CONNECTED = 1, - /** 2: The user joins the source channel. - */ - RELAY_EVENT_PACKET_JOINED_SRC_CHANNEL = 2, - /** 3: The user joins the destination channel. - */ - RELAY_EVENT_PACKET_JOINED_DEST_CHANNEL = 3, - /** 4: The SDK starts relaying the media stream to the destination channel. - */ - RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL = 4, - /** 5: The server receives the video stream from the source channel. - */ - RELAY_EVENT_PACKET_RECEIVED_VIDEO_FROM_SRC = 5, - /** 6: The server receives the audio stream from the source channel. - */ - RELAY_EVENT_PACKET_RECEIVED_AUDIO_FROM_SRC = 6, - /** 7: The destination channel is updated. - */ - RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL = 7, - /** 8: The destination channel update fails due to internal reasons. - */ - RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_REFUSED = 8, - /** 9: The destination channel does not change, which means that the destination channel fails to be updated. - */ - RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE = 9, - /** 10: The destination channel name is NULL. - */ - RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_IS_NULL = 10, - /** 11: The video profile is sent to the server. - */ - RELAY_EVENT_VIDEO_PROFILE_UPDATE = 11, - /** 12: The SDK successfully pauses relaying the media stream to destination channels. - */ - RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS = 12, - /** 13: The SDK fails to pause relaying the media stream to destination channels. - */ - RELAY_EVENT_PAUSE_SEND_PACKET_TO_DEST_CHANNEL_FAILED = 13, - /** 14: The SDK successfully resumes relaying the media stream to destination channels. - */ - RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_SUCCESS = 14, - /** 15: The SDK fails to resume relaying the media stream to destination channels. - */ - RELAY_EVENT_RESUME_SEND_PACKET_TO_DEST_CHANNEL_FAILED = 15, -}; /** * The state code of the channel media relay. */ @@ -5247,17 +5290,20 @@ enum CHANNEL_MEDIA_RELAY_STATE { /** The definition of ChannelMediaInfo. */ struct ChannelMediaInfo { - /** The channel name. The default value is NULL, which means that the SDK - * applies the current channel name. + /** The user ID. */ + uid_t uid; + /** The channel name. The default value is NULL, which means that the SDK + * applies the current channel name. + */ const char* channelName; - /** The token that enables the user to join the channel. The default value - * is NULL, which means that the SDK applies the current token. - */ + /** The token that enables the user to join the channel. The default value + * is NULL, which means that the SDK applies the current token. + */ const char* token; - /** The user ID. - */ - uid_t uid; + + ChannelMediaInfo() : uid(0), channelName(NULL), token(NULL) {} + ChannelMediaInfo(const char* c, const char* t, uid_t u) : uid(u), channelName(c), token(t) {} }; /** The definition of ChannelMediaRelayConfiguration. @@ -5275,7 +5321,7 @@ struct ChannelMediaRelayConfiguration { * - If you have enabled the App Certificate, you must use the token generated with the `channelName` and `uid`, and * the `uid` must be set as 0. */ - ChannelMediaInfo *srcInfo; + ChannelMediaInfo* srcInfo; /** The information of the destination channel `ChannelMediaInfo`. It contains the following members: * - `channelName`: The name of the destination channel. * - `uid`: The unique ID to identify the relay stream in the destination channel. The value @@ -5290,18 +5336,14 @@ struct ChannelMediaRelayConfiguration { * If you have enabled the App Certificate, you must use the token generated with the `channelName` * and `uid`. */ - ChannelMediaInfo *destInfos; + ChannelMediaInfo* destInfos; /** The number of destination channels. The default value is 0, and the value range is from 0 to * 6. Ensure that the value of this parameter corresponds to the number of `ChannelMediaInfo` * structs you define in `destInfo`. */ int destCount; - ChannelMediaRelayConfiguration() - : srcInfo(NULL), - destInfos(NULL), - destCount(0) - {} + ChannelMediaRelayConfiguration() : srcInfo(OPTIONAL_NULLPTR), destInfos(OPTIONAL_NULLPTR), destCount(0) {} }; /** @@ -5320,15 +5362,12 @@ struct UplinkNetworkInfo { } }; -/** - * The collections of downlink network info. - */ struct DownlinkNetworkInfo { struct PeerDownlinkInfo { /** * The ID of the user who owns the remote video stream. */ - const char* uid; + const char* userId; /** * The remote video stream type: #VIDEO_STREAM_TYPE. */ @@ -5343,28 +5382,41 @@ struct DownlinkNetworkInfo { int expected_bitrate_bps; PeerDownlinkInfo() - : uid(OPTIONAL_NULLPTR), + : userId(OPTIONAL_NULLPTR), stream_type(VIDEO_STREAM_HIGH), current_downscale_level(REMOTE_VIDEO_DOWNSCALE_LEVEL_NONE), expected_bitrate_bps(-1) {} + PeerDownlinkInfo(const PeerDownlinkInfo& rhs) + : stream_type(rhs.stream_type), + current_downscale_level(rhs.current_downscale_level), + expected_bitrate_bps(rhs.expected_bitrate_bps) { + if (rhs.userId != OPTIONAL_NULLPTR) { + const int len = std::strlen(rhs.userId); + char* buf = new char[len + 1]; + std::memcpy(buf, rhs.userId, len); + buf[len] = '\0'; + userId = buf; + } + } + PeerDownlinkInfo& operator=(const PeerDownlinkInfo& rhs) { if (this == &rhs) return *this; - uid = OPTIONAL_NULLPTR; + userId = OPTIONAL_NULLPTR; stream_type = rhs.stream_type; current_downscale_level = rhs.current_downscale_level; expected_bitrate_bps = rhs.expected_bitrate_bps; - if (rhs.uid != OPTIONAL_NULLPTR) { - char* temp = new char[strlen(rhs.uid) + 1]; - strcpy(temp, rhs.uid); - uid = temp; + if (rhs.userId != OPTIONAL_NULLPTR) { + const int len = std::strlen(rhs.userId); + char* buf = new char[len + 1]; + std::memcpy(buf, rhs.userId, len); + buf[len] = '\0'; + userId = buf; } return *this; } - ~PeerDownlinkInfo() { - if (uid) { delete [] uid; } - } + ~PeerDownlinkInfo() { delete[] userId; } }; /** @@ -5422,9 +5474,7 @@ struct DownlinkNetworkInfo { return *this; } - ~DownlinkNetworkInfo() { - if (peer_downlink_info) delete [] peer_downlink_info; - } + ~DownlinkNetworkInfo() { delete[] peer_downlink_info; } }; /** @@ -5487,7 +5537,7 @@ struct EncryptionConfig { EncryptionConfig() : encryptionMode(AES_128_GCM2), - encryptionKey(NULL) + encryptionKey(OPTIONAL_NULLPTR) { memset(encryptionKdfSalt, 0, sizeof(encryptionKdfSalt)); } @@ -5558,15 +5608,6 @@ enum PERMISSION_TYPE { SCREEN_CAPTURE = 2, }; -/** The maximum length of the user account. - */ -enum MAX_USER_ACCOUNT_LENGTH_TYPE -{ - /** The maximum length of the user account is 256 bytes. - */ - MAX_USER_ACCOUNT_LENGTH = 256 -}; - /** * The subscribing state. */ @@ -5654,8 +5695,8 @@ struct UserInfo { * The user account. The maximum data length is `MAX_USER_ACCOUNT_LENGTH_TYPE`. */ char userAccount[MAX_USER_ACCOUNT_LENGTH]; - UserInfo() - : uid(0) { + + UserInfo() : uid(0) { userAccount[0] = '\0'; } }; @@ -5896,22 +5937,6 @@ enum CONFIG_FETCH_TYPE { }; -/** - * media recorder source stream information - */ -struct RecorderStreamInfo { - /** - * The channel ID of the video track. - */ - const char* channelId; - /** - * The user ID. - */ - uid_t uid; - RecorderStreamInfo() : channelId(NULL), uid(0) {} -}; - - /** The local proxy mode type. */ enum LOCAL_PROXY_MODE { /** 0: Connect local proxy with high priority, if not connected to local proxy, fallback to sdrtn. @@ -5972,10 +5997,30 @@ struct LocalAccessPointConfiguration { /** Local proxy connection, advanced Config info. */ AdvancedConfigInfo advancedConfig; - LocalAccessPointConfiguration() : ipList(NULL), ipListSize(0), domainList(NULL), domainListSize(0), verifyDomainName(NULL), mode(ConnectivityFirst) {} + /** + * Whether to disable vos-aut: + - true: (Default)disable vos-aut. + - false: not disable vos-aut + */ + bool disableAut; + LocalAccessPointConfiguration() : ipList(NULL), ipListSize(0), domainList(NULL), domainListSize(0), verifyDomainName(NULL), mode(ConnectivityFirst), disableAut(true) {} }; - +/** + * The information about recorded media streams. + */ +struct RecorderStreamInfo { + const char* channelId; + /** + * The user ID. + */ + uid_t uid; + /** + * The channel ID of the audio/video stream needs to be recorded. + */ + RecorderStreamInfo() : channelId(NULL), uid(0) {} + RecorderStreamInfo(const char* channelId, uid_t uid) : channelId(channelId), uid(uid) {} +}; } // namespace rtc namespace base { @@ -5994,9 +6039,9 @@ class AParameter : public agora::util::AutoPtr { private: bool initialize(IEngineBase* engine) { - IAgoraParameter* p = NULL; + IAgoraParameter* p = OPTIONAL_NULLPTR; if (engine && !engine->queryInterface(rtc::AGORA_IID_PARAMETER_ENGINE, (void**)&p)) reset(p); - return p != NULL; + return p != OPTIONAL_NULLPTR; } }; @@ -6048,7 +6093,47 @@ struct SpatialAudioParams { */ Optional enable_doppler; }; +/** + * Layout info of video stream which compose a transcoder video stream. +*/ +struct VideoLayout +{ + /** + * Channel Id from which this video stream come from. + */ + const char* channelId; + /** + * User id of video stream. + */ + rtc::uid_t uid; + /** + * User account of video stream. + */ + user_id_t strUid; + /** + * x coordinate of video stream on a transcoded video stream canvas. + */ + uint32_t x; + /** + * y coordinate of video stream on a transcoded video stream canvas. + */ + uint32_t y; + /** + * width of video stream on a transcoded video stream canvas. + */ + uint32_t width; + /** + * height of video stream on a transcoded video stream canvas. + */ + uint32_t height; + /** + * video state of video stream on a transcoded video stream canvas. + * 0 for normal video , 1 for placeholder image showed , 2 for black image. + */ + uint32_t videoState; + VideoLayout() : channelId(OPTIONAL_NULLPTR), uid(0), strUid(OPTIONAL_NULLPTR), x(0), y(0), width(0), height(0), videoState(0) {} +}; } // namespace agora /** diff --git a/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaBase.h b/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaBase.h index bd0a7b881..d56337745 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaBase.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaBase.h @@ -1,4 +1,3 @@ -// // Agora Engine SDK // // Created by Sting Feng in 2017-11. @@ -35,10 +34,8 @@ static const unsigned int INVALID_TRACK_ID = 0xffffffff; static const unsigned int DEFAULT_CONNECTION_ID = 0; static const unsigned int DUMMY_CONNECTION_ID = (std::numeric_limits::max)(); - struct EncodedVideoFrameInfo; - /** * Video source types definition. **/ @@ -105,45 +102,49 @@ enum AudioRoute */ ROUTE_DEFAULT = -1, /** - * The headset. + * The Headset. */ ROUTE_HEADSET = 0, /** - * The earpiece. + * The Earpiece. */ ROUTE_EARPIECE = 1, /** - * The headset with no microphone. + * The Headset with no microphone. */ ROUTE_HEADSETNOMIC = 2, /** - * The speakerphone. + * The Speakerphone. */ ROUTE_SPEAKERPHONE = 3, /** - * The loudspeaker. + * The Loudspeaker. */ ROUTE_LOUDSPEAKER = 4, /** - * The Bluetooth headset. + * The Bluetooth Device via HFP. */ - ROUTE_HEADSETBLUETOOTH = 5, + ROUTE_BLUETOOTH_DEVICE_HFP = 5, /** - * The USB + * The USB. */ ROUTE_USB = 6, /** - * The HDMI + * The HDMI. */ ROUTE_HDMI = 7, /** - * The DISPLAYPORT + * The DisplayPort. */ ROUTE_DISPLAYPORT = 8, /** - * The AIRPLAY + * The AirPlay. */ ROUTE_AIRPLAY = 9, + /** + * The Bluetooth Device via A2DP. + */ + ROUTE_BLUETOOTH_DEVICE_A2DP = 10, }; /** @@ -551,6 +552,19 @@ enum CAMERA_VIDEO_SOURCE_TYPE { VIDEO_SOURCE_UNSPECIFIED = 2, }; +/** + * The IVideoFrameMetaInfo class. + * This interface provides access to metadata information. + */ +class IVideoFrameMetaInfo { + public: + enum META_INFO_KEY { + KEY_FACE_CAPTURE = 0, + }; + virtual ~IVideoFrameMetaInfo() {}; + virtual const char* getMetaInfoStr(META_INFO_KEY key) const = 0; +}; + /** * The definition of the ExternalVideoFrame struct. */ @@ -698,12 +712,12 @@ struct ExternalVideoFrame { uint8_t* alphaBuffer; /** - * [Windows Texture related parameter] The pointer of ID3D11Texture2D used by the video frame. + * [For Windows only] The pointer of ID3D11Texture2D used by the video frame. */ void *d3d11_texture_2d; /** - * [Windows Texture related parameter] The index of ID3D11Texture2D array used by the video frame. + * [For Windows only] The index of ID3D11Texture2D array used by the video frame. */ int texture_slice_index; }; @@ -731,7 +745,8 @@ struct VideoFrame { textureId(0), d3d11Texture2d(NULL), alphaBuffer(NULL), - pixelBuffer(NULL){ + pixelBuffer(NULL), + metaInfo(NULL){ memset(matrix, 0, sizeof(matrix)); } /** @@ -821,6 +836,10 @@ struct VideoFrame { *The type of CVPixelBufferRef, for iOS and macOS only. */ void* pixelBuffer; + /** + * The pointer to IVideoFrameMetaInfo, which is the interface to get metainfo contents from VideoFrame. + */ + IVideoFrameMetaInfo* metaInfo; }; /** @@ -865,6 +884,7 @@ enum VIDEO_MODULE_POSITION { POSITION_POST_CAPTURER = 1 << 0, POSITION_PRE_RENDERER = 1 << 1, POSITION_PRE_ENCODER = 1 << 2, + POSITION_POST_CAPTURER_ORIGIN = 1 << 3, }; } // namespace base @@ -942,10 +962,6 @@ class IAudioFrameObserverBase { * are used. */ int64_t renderTimeMs; - /** - * A reserved parameter. - */ - int avsync_type; /** * A reserved parameter. * @@ -953,7 +969,18 @@ class IAudioFrameObserverBase { * this will then filled into audio4 extension part, the remote side could use this pts in av * sync process with video frame. */ + int avsync_type; + /** + * The pts timestamp of this audio frame. + * + * This timestamp is used to indicate the origin pts time of the frame, and sync with video frame by + * the pts time stamp + */ int64_t presentationMs; + /** + * The number of the audio track. + */ + int audioTrackNumber; AudioFrame() : type(FRAME_TYPE_PCM16), samplesPerChannel(0), @@ -963,7 +990,8 @@ class IAudioFrameObserverBase { buffer(NULL), renderTimeMs(0), avsync_type(0), - presentationMs(0) {} + presentationMs(0), + audioTrackNumber(0) {} }; enum AUDIO_FRAME_POSITION { @@ -1180,9 +1208,9 @@ struct UserAudioSpectrumInfo { */ struct AudioSpectrumData spectrumData; - UserAudioSpectrumInfo () : uid(0), spectrumData() {} - UserAudioSpectrumInfo(agora::rtc::uid_t _uid, const float *data, int length) : - uid(_uid) { spectrumData.audioSpectrumData = data; spectrumData.dataLength = length; } + UserAudioSpectrumInfo() : uid(0) {} + + UserAudioSpectrumInfo(agora::rtc::uid_t uid, const float* data, int length) : uid(uid), spectrumData(data, length) {} }; /** @@ -1205,7 +1233,6 @@ class IAudioSpectrumObserver { * - false: Not processed. */ virtual bool onLocalAudioSpectrum(const AudioSpectrumData& data) = 0; - /** * Reports the audio spectrum of remote user. * @@ -1223,7 +1250,7 @@ class IAudioSpectrumObserver { * - true: Processed. * - false: Not processed. */ - virtual bool onRemoteAudioSpectrum(const UserAudioSpectrumInfo * spectrums, unsigned int spectrumNumber) = 0; + virtual bool onRemoteAudioSpectrum(const UserAudioSpectrumInfo* spectrums, unsigned int spectrumNumber) = 0; }; /** @@ -1505,7 +1532,7 @@ enum MediaRecorderStreamType { */ enum RecorderState { /** - * -1: An error occurs during the recording. See RecorderErrorCode for the reason. + * -1: An error occurs during the recording. See RecorderReasonCode for the reason. */ RECORDER_STATE_ERROR = -1, /** @@ -1522,27 +1549,27 @@ enum RecorderState { * * @since v3.5.2 */ -enum RecorderErrorCode { +enum RecorderReasonCode { /** * 0: No error occurs. */ - RECORDER_ERROR_NONE = 0, + RECORDER_REASON_NONE = 0, /** * 1: The SDK fails to write the recorded data to a file. */ - RECORDER_ERROR_WRITE_FAILED = 1, + RECORDER_REASON_WRITE_FAILED = 1, /** * 2: The SDK does not detect audio and video streams to be recorded, or audio and video streams are interrupted for more than five seconds during recording. */ - RECORDER_ERROR_NO_STREAM = 2, + RECORDER_REASON_NO_STREAM = 2, /** * 3: The recording duration exceeds the upper limit. */ - RECORDER_ERROR_OVER_MAX_DURATION = 3, + RECORDER_REASON_OVER_MAX_DURATION = 3, /** * 4: The recording configuration changes. */ - RECORDER_ERROR_CONFIG_CHANGED = 4, + RECORDER_REASON_CONFIG_CHANGED = 4, }; /** * Configurations for the local audio and video recording. @@ -1605,7 +1632,6 @@ struct RecorderInfo { RecorderInfo(const char* name, unsigned int dur, unsigned int size) : fileName(name), durationMs(dur), fileSize(size) {} }; - class IMediaRecorderObserver { public: /** @@ -1619,9 +1645,9 @@ class IMediaRecorderObserver { * @param channelId The channel name. * @param uid ID of the user. * @param state The current recording state. See \ref agora::media::RecorderState "RecorderState". - * @param error The reason for the state change. See \ref agora::media::RecorderErrorCode "RecorderErrorCode". + * @param reason The reason for the state change. See \ref agora::media::RecorderReasonCode "RecorderReasonCode". */ - virtual void onRecorderStateChanged(const char* channelId, rtc::uid_t uid, RecorderState state, RecorderErrorCode error) = 0; + virtual void onRecorderStateChanged(const char* channelId, rtc::uid_t uid, RecorderState state, RecorderReasonCode reason) = 0; /** * Occurs when the recording information is updated. * @@ -1637,7 +1663,9 @@ class IMediaRecorderObserver { * */ virtual void onRecorderInfoUpdated(const char* channelId, rtc::uid_t uid, const RecorderInfo& info) = 0; + virtual ~IMediaRecorderObserver() {} }; + } // namespace media } // namespace agora diff --git a/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaPlayerTypes.h b/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaPlayerTypes.h index d1bb17bb3..3beaba788 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaPlayerTypes.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/AgoraMediaPlayerTypes.h @@ -105,61 +105,61 @@ enum MEDIA_PLAYER_STATE { * @brief Player error code * */ -enum MEDIA_PLAYER_ERROR { +enum MEDIA_PLAYER_REASON { /** No error. */ - PLAYER_ERROR_NONE = 0, + PLAYER_REASON_NONE = 0, /** The parameter is invalid. */ - PLAYER_ERROR_INVALID_ARGUMENTS = -1, + PLAYER_REASON_INVALID_ARGUMENTS = -1, /** Internel error. */ - PLAYER_ERROR_INTERNAL = -2, + PLAYER_REASON_INTERNAL = -2, /** No resource. */ - PLAYER_ERROR_NO_RESOURCE = -3, + PLAYER_REASON_NO_RESOURCE = -3, /** Invalid media source. */ - PLAYER_ERROR_INVALID_MEDIA_SOURCE = -4, + PLAYER_REASON_INVALID_MEDIA_SOURCE = -4, /** The type of the media stream is unknown. */ - PLAYER_ERROR_UNKNOWN_STREAM_TYPE = -5, + PLAYER_REASON_UNKNOWN_STREAM_TYPE = -5, /** The object is not initialized. */ - PLAYER_ERROR_OBJ_NOT_INITIALIZED = -6, + PLAYER_REASON_OBJ_NOT_INITIALIZED = -6, /** The codec is not supported. */ - PLAYER_ERROR_CODEC_NOT_SUPPORTED = -7, + PLAYER_REASON_CODEC_NOT_SUPPORTED = -7, /** Invalid renderer. */ - PLAYER_ERROR_VIDEO_RENDER_FAILED = -8, + PLAYER_REASON_VIDEO_RENDER_FAILED = -8, /** An error occurs in the internal state of the player. */ - PLAYER_ERROR_INVALID_STATE = -9, + PLAYER_REASON_INVALID_STATE = -9, /** The URL of the media file cannot be found. */ - PLAYER_ERROR_URL_NOT_FOUND = -10, + PLAYER_REASON_URL_NOT_FOUND = -10, /** Invalid connection between the player and the Agora server. */ - PLAYER_ERROR_INVALID_CONNECTION_STATE = -11, + PLAYER_REASON_INVALID_CONNECTION_STATE = -11, /** The playback buffer is insufficient. */ - PLAYER_ERROR_SRC_BUFFER_UNDERFLOW = -12, + PLAYER_REASON_SRC_BUFFER_UNDERFLOW = -12, /** The audio mixing file playback is interrupted. */ - PLAYER_ERROR_INTERRUPTED = -13, + PLAYER_REASON_INTERRUPTED = -13, /** The SDK does not support this function. */ - PLAYER_ERROR_NOT_SUPPORTED = -14, + PLAYER_REASON_NOT_SUPPORTED = -14, /** The token has expired. */ - PLAYER_ERROR_TOKEN_EXPIRED = -15, + PLAYER_REASON_TOKEN_EXPIRED = -15, /** The ip has expired. */ - PLAYER_ERROR_IP_EXPIRED = -16, + PLAYER_REASON_IP_EXPIRED = -16, /** An unknown error occurs. */ - PLAYER_ERROR_UNKNOWN = -17, + PLAYER_REASON_UNKNOWN = -17, }; /** @@ -357,18 +357,60 @@ struct CacheStatistics { int64_t downloadSize; }; -struct PlayerUpdatedInfo { - /** playerId has value when user trigger interface of opening +/** + * @brief The real time statistics of the media stream being played. + * + */ +struct PlayerPlaybackStats { + /** Video fps. */ - Optional playerId; - - /** deviceId has value when user trigger interface of opening + int videoFps; + /** Video bitrate (Kbps). + */ + int videoBitrateInKbps; + /** Audio bitrate (Kbps). */ - Optional deviceId; + int audioBitrateInKbps; + /** Total bitrate (Kbps). + */ + int totalBitrateInKbps; +}; - /** cacheStatistics exist if you enable cache, triggered 1s at a time after openning url +/** + * @brief The updated information of media player. + * + */ +struct PlayerUpdatedInfo { + /** @technical preview */ - Optional cacheStatistics; + const char* internalPlayerUuid; + /** The device ID of the playback device. + */ + const char* deviceId; + /** Video height. + */ + int videoHeight; + /** Video width. + */ + int videoWidth; + /** Audio sample rate. + */ + int audioSampleRate; + /** The audio channel number. + */ + int audioChannels; + /** The bit number of each audio sample. + */ + int audioBitsPerSample; + + PlayerUpdatedInfo() + : internalPlayerUuid(NULL), + deviceId(NULL), + videoHeight(0), + videoWidth(0), + audioSampleRate(0), + audioChannels(0), + audioBitsPerSample(0) {} }; /** @@ -436,6 +478,17 @@ struct MediaSource { * - false: (Default) Disable cache. */ bool enableCache; + /** + * Determines whether to enable multi-track audio stream decoding. + * Then you can select multi audio track of the media file for playback or publish to channel + * + * @note + * If you use the selectMultiAudioTrack API, you must set enableMultiAudioTrack to true. + * + * - true: Enable MultiAudioTrack;. + * - false: (Default) Disable MultiAudioTrack;. + */ + bool enableMultiAudioTrack; /** * Determines whether the opened media resource is a stream through the Agora Broadcast Streaming Network(CDN). * - true: It is a stream through the Agora Broadcast Streaming Network. @@ -454,7 +507,7 @@ struct MediaSource { IMediaPlayerCustomDataProvider* provider; MediaSource() : url(NULL), uri(NULL), startPos(0), autoPlay(true), enableCache(false), - provider(NULL){ + enableMultiAudioTrack(false), provider(NULL){ } }; diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraH265Transcoder.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraH265Transcoder.h index 250d5ad82..b2f5c5b31 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraH265Transcoder.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraH265Transcoder.h @@ -71,10 +71,8 @@ enum H265_TRANSCODE_RESULT { */ class IH265TranscoderObserver { public: - virtual ~IH265TranscoderObserver() {}; - /** * Use to notify the result of invoking enableTranscode interface. * @param result Result of invoking enableTranscode interface. There are some processing advice below of result. @@ -119,9 +117,8 @@ class IH265TranscoderObserver { /** * The IH265Transcoder class */ -class IH265Transcoder: public RefCountInterface { +class IH265Transcoder : public RefCountInterface { public: - /** * Enable transcoding for a channel. * @param token The token for authentication. @@ -154,7 +151,6 @@ class IH265Transcoder: public RefCountInterface { * - <0: Failure. */ virtual int triggerTranscode(const char* token, const char* channel, uid_t uid) = 0; - /** * Register a IH265TranscoderObserver object. * @param observer IH265TranscoderObserver. @@ -163,7 +159,6 @@ class IH265Transcoder: public RefCountInterface { * - <0: Failure. */ virtual int registerTranscoderObserver(IH265TranscoderObserver *observer) = 0; - /** * Unregister a IH265TranscoderObserver object. * @param observer IH265TranscoderObserver. @@ -178,5 +173,6 @@ class IH265Transcoder: public RefCountInterface { virtual ~IH265Transcoder() {}; }; + } // namespace rtc } // namespace agora \ No newline at end of file diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraLog.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraLog.h index f3952163a..2fae3aa13 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraLog.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraLog.h @@ -75,7 +75,7 @@ const uint32_t MAX_LOG_SIZE = 20 * 1024 * 1024; // 20MB const uint32_t MIN_LOG_SIZE = 128 * 1024; // 128KB /** The default log size in kb */ -const uint32_t DEFAULT_LOG_SIZE_IN_KB = 1024; +const uint32_t DEFAULT_LOG_SIZE_IN_KB = 2048; /** Definition of LogConfiguration */ @@ -83,7 +83,7 @@ struct LogConfig { /**The log file path, default is NULL for default log path */ const char* filePath; - /** The log file size, KB , set 1024KB to use default log size + /** The log file size, KB , set 2048KB to use default log size */ uint32_t fileSizeInKB; /** The log level, set LOG_LEVEL_INFO to use default log level diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaEngine.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaEngine.h index e2f8e06a9..e57404a22 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaEngine.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaEngine.h @@ -58,7 +58,6 @@ class IMediaEngine { * - < 0: Failure. */ virtual int registerVideoFrameObserver(IVideoFrameObserver* observer) = 0; - /** * Registers a receiver object for the encoded video image. * @@ -73,7 +72,6 @@ class IMediaEngine { * - < 0: Failure. */ virtual int registerVideoEncodedFrameObserver(IVideoEncodedFrameObserver* observer) = 0; - /** * Pushes the external audio data to the app. * @@ -83,7 +81,8 @@ class IMediaEngine { * - 0: Success. * - < 0: Failure. */ - virtual int pushAudioFrame(IAudioFrameObserver::AudioFrame* frame, rtc::track_id_t trackId = 0) = 0; + + virtual int pushAudioFrame(IAudioFrameObserverBase::AudioFrame* frame, rtc::track_id_t trackId = 0) = 0; /** * Pulls the remote audio data. @@ -101,7 +100,7 @@ class IMediaEngine { * - 0: Success. * - < 0: Failure. */ - virtual int pullAudioFrame(IAudioFrameObserver::AudioFrame* frame) = 0; + virtual int pullAudioFrame(IAudioFrameObserverBase::AudioFrame* frame) = 0; /** * Sets the external video source. @@ -237,7 +236,6 @@ class IMediaEngine { * - < 0: Failure. */ virtual int pushVideoFrame(base::ExternalVideoFrame* frame, unsigned int videoTrackId = 0) = 0; - /** * Pushes the encoded video image to the app. * @param imageBuffer A pointer to the video image. @@ -248,10 +246,9 @@ class IMediaEngine { * - 0: Success. * - < 0: Failure. */ - virtual int pushEncodedVideoImage(const uint8_t* imageBuffer, size_t length, + virtual int pushEncodedVideoImage(const unsigned char* imageBuffer, size_t length, const agora::rtc::EncodedVideoFrameInfo& videoEncodedFrameInfo, unsigned int videoTrackId = 0) = 0; - /** * @hide For internal usage only */ diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayer.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayer.h index cb5c8738e..bd3c7597c 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayer.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayer.h @@ -158,13 +158,30 @@ class IMediaPlayer : public RefCountInterface { /** * Slect playback audio track of the media file - * @param speed the index of the audio track in meia file + * @param index the index of the audio track in media file * @return * - 0: Success. * - < 0: Failure. */ virtual int selectAudioTrack(int index) = 0; + /** + * Selects multi audio track of the media file for playback or publish to channel. + * @param playoutTrackIndex The index of the audio track in media file for local playback. + * @param publishTrackIndex The index of the audio track in the media file published to the remote. + * + * @note + * You can obtain the streamIndex of the audio track by calling getStreamInfo.. + * If you want to use selectMultiAudioTrack, you need to open the media file with openWithMediaSource and set enableMultiAudioTrack to true. + * + * @return + * - 0: Success. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. + * - -2: Invalid argument. Argument must be greater than or equal to zero. + * - -8: Invalid State.You must open the media file with openWithMediaSource and set enableMultiAudioTrack to true + */ + virtual int selectMultiAudioTrack(int playoutTrackIndex, int publishTrackIndex) = 0; + /** * change player option before play a file * @param key the key of the option param @@ -217,7 +234,7 @@ class IMediaPlayer : public RefCountInterface { * @brief Turn mute on or off * * @param muted Whether to mute on - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int mute(bool muted) = 0; @@ -225,7 +242,7 @@ class IMediaPlayer : public RefCountInterface { * @brief Get mute state * * @param[out] muted Whether is mute on - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int getMute(bool& muted) = 0; @@ -237,7 +254,7 @@ class IMediaPlayer : public RefCountInterface { * 0: mute; * 100: original volume; * 400: Up to 4 times the original volume (with built-in overflow protection). - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int adjustPlayoutVolume(int volume) = 0; @@ -245,21 +262,21 @@ class IMediaPlayer : public RefCountInterface { * @brief Get the current playback volume * * @param[out] volume - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int getPlayoutVolume(int& volume) = 0; /** * @brief adjust publish signal volume * - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int adjustPublishSignalVolume(int volume) = 0; /** * @brief get publish signal volume * - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int getPublishSignalVolume(int& volume) = 0; @@ -267,7 +284,7 @@ class IMediaPlayer : public RefCountInterface { * @brief Set video rendering view * * @param view view object, windows platform is HWND - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int setView(media::base::view_t view) = 0; @@ -275,7 +292,7 @@ class IMediaPlayer : public RefCountInterface { * @brief Set video display mode * * @param renderMode Video display mode - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int setRenderMode(media::base::RENDER_MODE_TYPE renderMode) = 0; @@ -337,7 +354,7 @@ class IMediaPlayer : public RefCountInterface { * @brief Register the player video observer * * @param observer observer object - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int registerVideoFrameObserver(media::base::IVideoFrameObserver* observer) = 0; @@ -345,7 +362,7 @@ class IMediaPlayer : public RefCountInterface { * @brief UnRegister the player video observer * * @param observer observer object - * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_ERROR + * @return int < 0 on behalf of an error, the value corresponds to one of MEDIA_PLAYER_REASON */ virtual int unregisterVideoFrameObserver(agora::media::base::IVideoFrameObserver* observer) = 0; diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayerSource.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayerSource.h index 8d1a95be0..00be02233 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayerSource.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaPlayerSource.h @@ -118,7 +118,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param [out] pos A reference to the current playback position (ms). * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int getPlayPosition(int64_t& pos) = 0; @@ -127,7 +127,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param [out] count The number of the media streams in the media source. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int getStreamCount(int64_t& count) = 0; @@ -137,7 +137,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param [out] info The detailed information of the media stream. See \ref media::base::PlayerStreamInfo "PlayerStreamInfo" for details. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int getStreamInfo(int64_t index, media::base::PlayerStreamInfo* info) = 0; @@ -149,7 +149,7 @@ class IMediaPlayerSource : public RefCountInterface { * - -1: Play the media file in a loop indefinitely, until {@link stop} is called. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int setLoopCount(int64_t loopCount) = 0; @@ -158,7 +158,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param speed The playback speed ref [50-400]. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int setPlaybackSpeed(int speed) = 0; @@ -167,17 +167,34 @@ class IMediaPlayerSource : public RefCountInterface { * @param index The index of the audio track in media file. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int selectAudioTrack(int64_t index) = 0; + /** + * Selects multi audio track of the media file for playback or publish to channel. + * @param playoutTrackIndex The index of the audio track in media file for local playback. + * @param publishTrackIndex The index of the audio track in the media file published to the remote. + * + * @note + * You can obtain the streamIndex of the audio track by calling getStreamInfo.. + * If you want to use selectMultiAudioTrack, you need to open the media file with openWithMediaSource and set enableMultiAudioTrack to true. + * + * @return + * - 0: Success. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. + * - -2: Invalid argument. Argument must be greater than or equal to zero. + * - -8: Invalid State.You must open the media file with openWithMediaSource and set enableMultiAudioTrack to true + */ + virtual int selectMultiAudioTrack(int playoutTrackIndex, int publishTrackIndex) = 0; + /** * Changes the player option before playing a file. * @param key The key of the option paramemter. * @param value The value of option parameter. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int setPlayerOption(const char* key, int64_t value) = 0; @@ -187,7 +204,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param value The value of option parameter. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int setPlayerOption(const char* key, const char* value) = 0; @@ -196,7 +213,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param filename The filename of the screenshot file. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int takeScreenshot(const char* filename) = 0; @@ -205,7 +222,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param index The index of the internal subtitles. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int selectInternalSubtitle(int64_t index) = 0; @@ -214,7 +231,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param url The URL of the subtitle file. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int setExternalSubtitle(const char* url) = 0; @@ -231,7 +248,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param observer The pointer to the IMediaPlayerSourceObserver object. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int registerPlayerSourceObserver(IMediaPlayerSourceObserver* observer) = 0; @@ -240,7 +257,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param observer The pointer to the IMediaPlayerSourceObserver object. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int unregisterPlayerSourceObserver(IMediaPlayerSourceObserver* observer) = 0; @@ -250,7 +267,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param observer The pointer to the {@link media::IAudioPcmFrameSink observer} object. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int registerAudioFrameObserver(media::IAudioPcmFrameSink* observer) = 0; @@ -259,7 +276,7 @@ class IMediaPlayerSource : public RefCountInterface { * @param observer The pointer to the {@link media::IAudioPcmFrameSink observer} object. * @return * - 0: Success. - * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * - < 0: Failure. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual int unregisterAudioFrameObserver(media::IAudioPcmFrameSink* observer) = 0; @@ -380,18 +397,19 @@ class IMediaPlayerSourceObserver { * * When the state of the playback changes, the SDK triggers this callback to report the new playback state and the reason or error for the change. * @param state The new playback state after change. See {@link media::base::MEDIA_PLAYER_STATE MEDIA_PLAYER_STATE}. - * @param ec The player's error code. See {@link media::base::MEDIA_PLAYER_ERROR MEDIA_PLAYER_ERROR}. + * @param reason The player's error code. See {@link media::base::MEDIA_PLAYER_REASON MEDIA_PLAYER_REASON}. */ virtual void onPlayerSourceStateChanged(media::base::MEDIA_PLAYER_STATE state, - media::base::MEDIA_PLAYER_ERROR ec) = 0; + media::base::MEDIA_PLAYER_REASON reason) = 0; /** * @brief Reports current playback progress. * * The callback occurs once every one second during the playback and reports the current playback progress. - * @param position Current playback progress (milisecond). + * @param positionMs Current playback progress (milisecond). + * @param timestampMs Current NTP(Network Time Protocol) time (milisecond). */ - virtual void onPositionChanged(int64_t position_ms) = 0; + virtual void onPositionChanged(int64_t positionMs, int64_t timestampMs) = 0; /** * @brief Reports the playback event. @@ -455,6 +473,24 @@ class IMediaPlayerSourceObserver { * @param info Include information of media player. */ virtual void onPlayerInfoUpdated(const media::base::PlayerUpdatedInfo& info) = 0; + + /** + * @brief Triggered every 1 second, reports the statistics of the files being cached. + * + * @param stats Cached file statistics. + */ + virtual void onPlayerCacheStats(const media::base::CacheStatistics& stats) { + (void)stats; + } + + /** + * @brief Triggered every 1 second, reports the statistics of the media stream being played. + * + * @param stats The statistics of the media stream. + */ + virtual void onPlayerPlaybackStats(const media::base::PlayerPlaybackStats& stats) { + (void)stats; + } /** * @brief Triggered every 200 millisecond ,update player current volume range [0,255] diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaRecorder.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaRecorder.h index 6a4765f31..17375607c 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaRecorder.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMediaRecorder.h @@ -15,6 +15,7 @@ namespace rtc { class IMediaRecorder : public RefCountInterface { protected: virtual ~IMediaRecorder() {} + public: /** * Registers the IMediaRecorderObserver object. @@ -62,8 +63,7 @@ class IMediaRecorder : public RefCountInterface { * - The specified path of the recording file exists and is writable. * - The specified format of the recording file is supported. * - The maximum recording duration is correctly set. - * - During remote recording, ensure the channel ID and user ID After calling \ref - * IRtcEngine::createMediaRecorder did join the channel. + * - During remote recording, ensure the user whose media streams you want record did join the channel. * - `-4(ERR_NOT_SUPPORTED)`: IRtcEngine does not support the request due to one of the following reasons: * - The recording is ongoing. * - The recording stops because an error occurs. diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMusicContentCenter.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMusicContentCenter.h index 1889bbdea..c3e4a5bc3 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMusicContentCenter.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraMusicContentCenter.h @@ -18,63 +18,63 @@ typedef enum /** * 0: No error occurs and preload succeeds. */ - kPreloadStatusCompleted = 0, + kPreloadStateCompleted = 0, /** * 1: A general error occurs. */ - kPreloadStatusFailed = 1, + kPreloadStateFailed = 1, /** * 2: The media file is preloading. */ - kPreloadStatusPreloading = 2, + kPreloadStatePreloading = 2, /** * 3: The media file is removed. */ - kPreloadStatusRemoved = 3, -} PreloadStatusCode; + kPreloadStateRemoved = 3, +} PreloadState; typedef enum { /** * 0: No error occurs and request succeeds. */ - kMusicContentCenterStatusOk = 0, + kMusicContentCenterReasonOk = 0, /** * 1: A general error occurs. */ - kMusicContentCenterStatusErr = 1, + kMusicContentCenterReasonError = 1, /** * 2: The gateway error. There are several possible reasons: * - Token is expired. Check if your token is expired. * - Token is invalid. Check the type of token you passed in. * - Network error. Check your network. */ - kMusicContentCenterStatusErrGateway = 2, + kMusicContentCenterReasonGateway = 2, /** * 3: Permission and resource error. There are several possible reasons: * - Your appid may not have the mcc permission. Please contact technical support * - The resource may not exist. Please contact technical support */ - kMusicContentCenterStatusErrPermissionAndResource = 3, + kMusicContentCenterReasonPermissionAndResource = 3, /** * 4: Internal data parse error. Please contact technical support */ - kMusicContentCenterStatusErrInternalDataParse = 4, + kMusicContentCenterReasonInternalDataParse = 4, /** * 5: Music loading error. Please contact technical support */ - kMusicContentCenterStatusErrMusicLoading = 5, + kMusicContentCenterReasonMusicLoading = 5, /** * 6: Music decryption error. Please contact technical support */ - kMusicContentCenterStatusErrMusicDecryption = 6, + kMusicContentCenterReasonMusicDecryption = 6, /** * 7: Http internal error. Please retry later. */ - kMusicContentCenterStatusErrHttpInternalError = 7, -} MusicContentCenterStatusCode; + kMusicContentCenterReasonHttpInternalError = 7, +} MusicContentCenterStateReason; typedef struct { @@ -234,18 +234,18 @@ class IMusicContentCenterEventHandler { * * @param requestId The request id is same as that returned by getMusicCharts. * @param result The result of music chart collection - * @param errorCode The status of the request. See MusicContentCenterStatusCode + * @param reason The status of the request. See MusicContentCenterStateReason */ - virtual void onMusicChartsResult(const char* requestId, agora_refptr result, MusicContentCenterStatusCode errorCode) = 0; + virtual void onMusicChartsResult(const char* requestId, agora_refptr result, MusicContentCenterStateReason reason) = 0; /** * Music collection, occurs when getMusicCollectionByMusicChartId or searchMusic method is called. * * @param requestId The request id is same as that returned by getMusicCollectionByMusicChartId or searchMusic * @param result The result of music collection - * @param errorCode The status of the request. See MusicContentCenterStatusCode + * @param reason The status of the request. See MusicContentCenterStateReason */ - virtual void onMusicCollectionResult(const char* requestId, agora_refptr result, MusicContentCenterStatusCode errorCode) = 0; + virtual void onMusicCollectionResult(const char* requestId, agora_refptr result, MusicContentCenterStateReason reason) = 0; /** * Lyric url callback of getLyric, occurs when getLyric is called @@ -253,9 +253,9 @@ class IMusicContentCenterEventHandler { * @param requestId The request id is same as that returned by getLyric * @param songCode Song code * @param lyricUrl The lyric url of this music - * @param errorCode The status of the request. See MusicContentCenterStatusCode + * @param reason The status of the request. See MusicContentCenterStateReason */ - virtual void onLyricResult(const char* requestId, int64_t songCode, const char* lyricUrl, MusicContentCenterStatusCode errorCode) = 0; + virtual void onLyricResult(const char* requestId, int64_t songCode, const char* lyricUrl, MusicContentCenterStateReason reason) = 0; /** * Simple info callback of getSongSimpleInfo, occurs when getSongSimpleInfo is called @@ -263,9 +263,9 @@ class IMusicContentCenterEventHandler { * @param requestId The request id is same as that returned by getSongSimpleInfo. * @param songCode Song code * @param simpleInfo The metadata of the music. - * @param errorCode The status of the request. See MusicContentCenterStatusCode + * @param reason The status of the request. See MusicContentCenterStateReason */ - virtual void onSongSimpleInfoResult(const char* requestId, int64_t songCode, const char* simpleInfo, MusicContentCenterStatusCode errorCode) = 0; + virtual void onSongSimpleInfoResult(const char* requestId, int64_t songCode, const char* simpleInfo, MusicContentCenterStateReason reason) = 0; /** * Preload process callback, occurs when preload is called @@ -274,10 +274,10 @@ class IMusicContentCenterEventHandler { * @param songCode Song code * @param percent Preload progress (0 ~ 100) * @param lyricUrl The lyric url of this music - * @param status Preload status; see PreloadStatusCode. - * @param errorCode The status of the request. See MusicContentCenterStatusCode + * @param state Preload state; see PreloadState. + * @param reason The status of the request. See MusicContentCenterStateReason */ - virtual void onPreLoadEvent(const char* requestId, int64_t songCode, int percent, const char* lyricUrl, PreloadStatusCode status, MusicContentCenterStatusCode errorCode) = 0; + virtual void onPreLoadEvent(const char* requestId, int64_t songCode, int percent, const char* lyricUrl, PreloadState state, MusicContentCenterStateReason reason) = 0; virtual ~IMusicContentCenterEventHandler() {}; }; diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraParameter.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraParameter.h index 70ea5939e..3114a11d0 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraParameter.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraParameter.h @@ -15,6 +15,7 @@ */ #pragma once // NOLINT(build/header_guard) +#include "AgoraRefPtr.h" // external key /** @@ -115,6 +116,7 @@ * set the video codec type, such as "H264", "JPEG" */ #define KEY_RTC_VIDEO_CODEC_TYPE "engine.video.codec_type" +#define KEY_RTC_VIDEO_MINOR_STREAM_CODEC_INDEX "engine.video.minor_stream_codec_index" #define KEY_RTC_VIDEO_CODEC_INDEX "che.video.videoCodecIndex" /** * only use average QP for quality scaling @@ -144,7 +146,7 @@ typedef CopyableAutoPtr AString; namespace base { -class IAgoraParameter { +class IAgoraParameter : public RefCountInterface { public: /** * release the resource @@ -300,6 +302,7 @@ class IAgoraParameter { virtual int convertPath(const char* filePath, agora::util::AString& value) = 0; + protected: virtual ~IAgoraParameter() {} }; diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRhythmPlayer.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRhythmPlayer.h index b39322a2d..e2e00ac70 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRhythmPlayer.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRhythmPlayer.h @@ -35,19 +35,19 @@ enum RHYTHM_PLAYER_STATE_TYPE { }; /** - The error codes of the rhythm player. + The reason codes of the rhythm player. */ -enum RHYTHM_PLAYER_ERROR_TYPE { +enum RHYTHM_PLAYER_REASON { /** 0: The rhythm player works well. */ - RHYTHM_PLAYER_ERROR_OK = 0, + RHYTHM_PLAYER_REASON_OK = 0, /** 1: The rhythm player occurs a internal error. */ - RHYTHM_PLAYER_ERROR_FAILED = 1, + RHYTHM_PLAYER_REASON_FAILED = 1, /** 801: The rhythm player can not open the file. */ - RHYTHM_PLAYER_ERROR_CAN_NOT_OPEN = 801, + RHYTHM_PLAYER_REASON_CAN_NOT_OPEN = 801, /** 802: The rhythm player can not play the file. */ - RHYTHM_PLAYER_ERROR_CAN_NOT_PLAY, + RHYTHM_PLAYER_REASON_CAN_NOT_PLAY, /** 803: The file duration over the limit. The file duration limit is 1.2 seconds */ - RHYTHM_PLAYER_ERROR_FILE_OVER_DURATION_LIMIT, + RHYTHM_PLAYER_REASON_FILE_OVER_DURATION_LIMIT, }; /** diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h index a54f24395..719a25f6c 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h @@ -15,6 +15,9 @@ #include "IAgoraH265Transcoder.h" namespace agora { +namespace rtm { +class IStreamChannel; +} namespace rtc { template @@ -257,87 +260,87 @@ struct RtcConnection; */ struct LocalVideoStats { - /** - * ID of the local user. - */ - uid_t uid; - /** The actual bitrate (Kbps) while sending the local video stream. - * @note This value does not include the bitrate for resending the video after packet loss. - */ - int sentBitrate; - /** The actual frame rate (fps) while sending the local video stream. - * @note This value does not include the frame rate for resending the video after packet loss. - */ - int sentFrameRate; - /** The capture frame rate (fps) of the local video. - */ - int captureFrameRate; - /** The width of the capture frame (px). - */ - int captureFrameWidth; - /** The height of the capture frame (px). - */ - int captureFrameHeight; - /** - * The regulated frame rate of capture frame rate according to video encoder configuration. - */ - int regulatedCaptureFrameRate; - /** - * The regulated frame width (pixel) of capture frame width according to video encoder configuration. - */ - int regulatedCaptureFrameWidth; - /** - * The regulated frame height (pixel) of capture frame height according to video encoder configuration. - */ - int regulatedCaptureFrameHeight; - /** The output frame rate (fps) of the local video encoder. - */ - int encoderOutputFrameRate; - /** The width of the encoding frame (px). - */ - int encodedFrameWidth; - /** The height of the encoding frame (px). - */ - int encodedFrameHeight; - /** The output frame rate (fps) of the local video renderer. - */ - int rendererOutputFrameRate; - /** The target bitrate (Kbps) of the current encoder. This is an estimate made by the SDK based on the current network conditions. - */ - int targetBitrate; - /** The target frame rate (fps) of the current encoder. - */ - int targetFrameRate; - /** Quality adaption of the local video stream in the reported interval (based on the target frame - * rate and target bitrate). See #QUALITY_ADAPT_INDICATION. - */ - QUALITY_ADAPT_INDICATION qualityAdaptIndication; - /** The bitrate (Kbps) while encoding the local video stream. - * @note This value does not include the bitrate for resending the video after packet loss. - */ - int encodedBitrate; - /** The number of the sent video frames, represented by an aggregate value. - */ - int encodedFrameCount; - /** The codec type of the local video. See #VIDEO_CODEC_TYPE. - */ - VIDEO_CODEC_TYPE codecType; - /** - * The video packet loss rate (%) from the local client to the Agora server before applying the anti-packet loss strategies. - */ - unsigned short txPacketLossRate; - /** The brightness level of the video image captured by the local camera. See #CAPTURE_BRIGHTNESS_LEVEL_TYPE. - */ - CAPTURE_BRIGHTNESS_LEVEL_TYPE captureBrightnessLevel; - /** - * Whether we send dual stream now. - */ - bool dualStreamEnabled; - /** The hwEncoderAccelerating of the local video: - * - software = 0. - * - hardware = 1. - */ - int hwEncoderAccelerating; + /** + * ID of the local user. + */ + uid_t uid; + /** The actual bitrate (Kbps) while sending the local video stream. + * @note This value does not include the bitrate for resending the video after packet loss. + */ + int sentBitrate; + /** The actual frame rate (fps) while sending the local video stream. + * @note This value does not include the frame rate for resending the video after packet loss. + */ + int sentFrameRate; + /** The capture frame rate (fps) of the local video. + */ + int captureFrameRate; + /** The width of the capture frame (px). + */ + int captureFrameWidth; + /** The height of the capture frame (px). + */ + int captureFrameHeight; + /** + * The regulated frame rate of capture frame rate according to video encoder configuration. + */ + int regulatedCaptureFrameRate; + /** + * The regulated frame width (pixel) of capture frame width according to video encoder configuration. + */ + int regulatedCaptureFrameWidth; + /** + * The regulated frame height (pixel) of capture frame height according to video encoder configuration. + */ + int regulatedCaptureFrameHeight; + /** The output frame rate (fps) of the local video encoder. + */ + int encoderOutputFrameRate; + /** The width of the encoding frame (px). + */ + int encodedFrameWidth; + /** The height of the encoding frame (px). + */ + int encodedFrameHeight; + /** The output frame rate (fps) of the local video renderer. + */ + int rendererOutputFrameRate; + /** The target bitrate (Kbps) of the current encoder. This is an estimate made by the SDK based on the current network conditions. + */ + int targetBitrate; + /** The target frame rate (fps) of the current encoder. + */ + int targetFrameRate; + /** Quality adaption of the local video stream in the reported interval (based on the target frame + * rate and target bitrate). See #QUALITY_ADAPT_INDICATION. + */ + QUALITY_ADAPT_INDICATION qualityAdaptIndication; + /** The bitrate (Kbps) while encoding the local video stream. + * @note This value does not include the bitrate for resending the video after packet loss. + */ + int encodedBitrate; + /** The number of the sent video frames, represented by an aggregate value. + */ + int encodedFrameCount; + /** The codec type of the local video. See #VIDEO_CODEC_TYPE. + */ + VIDEO_CODEC_TYPE codecType; + /** + * The video packet loss rate (%) from the local client to the Agora server before applying the anti-packet loss strategies. + */ + unsigned short txPacketLossRate; + /** The brightness level of the video image captured by the local camera. See #CAPTURE_BRIGHTNESS_LEVEL_TYPE. + */ + CAPTURE_BRIGHTNESS_LEVEL_TYPE captureBrightnessLevel; + /** + * Whether we send dual stream now. + */ + bool dualStreamEnabled; + /** The hwEncoderAccelerating of the local video: + * - software = 0. + * - hardware = 1. + */ + int hwEncoderAccelerating; }; /** @@ -441,25 +444,25 @@ struct RemoteAudioStats */ unsigned int rxAudioBytes; - RemoteAudioStats() : - uid(0), - quality(0), - networkTransportDelay(0), - jitterBufferDelay(0), - audioLossRate(0), - numChannels(0), - receivedSampleRate(0), - receivedBitrate(0), - totalFrozenTime(0), - frozenRate(0), - mosValue(0), - frozenRateByCustomPlcCount(0), - plcCount(0), - totalActiveTime(0), - publishDuration(0), - qoeQuality(0), - qualityChangedReason(0), - rxAudioBytes(0) {} + RemoteAudioStats() + : uid(0), + quality(0), + networkTransportDelay(0), + jitterBufferDelay(0), + audioLossRate(0), + numChannels(0), + receivedSampleRate(0), + receivedBitrate(0), + totalFrozenTime(0), + frozenRate(0), + mosValue(0), + frozenRateByCustomPlcCount(0), + plcCount(0), + totalActiveTime(0), + publishDuration(0), + qoeQuality(0), + qualityChangedReason(0), + rxAudioBytes(0) {} }; /** @@ -575,8 +578,7 @@ struct VideoCompositingLayout { */ double alpha; - media::base::RENDER_MODE_TYPE - renderMode; // RENDER_MODE_HIDDEN: Crop, RENDER_MODE_FIT: Zoom to fit + media::base::RENDER_MODE_TYPE renderMode; // RENDER_MODE_HIDDEN: Crop, RENDER_MODE_FIT: Zoom to fit Region() : uid(0), @@ -619,10 +621,10 @@ struct VideoCompositingLayout { VideoCompositingLayout() : canvasWidth(0), canvasHeight(0), - backgroundColor(NULL), + backgroundColor(OPTIONAL_NULLPTR), regions(NULL), regionCount(0), - appData(NULL), + appData(OPTIONAL_NULLPTR), appDataLength(0) {} }; @@ -1033,7 +1035,7 @@ struct ChannelMediaOptions { * - `false`: (Default) Do not publish the video track of the secondary camera capturer. */ Optional publishSecondaryCameraTrack; - /** + /** * Whether to publish the video of the third camera track. * - `true`: Publish the video track of the third camera capturer. * - `false`: (Default) Do not publish the video track of the third camera capturer. @@ -1078,7 +1080,7 @@ struct ChannelMediaOptions { * - false: (Default) Do not publish the captured video from the secondary screen. */ Optional publishSecondaryScreenTrack; - /** + /** * Whether to publish the captured video from the third screen: * - true: Publish the captured video from the third screen. * - false: (Default) Do not publish the captured video from the third screen. @@ -1132,6 +1134,12 @@ struct ChannelMediaOptions { * - `false`: (Default) Do not publish the local transcoded video track. */ Optional publishTranscodedVideoTrack; + /** + * Whether to publish the local mixed track. + * - `true`: Publish the audio track of local mixed track. + * - `false`: (Default) Do not publish the local mixed track. + */ + Optional publishMixedAudioTrack; /** * Whether to automatically subscribe to all remote audio streams when the user joins a channel: * - `true`: (Default) Subscribe to all remote audio streams. @@ -1235,7 +1243,7 @@ struct ChannelMediaOptions { SET_FROM(publishCameraTrack); SET_FROM(publishSecondaryCameraTrack); SET_FROM(publishThirdCameraTrack); - SET_FROM(publishFourthCameraTrack); + SET_FROM(publishFourthCameraTrack); SET_FROM(publishMicrophoneTrack); #if defined(__ANDROID__) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) SET_FROM(publishScreenCaptureVideo); @@ -1247,6 +1255,7 @@ struct ChannelMediaOptions { SET_FROM(publishFourthScreenTrack); #endif SET_FROM(publishTranscodedVideoTrack); + SET_FROM(publishMixedAudioTrack); SET_FROM(publishCustomAudioTrack); SET_FROM(publishCustomAudioTrackId); SET_FROM(publishCustomVideoTrack); @@ -1293,6 +1302,7 @@ struct ChannelMediaOptions { ADD_COMPARE(publishFourthScreenTrack); #endif ADD_COMPARE(publishTranscodedVideoTrack); + ADD_COMPARE(publishMixedAudioTrack); ADD_COMPARE(publishCustomAudioTrack); ADD_COMPARE(publishCustomAudioTrackId); ADD_COMPARE(publishCustomVideoTrack); @@ -1342,6 +1352,7 @@ struct ChannelMediaOptions { REPLACE_BY(publishFourthScreenTrack); #endif REPLACE_BY(publishTranscodedVideoTrack); + REPLACE_BY(publishMixedAudioTrack); REPLACE_BY(publishCustomAudioTrack); REPLACE_BY(publishCustomAudioTrackId); REPLACE_BY(publishCustomVideoTrack); @@ -1512,8 +1523,7 @@ class IRtcEngineEventHandler { @param delay The network delay (ms) from the sender to the receiver, including the delay caused by audio sampling pre-processing, network transmission, and network jitter buffering. @param lost The audio packet loss rate (%) from the sender to the receiver. */ - virtual void onAudioQuality(uid_t uid, int quality, unsigned short delay, - unsigned short lost) __deprecated { + virtual void onAudioQuality(uid_t uid, int quality, unsigned short delay, unsigned short lost) __deprecated { (void)uid; (void)quality; (void)delay; @@ -1615,6 +1625,7 @@ class IRtcEngineEventHandler { If the startAudioMixing method call fails, the SDK returns the error code 701. */ virtual void onAudioMixingFinished() __deprecated {} + /** * Occurs when the playback of the local audio effect file finishes. * @@ -1782,7 +1793,7 @@ class IRtcEngineEventHandler { (void)width; (void)height; (void)rotation; - } + } /** Occurs when the local video stream state changes. * @@ -1792,13 +1803,13 @@ class IRtcEngineEventHandler { * you to troubleshoot issues when exceptions occur. * * The SDK triggers the onLocalVideoStateChanged callback with the state code of `LOCAL_VIDEO_STREAM_STATE_FAILED` - * and error code of `LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE` in the following situations: + * and error code of `LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE` in the following situations: * - The app switches to the background, and the system gets the camera resource. * - The camera starts normally, but does not output video for four consecutive seconds. * * When the camera outputs the captured video frames, if the video frames are the same for 15 * consecutive frames, the SDK triggers the `onLocalVideoStateChanged` callback with the state code - * of `LOCAL_VIDEO_STREAM_STATE_CAPTURING` and error code of `LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE`. + * of `LOCAL_VIDEO_STREAM_STATE_CAPTURING` and error code of `LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE`. * Note that the video frame duplication detection is only available for video frames with a resolution * greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. * @@ -1808,12 +1819,12 @@ class IRtcEngineEventHandler { * * @param source The video source type: #VIDEO_SOURCE_TYPE. * @param state The state of the local video. See #LOCAL_VIDEO_STREAM_STATE. - * @param error The detailed error information. See #LOCAL_VIDEO_STREAM_ERROR. + * @param reason The detailed error information. See #LOCAL_VIDEO_STREAM_REASON. */ - virtual void onLocalVideoStateChanged(VIDEO_SOURCE_TYPE source, LOCAL_VIDEO_STREAM_STATE state, LOCAL_VIDEO_STREAM_ERROR error) { + virtual void onLocalVideoStateChanged(VIDEO_SOURCE_TYPE source, LOCAL_VIDEO_STREAM_STATE state, LOCAL_VIDEO_STREAM_REASON reason) { (void)source; (void)state; - (void)error; + (void)reason; } /** @@ -1836,13 +1847,13 @@ class IRtcEngineEventHandler { /** Occurs when the renderer receives the first frame of the remote video. * - * @param userId The user ID of the remote user sending the video stream. + * @param uid The user ID of the remote user sending the video stream. * @param width The width (px) of the video frame. * @param height The height (px) of the video stream. * @param elapsed The time elapsed (ms) from the local user calling `joinChannel` until the SDK triggers this callback. */ - virtual void onFirstRemoteVideoFrame(uid_t userId, int width, int height, int elapsed) { - (void)userId; + virtual void onFirstRemoteVideoFrame(uid_t uid, int width, int height, int elapsed) { + (void)uid; (void)width; (void)height; (void)elapsed; @@ -1922,8 +1933,8 @@ class IRtcEngineEventHandler { - true: The remote user has paused sending the video stream. - false: The remote user has resumed sending the video stream. */ - virtual void onUserMuteVideo(uid_t userId, bool muted) { - (void)userId; + virtual void onUserMuteVideo(uid_t uid, bool muted) { + (void)uid; (void)muted; } @@ -1945,11 +1956,11 @@ class IRtcEngineEventHandler { } /** - * Occurs when the remote user state is updated. + * Occurs when the remote user audio or video state is updated. * @param uid The uid of the remote user. - * @param state The remote user state: #REMOTE_USER_STATE. + * @param state The remote user's audio or video state: #REMOTE_USER_STATE. */ - virtual void onUserStateChanged(uid_t uid, uint32_t state) { + virtual void onUserStateChanged(uid_t uid, REMOTE_USER_STATE state) { (void)uid; (void)state; } @@ -1969,17 +1980,6 @@ class IRtcEngineEventHandler { (void)enabled; } - /** Reports the statistics of the local audio stream. - * - * The SDK triggers this callback once every two seconds. - * - * @param stats The statistics of the local audio stream. - * See LocalAudioStats. - */ - virtual void onLocalAudioStats(const LocalAudioStats& stats) { - (void)stats; - } - /** Reports the statistics of the audio stream from each remote user/host. The SDK triggers this callback once every two seconds for each remote user who is sending audio @@ -1991,6 +1991,17 @@ class IRtcEngineEventHandler { (void)stats; } + /** Reports the statistics of the local audio stream. + * + * The SDK triggers this callback once every two seconds. + * + * @param stats The statistics of the local audio stream. + * See LocalAudioStats. + */ + virtual void onLocalAudioStats(const LocalAudioStats& stats) { + (void)stats; + } + /** Reports the statistics of the local video stream. * * The SDK triggers this callback once every two seconds for each @@ -2020,12 +2031,14 @@ class IRtcEngineEventHandler { virtual void onRemoteVideoStats(const RemoteVideoStats& stats) { (void)stats; } + /** * Occurs when the camera turns on and is ready to capture the video. * @deprecated Use `LOCAL_VIDEO_STREAM_STATE_CAPTURING(1)` in onLocalVideoStateChanged instead. * This callback indicates that the camera has been successfully turned on and you can start to capture video. */ virtual void onCameraReady() __deprecated {} + /** * Occurs when the camera focus area changes. * @@ -2124,11 +2137,11 @@ class IRtcEngineEventHandler { callback. @param state The state code. See #RHYTHM_PLAYER_STATE_TYPE. - @param errorCode The error code. See #RHYTHM_PLAYER_ERROR_TYPE. + @param reason The error code. See #RHYTHM_PLAYER_REASON. */ - virtual void onRhythmPlayerStateChanged(RHYTHM_PLAYER_STATE_TYPE state, RHYTHM_PLAYER_ERROR_TYPE errorCode) { + virtual void onRhythmPlayerStateChanged(RHYTHM_PLAYER_STATE_TYPE state, RHYTHM_PLAYER_REASON reason) { (void)state; - (void)errorCode; + (void)reason; } /** @@ -2164,14 +2177,14 @@ class IRtcEngineEventHandler { * The SDK triggers this callback when the user receives the data stream that another user sends * by calling the \ref agora::rtc::IRtcEngine::sendStreamMessage "sendStreamMessage" method. * - * @param userId ID of the user who sends the data stream. + * @param uid ID of the user who sends the data stream. * @param streamId The ID of the stream data. * @param data The data stream. * @param length The length (byte) of the data stream. * @param sentTs The time when the data stream sent. */ - virtual void onStreamMessage(uid_t userId, int streamId, const char* data, size_t length, uint64_t sentTs) { - (void)userId; + virtual void onStreamMessage(uid_t uid, int streamId, const char* data, size_t length, uint64_t sentTs) { + (void)uid; (void)streamId; (void)data; (void)length; @@ -2183,15 +2196,15 @@ class IRtcEngineEventHandler { * The SDK triggers this callback when the user fails to receive the data stream that another user sends * by calling the \ref agora::rtc::IRtcEngine::sendStreamMessage "sendStreamMessage" method. * - * @param userId ID of the user who sends the data stream. + * @param uid ID of the user who sends the data stream. * @param streamId The ID of the stream data. * @param code The error code. * @param missed The number of lost messages. * @param cached The number of incoming cached messages when the data stream is * interrupted. */ - virtual void onStreamMessageError(uid_t userId, int streamId, int code, int missed, int cached) { - (void)userId; + virtual void onStreamMessageError(uid_t uid, int streamId, int code, int missed, int cached) { + (void)uid; (void)streamId; (void)code; (void)missed; @@ -2247,18 +2260,6 @@ class IRtcEngineEventHandler { (void)elapsed; } - /** Occurs when the SDK receives the first audio frame from a specific remote user. - * @deprecated Use `onRemoteAudioStateChanged` instead. - * - * @param uid ID of the remote user. - * @param elapsed The time elapsed (ms) from the loca user calling `joinChannel` - * until this callback is triggered. - */ - virtual void onFirstRemoteAudioFrame(uid_t uid, int elapsed) __deprecated { - (void)uid; - (void)elapsed; - } - /** * Occurs when the SDK decodes the first remote audio frame for playback. * @@ -2280,6 +2281,18 @@ class IRtcEngineEventHandler { (void)elapsed; } + /** Occurs when the SDK receives the first audio frame from a specific remote user. + * @deprecated Use `onRemoteAudioStateChanged` instead. + * + * @param uid ID of the remote user. + * @param elapsed The time elapsed (ms) from the loca user calling `joinChannel` + * until this callback is triggered. + */ + virtual void onFirstRemoteAudioFrame(uid_t uid, int elapsed) __deprecated { + (void)uid; + (void)elapsed; + } + /** Occurs when the local audio state changes. * * When the state of the local audio stream changes (including the state of the audio capture and encoding), the SDK @@ -2291,12 +2304,12 @@ class IRtcEngineEventHandler { * parameter for details. * * @param state State of the local audio. See #LOCAL_AUDIO_STREAM_STATE. - * @param error The error information of the local audio. - * See #LOCAL_AUDIO_STREAM_ERROR. + * @param reason The reason information of the local audio. + * See #LOCAL_AUDIO_STREAM_REASON. */ - virtual void onLocalAudioStateChanged(LOCAL_AUDIO_STREAM_STATE state, LOCAL_AUDIO_STREAM_ERROR error) { + virtual void onLocalAudioStateChanged(LOCAL_AUDIO_STREAM_STATE state, LOCAL_AUDIO_STREAM_REASON reason) { (void)state; - (void)error; + (void)reason; } /** Occurs when the remote audio state changes. @@ -2335,12 +2348,16 @@ class IRtcEngineEventHandler { * * @param userId The ID of the active speaker. A `uid` of 0 means the local user. */ - virtual void onActiveSpeaker(uid_t userId) { (void)userId; } + virtual void onActiveSpeaker(uid_t uid) { + (void)uid; + } + /** Reports result of content inspection. * * @param result The result of content inspection: #CONTENT_INSPECT_RESULT. */ virtual void onContentInspectResult(media::CONTENT_INSPECT_RESULT result) { (void)result; } + /** Reports the result of taking a video snapshot. * * After a successful `takeSnapshot` method call, the SDK triggers this callback to report whether the snapshot is @@ -2365,6 +2382,7 @@ class IRtcEngineEventHandler { (void)height; (void)errCode; } + /** * Occurs when the user role switches in the interactive live streaming. * @@ -2377,6 +2395,7 @@ class IRtcEngineEventHandler { (void)newRole; (void)newRoleOptions; } + /** * Occurs when the user role in a Live-Broadcast channel fails to switch, for example, from a broadcaster * to an audience or vice versa. @@ -2388,6 +2407,7 @@ class IRtcEngineEventHandler { (void)reason; (void)currentRole; } + /** Occurs when the audio device volume changes. @param deviceType The device type, see #MEDIA_DEVICE_TYPE @param volume The volume of the audio device. @@ -2410,13 +2430,13 @@ class IRtcEngineEventHandler { * * @param url The URL address where the state of the media push changes. * @param state The current state of the media push: #RTMP_STREAM_PUBLISH_STATE. - * @param errCode The detailed error information for the media push: #RTMP_STREAM_PUBLISH_ERROR_TYPE. + * @param reason The detailed error information for the media push: #RTMP_STREAM_PUBLISH_REASON. */ virtual void onRtmpStreamingStateChanged(const char* url, RTMP_STREAM_PUBLISH_STATE state, - RTMP_STREAM_PUBLISH_ERROR_TYPE errCode) { + RTMP_STREAM_PUBLISH_REASON reason) { (void)url; (void)state; - (void)errCode; + (void)reason; } /** Reports events during the media push. @@ -2456,7 +2476,6 @@ class IRtcEngineEventHandler { */ virtual void onAudioRoutingChanged(int routing) { (void)routing; } - /** * Occurs when the state of the media stream relay changes. * @@ -2493,32 +2512,6 @@ class IRtcEngineEventHandler { (void)code; } - /** - * Reports events during the media stream relay. - * @deprecated v4.2.0. This callback is not recommended and will be removed in future releases. - * @param code The event code for media stream relay: - * - `RELAY_EVENT_NETWORK_DISCONNECTED(0)`: The user disconnects from the server due to poor - * network connections. - * - `RELAY_EVENT_NETWORK_CONNECTED(1)`: The network reconnects. - * - `RELAY_EVENT_PACKET_JOINED_SRC_CHANNEL(2)`: The user joins the source channel. - * - `RELAY_EVENT_PACKET_JOINED_DEST_CHANNEL(3)`: The user joins the destination channel. - * - `RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL(4)`: The SDK starts relaying the media stream to the - * destination channel. - * - `RELAY_EVENT_PACKET_RECEIVED_VIDEO_FROM_SRC(5)`: The server receives the video stream from - * the source channel. - * - `RELAY_EVENT_PACKET_RECEIVED_AUDIO_FROM_SRC(6)`: The server receives the audio stream from - * the source channel. - * - `RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL(7)`: The destination channel is updated. - * - `RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_REFUSED(8)`: The destination channel update fails due - * to internal reasons. Deprecated from 4.1.0 - * - `RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE(9)`: The destination channel does not - * change, which means that the destination channel fails to be updated. - * - `RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_IS_NULL(10)`: The destination channel name is NULL. - * - `RELAY_EVENT_VIDEO_PROFILE_UPDATE(11)`: The video profile is sent to the server. - */ - virtual void onChannelMediaRelayEvent(int code) __deprecated { - (void)code; - } /** * Occurs when the published media stream falls back to an audio-only stream due to poor network conditions or * switches back to video stream after the network conditions improve. @@ -2535,6 +2528,7 @@ class IRtcEngineEventHandler { virtual void onLocalPublishFallbackToAudioOnly(bool isFallbackOrRecover) { (void)isFallbackOrRecover; } + /** * Occurs when the remote media stream falls back to audio-only stream due to poor network conditions or * switches back to video stream after the network conditions improve. @@ -2571,8 +2565,7 @@ class IRtcEngineEventHandler { @param rxKBitRate Received bitrate (Kbps) of the audio packet sent from the remote user. */ - virtual void onRemoteAudioTransportStats(uid_t uid, unsigned short delay, unsigned short lost, - unsigned short rxKBitRate) __deprecated { + virtual void onRemoteAudioTransportStats(uid_t uid, unsigned short delay, unsigned short lost, unsigned short rxKBitRate) __deprecated { (void)uid; (void)delay; (void)lost; @@ -2596,8 +2589,7 @@ class IRtcEngineEventHandler { @param rxKBitRate The bitrate (Kbps) of the video packet sent from the remote user. */ - virtual void onRemoteVideoTransportStats(uid_t uid, unsigned short delay, unsigned short lost, - unsigned short rxKBitRate) __deprecated { + virtual void onRemoteVideoTransportStats(uid_t uid, unsigned short delay, unsigned short lost, unsigned short rxKBitRate) __deprecated { (void)uid; (void)delay; (void)lost; @@ -2635,7 +2627,7 @@ class IRtcEngineEventHandler { * @param currentStats Instantaneous value of optimization effect. * @param averageStats Average value of cumulative optimization effect. */ - virtual void onWlAccStats(WlAccStats currentStats, WlAccStats averageStats) { + virtual void onWlAccStats(const WlAccStats& currentStats, const WlAccStats& averageStats) { (void)currentStats; (void)averageStats; } @@ -2703,6 +2695,42 @@ class IRtcEngineEventHandler { (void)uid; (void)info; } + + /** + * Occurs when the user account is updated. + * + * @param uid The user ID. + * @param userAccount The user account. + */ + virtual void onUserAccountUpdated(uid_t uid, const char* userAccount){ + (void)uid; + (void)userAccount; + } + + /** + * Reports the tracing result of video rendering event of the user. + * + * @param uid The user ID. + * @param currentEvent The current event of the tracing result: #MEDIA_TRACE_EVENT. + * @param tracingInfo The tracing result: #VideoRenderingTracingInfo. + */ + virtual void onVideoRenderingTracingResult(uid_t uid, MEDIA_TRACE_EVENT currentEvent, VideoRenderingTracingInfo tracingInfo) { + (void)uid; + (void)currentEvent; + (void)tracingInfo; + } + + /** + * Occurs when local video transcoder stream has an error. + * + * @param stream Stream type of TranscodingVideoStream. + * @param error Error code of VIDEO_TRANSCODER_ERROR. + */ + virtual void onLocalVideoTranscoderError(const TranscodingVideoStream& stream, VIDEO_TRANSCODER_ERROR error){ + (void)stream; + (void)error; + } + /** * Reports the user log upload result * @param requestId RequestId of the upload @@ -2780,6 +2808,24 @@ class IRtcEngineEventHandler { (void)newState; (void)elapseSinceLastState; } + + /** + * Occurs when receive a video transcoder stream which has video layout info. + * + * @param uid user id of the transcoded stream. + * @param width width of the transcoded stream. + * @param height height of the transcoded stream. + * @param layoutCount count of layout info in the transcoded stream. + * @param layoutlist video layout info list of the transcoded stream. + */ + virtual void onTranscodedStreamLayoutInfo(uid_t uid, int width, int height, int layoutCount,const VideoLayout* layoutlist) { + (void)uid; + (void)width; + (void)height; + (void)layoutCount; + (void)layoutlist; + } + /** * The event callback of the extension. * @@ -2796,6 +2842,7 @@ class IRtcEngineEventHandler { (void)key; (void)value; } + /** * Occurs when the extension is enabled. * @@ -2808,6 +2855,7 @@ class IRtcEngineEventHandler { (void)provider; (void)extension; } + /** * Occurs when the extension is disabled. * @@ -2820,6 +2868,7 @@ class IRtcEngineEventHandler { (void)provider; (void)extension; } + /** * Occurs when the extension runs incorrectly. * @@ -2837,39 +2886,15 @@ class IRtcEngineEventHandler { (void)error; (void)message; } - /** - * Occurs when the user account is updated. - * - * @param uid The user ID. - * @param userAccount The user account. - */ - virtual void onUserAccountUpdated(uid_t uid, const char* userAccount){ - (void)uid; - (void)userAccount; - } - - /** - * Occurs when local video transcoder stream has an error. - * - * @param stream Stream type of TranscodingVideoStream. - * @param error Error code of VIDEO_TRANSCODER_ERROR. - */ - virtual void onLocalVideoTranscoderError(const TranscodingVideoStream& stream, VIDEO_TRANSCODER_ERROR error){ - (void)stream; - (void)error; - } /** - * Reports the tracing result of video rendering event of the user. - * - * @param uid The user ID. - * @param currentEvent The current event of the tracing result: #MEDIA_TRACE_EVENT. - * @param tracingInfo The tracing result: #VideoRenderingTracingInfo. + * Occurs when the SDK receives RTM setting change response. + * + * @technical preview + * @param code The error code. */ - virtual void onVideoRenderingTracingResult(uid_t uid, MEDIA_TRACE_EVENT currentEvent, VideoRenderingTracingInfo tracingInfo) { - (void)uid; - (void)currentEvent; - (void)tracingInfo; + virtual void onSetRtmFlagResult(int code) { + (void)code; } }; @@ -3027,8 +3052,6 @@ class IVideoDeviceManager { virtual void release() = 0; }; - -class IRtcEngineEventHandlerEx; /** * The context of IRtcEngine. */ @@ -3124,11 +3147,8 @@ struct RtcEngineContext { bool autoRegisterAgoraExtensions; RtcEngineContext() - : eventHandler(NULL), appId(NULL), context(NULL), - channelProfile(CHANNEL_PROFILE_LIVE_BROADCASTING), - license(NULL), - audioScenario(AUDIO_SCENARIO_DEFAULT), - areaCode(AREA_CODE_GLOB), + : eventHandler(NULL), appId(NULL), context(NULL), channelProfile(CHANNEL_PROFILE_LIVE_BROADCASTING), + license(NULL), audioScenario(AUDIO_SCENARIO_DEFAULT), areaCode(AREA_CODE_GLOB), logConfig(), useExternalEglContext(false), domainLimit(false), autoRegisterAgoraExtensions(true) {} }; @@ -3136,6 +3156,8 @@ struct RtcEngineContext { */ class IMetadataObserver { public: + virtual ~IMetadataObserver() {} + /** The metadata type. * * @note We only support video metadata for now. @@ -3163,25 +3185,25 @@ class IMetadataObserver { */ struct Metadata { - /** The User ID that sent the metadata. - * - For the receiver: The user ID of the user who sent the `metadata`. - * - For the sender: Ignore this value. - */ - unsigned int uid; - /** The buffer size of the sent or received `metadata`. - */ - unsigned int size; - /** The buffer address of the sent or received `metadata`. - */ - unsigned char *buffer; - /** The timestamp (ms) of the `metadata`. - * - */ - long long timeStampMs; + /** The User ID that sent the metadata. + * - For the receiver: The user ID of the user who sent the `metadata`. + * - For the sender: Ignore this value. + */ + unsigned int uid; + /** The buffer size of the sent or received `metadata`. + */ + unsigned int size; + /** The buffer address of the sent or received `metadata`. + */ + unsigned char* buffer; + /** The timestamp (ms) of the `metadata`. + * + */ + long long timeStampMs; + + Metadata() : uid(0), size(0), buffer(NULL), timeStampMs(0) {} }; - virtual ~IMetadataObserver() {} - /** Occurs when the SDK requests the maximum size of the metadata. * * @@ -3213,24 +3235,24 @@ class IMetadataObserver { * @note If the receiver is audience, the receiver cannot get the NTP timestamp (ms) * that the metadata sends. */ - virtual void onMetadataReceived(const Metadata &metadata) = 0; + virtual void onMetadataReceived(const Metadata& metadata) = 0; }; -// The error codes for media streaming +// The reason codes for media streaming // GENERATED_JAVA_ENUM_PACKAGE: io.agora.streaming -enum DIRECT_CDN_STREAMING_ERROR { +enum DIRECT_CDN_STREAMING_REASON { // No error occurs. - DIRECT_CDN_STREAMING_ERROR_OK = 0, + DIRECT_CDN_STREAMING_REASON_OK = 0, // A general error occurs (no specified reason). - DIRECT_CDN_STREAMING_ERROR_FAILED = 1, + DIRECT_CDN_STREAMING_REASON_FAILED = 1, // Audio publication error. - DIRECT_CDN_STREAMING_ERROR_AUDIO_PUBLICATION = 2, + DIRECT_CDN_STREAMING_REASON_AUDIO_PUBLICATION = 2, // Video publication error. - DIRECT_CDN_STREAMING_ERROR_VIDEO_PUBLICATION = 3, + DIRECT_CDN_STREAMING_REASON_VIDEO_PUBLICATION = 3, - DIRECT_CDN_STREAMING_ERROR_NET_CONNECT = 4, + DIRECT_CDN_STREAMING_REASON_NET_CONNECT = 4, // Already exist stream name. - DIRECT_CDN_STREAMING_ERROR_BAD_NAME = 5, + DIRECT_CDN_STREAMING_REASON_BAD_NAME = 5, }; // The connection state of media streaming @@ -3289,12 +3311,12 @@ class IDirectCdnStreamingEventHandler { /** * Event callback of direct cdn streaming * @param state Current status - * @param error Error Code + * @param reason Reason Code * @param message Message */ - virtual void onDirectCdnStreamingStateChanged(DIRECT_CDN_STREAMING_STATE state, DIRECT_CDN_STREAMING_ERROR error, const char* message) { + virtual void onDirectCdnStreamingStateChanged(DIRECT_CDN_STREAMING_STATE state, DIRECT_CDN_STREAMING_REASON reason, const char* message) { (void)state; - (void)error; + (void)reason; (void)message; }; @@ -3435,11 +3457,7 @@ struct ExtensionInfo { */ uid_t localUid; - ExtensionInfo() - : mediaSourceType(agora::media::UNKNOWN_MEDIA_SOURCE), - remoteUid(0), - channelId(NULL), - localUid(0) {} + ExtensionInfo() : mediaSourceType(agora::media::UNKNOWN_MEDIA_SOURCE), remoteUid(0), channelId(NULL), localUid(0) {} }; class IMediaPlayer; @@ -3450,7 +3468,6 @@ class IMediaRecorder; * * `IRtcEngine` provides the main methods that your app can call. * - * Before calling other APIs, you must call createAgoraRtcEngine to create an `IRtcEngine` object. */ class IRtcEngine : public agora::base::IEngineBase { public: @@ -3471,14 +3488,12 @@ class IRtcEngine : public agora::base::IEngineBase { * @param sync Determines whether this method is a synchronous call. * - `true`: This method is a synchronous call, which means that the result of this method call * returns after the IRtcEngine object resources are released. Do not call this method - * in any callback generated by the SDK, or it may result in a deadlock. The SDK automatically - * detects the deadlock and turns this method into an asynchronous call, but the test itself takes - * extra time. + * in any callback generated by the SDK, or it may result in a deadlock. * - `false`: This method is an asynchronous call. The result returns immediately even when the * IRtcEngine object resources are not released. * */ - virtual void release(bool sync = false) = 0; + AGORA_CPP_API static void release(bool sync = false); /** * Initializes `IRtcEngine`. @@ -3527,7 +3542,7 @@ class IRtcEngine : public agora::base::IEngineBase { /** * Queries the capacity of the current device codec. * - * @param codecInfo An array of the codec cap information: CodecCapInfo. + * @param codec_info An array of the codec cap information: CodecCapInfo. * @param size The array size. * @return * 0: Success. @@ -3535,6 +3550,17 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int queryCodecCapability(CodecCapInfo* codecInfo, int& size) = 0; + /** + * Queries the score of the current device. + * + * @return + * > 0: If the value is greater than 0, it means that the device score has been retrieved and represents the score value. + * Most devices score between 60-100, with higher scores indicating better performance. + * + * < 0: Failure. + */ + virtual int queryDeviceScore() = 0; + /** * Preload a channel. * @@ -3542,8 +3568,7 @@ class IRtcEngine : public agora::base::IEngineBase { * * A successful call of this method will reduce the time of joining the same channel. * - * @since v4.2.2 - * @note + * Note: * 1. The SDK supports preloading up to 20 channels. Once the preloaded channels exceed the limit, the SDK will keep the latest 20 available. * 2. Renew the token of the preloaded channel by calling this method with the same 'channelId' and 'uid'. * @@ -3582,8 +3607,7 @@ class IRtcEngine : public agora::base::IEngineBase { * * A successful call of this method will reduce the time of joining the same channel. * - * @since v4.2.2 - * @note + * Note: * 1. The SDK supports preloading up to 20 channels. Once the preloaded channels exceed the limit, the SDK will keep the latest 20 available. * 2. Renew the token of the preloaded channel by calling this method with the same 'channelId' and 'userAccount'. * @@ -3615,15 +3639,13 @@ class IRtcEngine : public agora::base::IEngineBase { * - -102: The channel name is invalid. You need to pass in a valid channel name in channelId to * preload the channel again. */ - virtual int preloadChannel(const char* token, const char* channelId, const char* userAccount) = 0; + virtual int preloadChannelWithUserAccount(const char* token, const char* channelId, const char* userAccount) = 0; /** * Update token of the preloaded channels. * * An easy way to update all preloaded channels' tokens, if all preloaded channels use the same token. * - * @since v4.2.2 - * @note * If preloaded channels use different tokens, we need to call the 'preloadChannel' method with the same 'channelId' * and 'uid' or 'userAccount' to update the corresponding token. * @@ -3697,8 +3719,7 @@ class IRtcEngine : public agora::base::IEngineBase { * rejoin the channel. * - -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel. */ - virtual int joinChannel(const char* token, const char* channelId, const char* info, - uid_t uid) = 0; + virtual int joinChannel(const char* token, const char* channelId, const char* info, uid_t uid) = 0; /** * Joins a channel with media options. @@ -3767,8 +3788,7 @@ class IRtcEngine : public agora::base::IEngineBase { * rejoin the channel. * - -121: The user ID is invalid. You need to pass in a valid user ID in uid to rejoin the channel. */ - virtual int joinChannel(const char* token, const char* channelId, uid_t uid, - const ChannelMediaOptions& options) = 0; + virtual int joinChannel(const char* token, const char* channelId, uid_t uid, const ChannelMediaOptions& options) = 0; /** * Updates the channel media options after joining the channel. @@ -3947,7 +3967,7 @@ class IRtcEngine : public agora::base::IEngineBase { /** Starts a video call test. * - * @param config Configuration for video call test. + * @param config: configuration for video call test. * * @return * - 0: Success. @@ -4287,6 +4307,26 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int setVideoScenario(VIDEO_APPLICATION_SCENARIO_TYPE scenarioType) = 0; + /** + * Sets the video qoe preference. + * + * @since v4.2.1 + * + * You can call this method to set the expected QoE Preference. + * The SDK will optimize the video experience for each preference you set. + * + * + * @param qoePreference The qoe preference type. See #VIDEO_QOE_PREFERENCE_TYPE. + * + * @return + * - 0: Success. + * - < 0: Failure. + * - ERR_FAILED (1): A general error occurs (no specified reason). + * - ERR_NOT_SUPPORTED (4): Unable to set video application scenario. + * - ERR_NOT_INITIALIZED (7): The SDK is not initialized. + */ + virtual int setVideoQoEPreference(VIDEO_QOE_PREFERENCE_TYPE qoePreference) = 0; + /** * Enables the audio. * @@ -4314,7 +4354,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - < 0: Failure. */ virtual int disableAudio() = 0; - + /** * Sets the audio parameters and application scenarios. * @@ -4337,7 +4377,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - < 0: Failure. */ virtual int setAudioProfile(AUDIO_PROFILE_TYPE profile, AUDIO_SCENARIO_TYPE scenario) __deprecated = 0; - + /** * Sets the audio profile. * @@ -4601,6 +4641,17 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int setDefaultMuteAllRemoteVideoStreams(bool mute) __deprecated = 0; + /** + * Sets the default stream type of the remote video if the remote user has enabled dual-stream. + * + * @param streamType Sets the default video stream type: #VIDEO_STREAM_TYPE. + * + * @return + * - 0: Success. + * - < 0: Failure. + */ + virtual int setRemoteDefaultVideoStreamType(VIDEO_STREAM_TYPE streamType) = 0; + /** * Stops or resumes receiving the video stream of a specified user. * @@ -4650,17 +4701,6 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int setRemoteVideoSubscriptionOptions(uid_t uid, const VideoSubscriptionOptions &options) = 0; - /** - * Sets the default stream type of the remote video if the remote user has enabled dual-stream. - * - * @param streamType Sets the default video stream type: #VIDEO_STREAM_TYPE. - * - * @return - * - 0: Success. - * - < 0: Failure. - */ - virtual int setRemoteDefaultVideoStreamType(VIDEO_STREAM_TYPE streamType) = 0; - /** * Sets the blocklist of subscribe remote stream audio. * @@ -4840,8 +4880,8 @@ class IRtcEngine : public agora::base::IEngineBase { - < 0: Failure. */ virtual int stopAudioRecording() = 0; - - /** + + /** * Creates a media player source object and return its pointer. If full featured * media player source is supported, it will create it, or it will create a simple * media player. @@ -4869,7 +4909,7 @@ class IRtcEngine : public agora::base::IEngineBase { /** * Creates a media recorder object and return its pointer. * - * @param info The RecorderStreamInfo object. It contains user ID and channel name of user. + * @param info The RecorderStreamInfo object. It contains the user ID and the channel name. * * @return * - The pointer to \ref rtc::IMediaRecorder "IMediaRecorder", @@ -5405,6 +5445,7 @@ class IRtcEngine : public agora::base::IEngineBase { - < 0: Failure. */ virtual int enableSoundPositionIndication(bool enabled) = 0; + /** Sets the sound position and gain of a remote user. When the local user calls this method to set the sound position of a remote user, the sound difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a real sense of space. This method applies to massively multiplayer online games, such as Battle Royale games. @@ -5441,7 +5482,7 @@ class IRtcEngine : public agora::base::IEngineBase { /** Sets remote user parameters for spatial audio @param uid The ID of the remote user. - @param params Spatial audio parameters. see SpatialAudioParams. + @param param spatial audio parameters: SpatialAudioParams. @return int - 0: Success. @@ -5737,8 +5778,7 @@ class IRtcEngine : public agora::base::IEngineBase { - 0: Success. - -1: Failure. */ - virtual int setLocalVoiceEqualization(AUDIO_EQUALIZATION_BAND_FREQUENCY bandFrequency, - int bandGain) = 0; + virtual int setLocalVoiceEqualization(AUDIO_EQUALIZATION_BAND_FREQUENCY bandFrequency, int bandGain) = 0; /** Sets the local voice reverberation. @@ -5761,6 +5801,7 @@ class IRtcEngine : public agora::base::IEngineBase { - -1(ERR_FAILED): A general error occurs (no specified reason). */ virtual int setHeadphoneEQPreset(HEADPHONE_EQUALIZER_PRESET preset) = 0; + /** Sets the parameters of audio playback effect for remote headphones after remote audio is mixed. @param lowGain The higher the parameter value, the deeper the sound. The value range is [-10,10]. @@ -5876,6 +5917,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - < 0: Failure. */ virtual int setLocalRenderMode(media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0; + /** * Updates the display mode of the video view of a remote user. * @@ -5936,8 +5978,6 @@ class IRtcEngine : public agora::base::IEngineBase { /** * Enables or disables the dual video stream mode. * - * @deprecated v4.2.0. This method is deprecated. Use setDualStreamMode instead. - * * If dual-stream mode is enabled, the subscriber can choose to receive the high-stream * (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) * video using \ref setRemoteVideoStreamType "setRemoteVideoStreamType". @@ -5954,8 +5994,6 @@ class IRtcEngine : public agora::base::IEngineBase { /** * Enables or disables the dual video stream mode. * - * @deprecated v4.2.0. This method is deprecated. Use setDualStreamMode instead. - * * If dual-stream mode is enabled, the subscriber can choose to receive the high-stream * (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) * video using \ref setRemoteVideoStreamType "setRemoteVideoStreamType". @@ -6000,8 +6038,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int setDualStreamMode(SIMULCAST_STREAM_MODE mode, - const SimulcastStreamConfig& streamConfig) = 0; + virtual int setDualStreamMode(SIMULCAST_STREAM_MODE mode, const SimulcastStreamConfig& streamConfig) = 0; /** * Sets the external audio track. @@ -6230,7 +6267,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int adjustUserPlaybackSignalVolume(unsigned int uid, int volume) = 0; + virtual int adjustUserPlaybackSignalVolume(uid_t uid, int volume) = 0; /** Sets the fallback option for the published video stream based on the network conditions. @@ -6287,6 +6324,59 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int setHighPriorityUserList(uid_t* uidList, int uidNum, STREAM_FALLBACK_OPTIONS option) = 0; + /** + * Enable/Disable an extension. + * By calling this function, you can dynamically enable/disable the extension without changing the pipeline. + * For example, enabling/disabling Extension_A means the data will be adapted/bypassed by Extension_A. + * + * NOTE: For compatibility reasons, if you haven't call registerExtension, + * enableExtension will automatically register the specified extension. + * We suggest you call registerExtension explicitly. + * + * @param provider The name of the extension provider, e.g. agora.io. + * @param extension The name of the extension, e.g. agora.beauty. + * @param extensionInfo The information for extension. + * @param enable Whether to enable the extension: + * - true: (Default) Enable the extension. + * - false: Disable the extension. + * + * @return + * - 0: Success. + * - < 0: Failure. + */ + virtual int enableExtension(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, bool enable = true) = 0; + + /** + * Sets the properties of an extension. + * + * @param provider The name of the extension provider, e.g. agora.io. + * @param extension The name of the extension, e.g. agora.beauty. + * @param extensionInfo The information for extension. + * @param key The key of the extension. + * @param value The JSON formatted value of the extension key. + * + * @return + * - 0: Success. + * - < 0: Failure. + */ + virtual int setExtensionProperty(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, const char* key, const char* value) = 0; + + /** + * Gets the properties of an extension. + * + * @param provider The name of the extension provider, e.g. agora.io. + * @param extension The name of the extension, e.g. agora.beauty. + * @param extensionInfo The information for extension. + * @param key The key of the extension. + * @param value The value of the extension key. + * @param buf_len Maximum length of the JSON string indicating the extension property. + * + * @return + * - 0: Success. + * - < 0: Failure. + */ + virtual int getExtensionProperty(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, const char* key, char* value, int buf_len) = 0; + /** Enables loopback recording. * * If you enable loopback recording, the output of the default sound card is mixed into @@ -6370,8 +6460,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int setExtensionProviderProperty( - const char* provider, const char* key, const char* value) = 0; + virtual int setExtensionProviderProperty(const char* provider, const char* key, const char* value) = 0; /** * Registers an extension. Normally you should call this function immediately after engine initialization. @@ -6385,8 +6474,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int registerExtension(const char* provider, const char* extension, - agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0; + virtual int registerExtension(const char* provider, const char* extension, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0; /** * Enable/Disable an extension. @@ -6408,30 +6496,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int enableExtension( - const char* provider, const char* extension, bool enable=true, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0; - - /** - * Enable/Disable an extension. - * By calling this function, you can dynamically enable/disable the extension without changing the pipeline. - * For example, enabling/disabling Extension_A means the data will be adapted/bypassed by Extension_A. - * - * NOTE: For compatibility reasons, if you haven't call registerExtension, - * enableExtension will automatically register the specified extension. - * We suggest you call registerExtension explicitly. - * - * @param provider The name of the extension provider, e.g. agora.io. - * @param extension The name of the extension, e.g. agora.beauty. - * @param extensionInfo The information for extension. - * @param enable Whether to enable the extension: - * - true: (Default) Enable the extension. - * - false: Disable the extension. - * - * @return - * - 0: Success. - * - < 0: Failure. - */ - virtual int enableExtension(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, bool enable = true) = 0; + virtual int enableExtension(const char* provider, const char* extension, bool enable=true, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0; /** * Sets the properties of an extension. @@ -6466,37 +6531,6 @@ class IRtcEngine : public agora::base::IEngineBase { const char* provider, const char* extension, const char* key, char* value, int buf_len, agora::media::MEDIA_SOURCE_TYPE type = agora::media::UNKNOWN_MEDIA_SOURCE) = 0; - /** - * Sets the properties of an extension. - * - * @param provider The name of the extension provider, e.g. agora.io. - * @param extension The name of the extension, e.g. agora.beauty. - * @param extensionInfo The information for extension. - * @param key The key of the extension. - * @param value The JSON formatted value of the extension key. - * - * @return - * - 0: Success. - * - < 0: Failure. - */ - virtual int setExtensionProperty(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, const char* key, const char* value) = 0; - - /** - * Gets the properties of an extension. - * - * @param provider The name of the extension provider, e.g. agora.io. - * @param extension The name of the extension, e.g. agora.beauty. - * @param extensionInfo The information for extension. - * @param key The key of the extension. - * @param value The value of the extension key. - * @param buf_len Maximum length of the JSON string indicating the extension property. - * - * @return - * - 0: Success. - * - < 0: Failure. - */ - virtual int getExtensionProperty(const char* provider, const char* extension, const ExtensionInfo& extensionInfo, const char* key, char* value, int buf_len) = 0; - /** Sets the camera capture configuration. * @note Call this method before enabling the local camera. * That said, you can call this method before calling \ref IRtcEngine::joinChannel "joinChannel", @@ -6510,7 +6544,6 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int setCameraCapturerConfiguration(const CameraCapturerConfiguration& config) = 0; - /** * Get an custom video track id created by internal,which could used to publish or preview * @@ -6549,9 +6582,7 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int destroyCustomEncodedVideoTrack(video_track_id_t video_track_id) = 0; - #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS) - /** * Switches between front and rear cameras. * @@ -6693,7 +6724,7 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int setCameraExposurePosition(float positionXinView, float positionYinView) = 0; - /** + /** * Returns whether exposure value adjusting is supported by the current device. * Exposure compensation is in auto exposure mode. * @since v4.2.2 @@ -6812,9 +6843,8 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual bool isSpeakerphoneEnabled() = 0; - /** Select preferred route for android communication mode + /** Select preferred route for android communication mode - @since v4.2.2 @param route The preferred route. For example, when a Bluetooth headset is connected, you can use this API to switch the route to a wired headset. @return meanless, route switch result is pass through CallbackOnRoutingChanged @@ -6892,7 +6922,6 @@ class IRtcEngine : public agora::base::IEngineBase { #endif // __APPLE__ && TARGET_OS_MAC && !TARGET_OS_IPHONE #if defined(_WIN32) - /** * Shares the whole or part of a screen by specifying the screen rect. * @@ -6919,8 +6948,7 @@ class IRtcEngine : public agora::base::IEngineBase { virtual int startScreenCaptureByScreenRect(const Rectangle& screenRect, const Rectangle& regionRect, const ScreenCaptureParameters& captureParams) __deprecated = 0; - -#endif // _WIN32 +#endif #if defined(__ANDROID__) /** @@ -7104,8 +7132,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int rate(const char* callId, int rating, - const char* description) = 0; // 0~10 + virtual int rate(const char* callId, int rating, const char* description) = 0; // 0~10 /** * Allows a user to complain about the call quality. @@ -7177,6 +7204,10 @@ class IRtcEngine : public agora::base::IEngineBase { * - < 0: Failure. */ virtual int updateRtmpTranscoding(const LiveTranscoding& transcoding) = 0; + + virtual int startLocalVideoTranscoder(const LocalTranscoderConfiguration& config) = 0; + virtual int updateLocalTranscoderConfiguration(const LocalTranscoderConfiguration& config) = 0; + /** Stop an RTMP stream with transcoding or without transcoding from the CDN. (CDN live only.) * This method removes the RTMP URL address (added by the \ref IRtcEngine::startRtmpStreamWithoutTranscoding "startRtmpStreamWithoutTranscoding" method @@ -7197,9 +7228,6 @@ class IRtcEngine : public agora::base::IEngineBase { */ virtual int stopRtmpStream(const char* url) = 0; - - virtual int startLocalVideoTranscoder(const LocalTranscoderConfiguration& config) = 0; - virtual int updateLocalTranscoderConfiguration(const LocalTranscoderConfiguration& config) = 0; virtual int stopLocalVideoTranscoder() = 0; /** * Starts video capture with a camera. @@ -7402,7 +7430,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - Returns 0: Success. * - < 0: Failure. */ - virtual int createDataStream(int* streamId, DataStreamConfig& config) = 0; + virtual int createDataStream(int* streamId, const DataStreamConfig& config) = 0; /** Sends a data stream. * @@ -7457,7 +7485,7 @@ class IRtcEngine : public agora::base::IEngineBase { - 0: Success. - < 0: Failure. */ - virtual int addVideoWatermark(const RtcImage& watermark) = 0; + virtual int addVideoWatermark(const RtcImage& watermark) __deprecated = 0; /** Adds a watermark image to the local video. @@ -7544,8 +7572,7 @@ class IRtcEngine : public agora::base::IEngineBase { * To try out this function, contact [support@agora.io](mailto:support@agora.io) * and discuss the format of customized messages with us. */ - virtual int sendCustomReportMessage( - const char* id, const char* category, const char* event, const char* label, int value) = 0; + virtual int sendCustomReportMessage(const char* id, const char* category, const char* event, const char* label, int value) = 0; /** Registers the metadata observer. @@ -7588,13 +7615,12 @@ class IRtcEngine : public agora::base::IEngineBase { "pre_play_proc", "at_playout", "atw_playout" for audio receiving. */ + virtual int startAudioFrameDump(const char* channel_id, uid_t uid, const char* location, const char* uuid, const char* passwd, long duration_ms, bool auto_upload) = 0; - virtual int startAudioFrameDump(const char* channel_id, uid_t user_id, const char* location, - const char* uuid, const char* passwd, long duration_ms, bool auto_upload) = 0; /** * Stops the audio frame dump. */ - virtual int stopAudioFrameDump(const char* channel_id, uid_t user_id, const char* location) = 0; + virtual int stopAudioFrameDump(const char* channel_id, uid_t uid, const char* location) = 0; /** * Enables/Disables Agora AI Noise Suppression(AINS) with preset mode. @@ -7676,8 +7702,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int joinChannelWithUserAccount(const char* token, const char* channelId, - const char* userAccount) = 0; + virtual int joinChannelWithUserAccount(const char* token, const char* channelId, const char* userAccount) = 0; /** Joins the channel with a user account. * @@ -7710,8 +7735,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - 0: Success. * - < 0: Failure. */ - virtual int joinChannelWithUserAccount(const char* token, const char* channelId, - const char* userAccount, const ChannelMediaOptions& options) = 0; + virtual int joinChannelWithUserAccount(const char* token, const char* channelId, const char* userAccount, const ChannelMediaOptions& options) = 0; /** Joins the channel with a user account. * @@ -7786,157 +7810,73 @@ class IRtcEngine : public agora::base::IEngineBase { * - < 0: Failure. */ virtual int getUserInfoByUid(uid_t uid, rtc::UserInfo* userInfo) = 0; - /** Starts relaying media streams across channels or updates the channels for media relay. - * - * After a successful method call, the SDK triggers the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" and - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent - * "onChannelMediaRelayEvent" callbacks, and these callbacks return the - * state and events of the media stream relay. - * - If the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" callback returns - * #RELAY_STATE_RUNNING (2) and #RELAY_OK (0), and the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent - * "onChannelMediaRelayEvent" callback returns - * #RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL (4), the host starts - * sending data to the destination channel. - * - If the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" callback returns - * #RELAY_STATE_FAILURE (3), an exception occurs during the media stream - * relay. - * - * @note - * - Call this method after the \ref joinChannel() "joinChannel" method. - * - This method takes effect only when you are a host in a - * `LIVE_BROADCASTING` channel. - * - Contact sales-us@agora.io before implementing this function. - * - We do not support string user accounts in this API. - * - * @since v4.2.0 - * @param configuration The configuration of the media stream relay: - * ChannelMediaRelayConfiguration. - * - * @return - * - 0: Success. - * - < 0: Failure. - * - -1(ERR_FAILED): A general error occurs (no specified reason). - * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. - * - -5(ERR_REFUSED): The request is rejected. - * - -8(ERR_INVALID_STATE): The current status is invalid, only allowed to be called when the role is the broadcaster. - */ - virtual int startOrUpdateChannelMediaRelay(const ChannelMediaRelayConfiguration &configuration) = 0; - /** Starts to relay media streams across channels. - * - * After a successful method call, the SDK triggers the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" and - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent - * "onChannelMediaRelayEvent" callbacks, and these callbacks return the - * state and events of the media stream relay. - * - If the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" callback returns - * #RELAY_STATE_RUNNING (2) and #RELAY_OK (0), and the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent - * "onChannelMediaRelayEvent" callback returns - * #RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL (4), the host starts - * sending data to the destination channel. - * - If the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" callback returns - * #RELAY_STATE_FAILURE (3), an exception occurs during the media stream - * relay. - * - * @note - * - Call this method after the \ref joinChannel() "joinChannel" method. - * - This method takes effect only when you are a host in a - * `LIVE_BROADCASTING` channel. - * - After a successful method call, if you want to call this method - * again, ensure that you call the - * \ref stopChannelMediaRelay() "stopChannelMediaRelay" method to quit the - * current relay. - * - Contact sales-us@agora.io before implementing this function. - * - We do not support string user accounts in this API. - * - * @deprecated v4.2.0 Use `startOrUpdateChannelMediaRelay` instead. - * @param configuration The configuration of the media stream relay: - * ChannelMediaRelayConfiguration. - * - * @return - * - 0: Success. - * - < 0: Failure. - * - -1(ERR_FAILED): A general error occurs (no specified reason). - * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. - * - -5(ERR_REFUSED): The request is rejected. - * - -8(ERR_INVALID_STATE): The current status is invalid, only allowed to be called when the role is the broadcaster. - */ - virtual int startChannelMediaRelay(const ChannelMediaRelayConfiguration &configuration) __deprecated = 0; - - /** Updates the channels for media stream relay. After a successful - * \ref startChannelMediaRelay() "startChannelMediaRelay" method call, if - * you want to relay the media stream to more channels, or leave the - * current relay channel, you can call the - * \ref updateChannelMediaRelay() "updateChannelMediaRelay" method. - * - * After a successful method call, the SDK triggers the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent - * "onChannelMediaRelayEvent" callback with the - * #RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL (7) state code. - * - * @note - * Call this method after the - * \ref startChannelMediaRelay() "startChannelMediaRelay" method to update - * the destination channel. - * - * @deprecated v4.2.0 Use `startOrUpdateChannelMediaRelay` instead. - * @param configuration The media stream relay configuration: - * ChannelMediaRelayConfiguration. - * - * @return - * - 0: Success. - * - < 0: Failure. - * - -1(ERR_FAILED): A general error occurs (no specified reason). - * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. - * - -5(ERR_REFUSED): The request is rejected. - * - -7(ERR_NOT_INITIALIZED): cross channel media streams are not relayed. - */ - virtual int updateChannelMediaRelay(const ChannelMediaRelayConfiguration &configuration) __deprecated = 0; + /** Starts relaying media streams across channels or updates the channels for media relay. + * + * After a successful method call, the SDK triggers the + * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged + * "onChannelMediaRelayStateChanged" callback, and this callback return the state of the media stream relay. + * - If the + * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged + * "onChannelMediaRelayStateChanged" callback returns + * #RELAY_STATE_RUNNING (2) and #RELAY_OK (0), the host starts sending data to the destination channel. + * - If the + * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged + * "onChannelMediaRelayStateChanged" callback returns + * #RELAY_STATE_FAILURE (3), an exception occurs during the media stream + * relay. + * + * @note + * - Call this method after the \ref joinChannel() "joinChannel" method. + * - This method takes effect only when you are a host in a + * `LIVE_BROADCASTING` channel. + * - Contact sales-us@agora.io before implementing this function. + * - We do not support string user accounts in this API. + * + * @since v4.2.0 + * @param configuration The configuration of the media stream relay: + * ChannelMediaRelayConfiguration. + * + * @return + * - 0: Success. + * - < 0: Failure. + * - -1(ERR_FAILED): A general error occurs (no specified reason). + * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. + * - -5(ERR_REFUSED): The request is rejected. + * - -8(ERR_INVALID_STATE): The current status is invalid, only allowed to be called when the role is the broadcaster. + **/ + virtual int startOrUpdateChannelMediaRelay(const ChannelMediaRelayConfiguration &configuration) = 0; - /** Stops the media stream relay. - * - * Once the relay stops, the host quits all the destination - * channels. - * - * After a successful method call, the SDK triggers the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" callback. If the callback returns - * #RELAY_STATE_IDLE (0) and #RELAY_OK (0), the host successfully - * stops the relay. - * - * @note - * If the method call fails, the SDK triggers the - * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged - * "onChannelMediaRelayStateChanged" callback with the - * #RELAY_ERROR_SERVER_NO_RESPONSE (2) or - * #RELAY_ERROR_SERVER_CONNECTION_LOST (8) state code. You can leave the - * channel by calling the \ref leaveChannel() "leaveChannel" method, and - * the media stream relay automatically stops. - * - * @return - * - 0: Success. - * - < 0: Failure. - * - -1(ERR_FAILED): A general error occurs (no specified reason). - * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. - * - -5(ERR_REFUSED): The request is rejected. - * - -7(ERR_NOT_INITIALIZED): cross channel media streams are not relayed. - */ + /** Stops the media stream relay. + * + * Once the relay stops, the host quits all the destination + * channels. + * + * After a successful method call, the SDK triggers the + * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged + * "onChannelMediaRelayStateChanged" callback. If the callback returns + * #RELAY_STATE_IDLE (0) and #RELAY_OK (0), the host successfully + * stops the relay. + * + * @note + * If the method call fails, the SDK triggers the + * \ref agora::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged + * "onChannelMediaRelayStateChanged" callback with the + * #RELAY_ERROR_SERVER_NO_RESPONSE (2) or + * #RELAY_ERROR_SERVER_CONNECTION_LOST (8) state code. You can leave the + * channel by calling the \ref leaveChannel() "leaveChannel" method, and + * the media stream relay automatically stops. + * + * @return + * - 0: Success. + * - < 0: Failure. + * - -1(ERR_FAILED): A general error occurs (no specified reason). + * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. + * - -5(ERR_REFUSED): The request is rejected. + * - -7(ERR_NOT_INITIALIZED): cross channel media streams are not relayed. + */ virtual int stopChannelMediaRelay() = 0; - /** pause the channels for media stream relay. * @return * - 0: Success. @@ -8058,6 +7998,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - < 0: Failure. */ virtual int configRhythmPlayer(const AgoraRhythmPlayerConfig& config) = 0; + /** * Takes a snapshot of a video stream. * @@ -8088,6 +8029,7 @@ class IRtcEngine : public agora::base::IEngineBase { * - < 0 : Failure. */ virtual int takeSnapshot(uid_t uid, const char* filePath) = 0; + /** Enables the content inspect. @param enabled Whether to enable content inspect: - `true`: Yes. @@ -8167,7 +8109,7 @@ class IRtcEngine : public agora::base::IEngineBase { - 0: Success - < 0: Failure */ - virtual int setAdvancedAudioOptions(AdvancedAudioOptions &options, int sourceType = 0) = 0; + virtual int setAdvancedAudioOptions(AdvancedAudioOptions& options, int sourceType = 0) = 0; /** Bind local user and a remote user as an audio&video sync group. The remote user is defined by cid and uid. * There’s a usage limit that local user must be a video stream sender. On the receiver side, media streams from same sync group will be time-synced @@ -8295,28 +8237,13 @@ class IRtcEngine : public agora::base::IEngineBase { /** * @brief Whether the target feature is available for the device. - * @since v4.2.0 + * @since v4.3.0 * @param type The feature type. See FeatureType. * @return * - true: available. * - false: not available. */ virtual bool isFeatureAvailableOnDevice(FeatureType type) = 0; - -}; - -class AAudioDeviceManager : public agora::util::AutoPtr { - public: - AAudioDeviceManager(IRtcEngine* engine) { - queryInterface(engine, AGORA_IID_AUDIO_DEVICE_MANAGER); - } -}; - -class AVideoDeviceManager : public agora::util::AutoPtr { - public: - AVideoDeviceManager(IRtcEngine* engine) { - queryInterface(engine, AGORA_IID_VIDEO_DEVICE_MANAGER); - } }; // The following types are either deprecated or not implmented yet. @@ -8493,6 +8420,20 @@ enum VIDEO_PROFILE_TYPE { VIDEO_PROFILE_DEFAULT = VIDEO_PROFILE_LANDSCAPE_360P, }; +class AAudioDeviceManager : public agora::util::AutoPtr { + public: + AAudioDeviceManager(IRtcEngine* engine) { + queryInterface(engine, AGORA_IID_AUDIO_DEVICE_MANAGER); + } +}; + +class AVideoDeviceManager : public agora::util::AutoPtr { + public: + AVideoDeviceManager(IRtcEngine* engine) { + queryInterface(engine, AGORA_IID_VIDEO_DEVICE_MANAGER); + } +}; + } // namespace rtc } // namespace agora diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h index 32690cffe..e9826d78f 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h @@ -91,6 +91,7 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { using IRtcEngineEventHandler::onNetworkTypeChanged; using IRtcEngineEventHandler::onEncryptionError; using IRtcEngineEventHandler::onUploadLogResult; + using IRtcEngineEventHandler::onUserInfoUpdated; using IRtcEngineEventHandler::onUserAccountUpdated; using IRtcEngineEventHandler::onAudioSubscribeStateChanged; using IRtcEngineEventHandler::onVideoSubscribeStateChanged; @@ -98,6 +99,8 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { using IRtcEngineEventHandler::onVideoPublishStateChanged; using IRtcEngineEventHandler::onSnapshotTaken; using IRtcEngineEventHandler::onVideoRenderingTracingResult; + using IRtcEngineEventHandler::onSetRtmFlagResult; + using IRtcEngineEventHandler::onTranscodedStreamLayoutInfo; virtual const char* eventHandlerType() const { return "event_handler_ex"; } @@ -322,13 +325,13 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { * you to troubleshoot issues when exceptions occur. * * The SDK triggers the onLocalVideoStateChanged callback with the state code of `LOCAL_VIDEO_STREAM_STATE_FAILED` - * and error code of `LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE` in the following situations: + * and error code of `LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE` in the following situations: * - The app switches to the background, and the system gets the camera resource. * - The camera starts normally, but does not output video for four consecutive seconds. * * When the camera outputs the captured video frames, if the video frames are the same for 15 * consecutive frames, the SDK triggers the `onLocalVideoStateChanged` callback with the state code - * of `LOCAL_VIDEO_STREAM_STATE_CAPTURING` and error code of `LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE`. + * of `LOCAL_VIDEO_STREAM_STATE_CAPTURING` and error code of `LOCAL_VIDEO_STREAM_REASON_CAPTURE_FAILURE`. * Note that the video frame duplication detection is only available for video frames with a resolution * greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. * @@ -338,14 +341,14 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { * * @param connection The RtcConnection object. * @param state The state of the local video. See #LOCAL_VIDEO_STREAM_STATE. - * @param error The detailed error information. See #LOCAL_VIDEO_STREAM_ERROR. + * @param reason The detailed error information. See #LOCAL_VIDEO_STREAM_REASON. */ virtual void onLocalVideoStateChanged(const RtcConnection& connection, LOCAL_VIDEO_STREAM_STATE state, - LOCAL_VIDEO_STREAM_ERROR errorCode) { + LOCAL_VIDEO_STREAM_REASON reason) { (void)connection; (void)state; - (void)errorCode; + (void)reason; } /** @@ -762,13 +765,13 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { * * @param connection The RtcConnection object. * @param state State of the local audio. See #LOCAL_AUDIO_STREAM_STATE. - * @param error The error information of the local audio. - * See #LOCAL_AUDIO_STREAM_ERROR. + * @param reason The reason information of the local audio. + * See #LOCAL_AUDIO_STREAM_REASON. */ - virtual void onLocalAudioStateChanged(const RtcConnection& connection, LOCAL_AUDIO_STREAM_STATE state, LOCAL_AUDIO_STREAM_ERROR error) { + virtual void onLocalAudioStateChanged(const RtcConnection& connection, LOCAL_AUDIO_STREAM_STATE state, LOCAL_AUDIO_STREAM_REASON reason) { (void)connection; (void)state; - (void)error; + (void)reason; } /** Occurs when the remote audio state changes. @@ -976,6 +979,7 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { (void)success; (void)reason; } + /** * Occurs when the user account is updated. * @@ -983,10 +987,10 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { * @param remoteUid The user ID. * @param userAccount The user account. */ - virtual void onUserAccountUpdated(const RtcConnection& connection, uid_t remoteUid, const char* userAccount){ + virtual void onUserAccountUpdated(const RtcConnection& connection, uid_t remoteUid, const char* remoteUserAccount){ (void)connection; (void)remoteUid; - (void)userAccount; + (void)remoteUserAccount; } /** Reports the result of taking a video snapshot. @@ -1027,6 +1031,34 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler { (void)currentEvent; (void)tracingInfo; } + + /** + * Occurs when receive use rtm response. + * + * @param connection The RtcConnection object. + * @param code The error code: + */ + virtual void onSetRtmFlagResult(const RtcConnection& connection, int code) { + (void)connection; + (void)code; + } + /** + * Occurs when receive a video transcoder stream which has video layout info. + * + * @param connection The RtcConnection object. + * @param uid user id of the transcoded stream. + * @param width width of the transcoded stream. + * @param height height of the transcoded stream. + * @param layoutCount count of layout info in the transcoded stream. + * @param layoutlist video layout info list of the transcoded stream. + */ + virtual void onTranscodedStreamLayoutInfo(const RtcConnection& connection, uid_t uid, int width, int height, int layoutCount,const VideoLayout* layoutlist) { + (void)uid; + (void)width; + (void)height; + (void)layoutCount; + (void)layoutlist; + } }; class IRtcEngineEx : public IRtcEngine { @@ -1488,7 +1520,7 @@ class IRtcEngineEx : public IRtcEngine { * - 0: Success. * - < 0: Failure. */ - virtual int adjustUserPlaybackSignalVolumeEx(unsigned int uid, int volume, const RtcConnection& connection) = 0; + virtual int adjustUserPlaybackSignalVolumeEx(uid_t uid, int volume, const RtcConnection& connection) = 0; /** Gets the current connection state of the SDK. @param connection The RtcConnection object. @@ -1561,7 +1593,7 @@ class IRtcEngineEx : public IRtcEngine { * - Returns 0: Success. * - < 0: Failure. */ - virtual int createDataStreamEx(int* streamId, DataStreamConfig& config, const RtcConnection& connection) = 0; + virtual int createDataStreamEx(int* streamId, const DataStreamConfig& config, const RtcConnection& connection) = 0; /** Sends a data stream. * * After calling \ref IRtcEngine::createDataStream "createDataStream", you can call @@ -1729,35 +1761,6 @@ class IRtcEngineEx : public IRtcEngine { */ virtual int startOrUpdateChannelMediaRelayEx(const ChannelMediaRelayConfiguration& configuration, const RtcConnection& connection) = 0; - /** Starts to relay media streams across channels. - * - * @deprecated v4.2.0 Use `startOrUpdateChannelMediaRelayEx` instead. - * @param configuration The configuration of the media stream relay:ChannelMediaRelayConfiguration. - * @param connection RtcConnection. - * @return - * - 0: Success. - * - < 0: Failure. - * - -1(ERR_FAILED): A general error occurs (no specified reason). - * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. - * - -5(ERR_REFUSED): The request is rejected. - * - -8(ERR_INVALID_STATE): The current status is invalid, only allowed to be called when the role is the broadcaster. - */ - virtual int startChannelMediaRelayEx(const ChannelMediaRelayConfiguration& configuration, const RtcConnection& connection) __deprecated = 0; - - /** Updates the channels for media stream relay - * @deprecated v4.2.0 Use `startOrUpdateChannelMediaRelayEx` instead. - * @param configuration The media stream relay configuration: ChannelMediaRelayConfiguration. - * @param connection RtcConnection. - * @return - * - 0: Success. - * - < 0: Failure. - * - -1(ERR_FAILED): A general error occurs (no specified reason). - * - -2(ERR_INVALID_ARGUMENT): The argument is invalid. - * - -5(ERR_REFUSED): The request is rejected. - * - -7(ERR_NOT_INITIALIZED): cross channel media streams are not relayed. - */ - virtual int updateChannelMediaRelayEx(const ChannelMediaRelayConfiguration& configuration, const RtcConnection& connection) __deprecated = 0; - /** Stops the media stream relay. * * Once the relay stops, the host quits all the destination @@ -1942,6 +1945,16 @@ class IRtcEngineEx : public IRtcEngine { - -7(ERR_NOT_INITIALIZED): The SDK is not initialized. Initialize the `IRtcEngine` instance before calling this method. */ virtual int startMediaRenderingTracingEx(const RtcConnection& connection) = 0; + + /** Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options. + @since v4.3.0 + @param connection The connection information. See RtcConnection. + @param parameters Pointer to the set parameters in a JSON string. + @return + - 0: Success. + - < 0: Failure. + */ + virtual int setParametersEx(const RtcConnection& connection, const char* parameters) = 0; }; } // namespace rtc diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraSpatialAudio.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraSpatialAudio.h index 51b382575..f4a3ba6a3 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraSpatialAudio.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraSpatialAudio.h @@ -4,8 +4,7 @@ // Copyright (c) 2019 Agora.io. All rights reserved. // -#ifndef AGORA_SPATIAL_AUDIO_H -#define AGORA_SPATIAL_AUDIO_H +#pragma once #include #include "AgoraBase.h" @@ -22,7 +21,6 @@ struct RemoteVoicePositionInfo { float position[3]; // The forward vector of remote voice, (x, y, z). When it's not set, the vector is forward to listner. float forward[3]; - RemoteVoicePositionInfo() = default; }; struct SpatialAudioZone { @@ -44,7 +42,6 @@ struct SpatialAudioZone { float upLength; //the audio attenuation of zone float audioAttenuation; - SpatialAudioZone() = default; }; /** The definition of LocalSpatialAudioConfig @@ -60,15 +57,93 @@ struct LocalSpatialAudioConfig { /** The IBaseSpatialAudioEngine class provides the common methods of ICloudSpatialAudioEngine and ILocalSpatialAudioEngine. */ -class IBaseSpatialAudioEngine: public RefCountInterface { +class ILocalSpatialAudioEngine: public RefCountInterface { protected: - virtual ~IBaseSpatialAudioEngine() {} + virtual ~ILocalSpatialAudioEngine() {} public: /** * Releases all the resources occupied by spatial audio engine. */ virtual void release() = 0; + + /** + * Initializes the ILocalSpatialAudioEngine object and allocates the internal resources. + * + * @note Ensure that you call IRtcEngine::queryInterface and initialize before calling any other ILocalSpatialAudioEngine APIs. + * + * @param config The pointer to the LocalSpatialAudioConfig. See #LocalSpatialAudioConfig. + * + * @return + * - 0: Success. + * - <0: Failure. + */ + virtual int initialize(const LocalSpatialAudioConfig& config) = 0; + /** + * Updates the position information of remote user. You should call it when remote user whose role is broadcaster moves. + * + * @param uid The remote user ID. It should be the same as RTC channel remote user id. + * @param posInfo The position information of remote user. See #RemoteVoicePositionInfo. + * @return + * - 0: Success. + * - <0: Failure. + */ + virtual int updateRemotePosition(uid_t uid, const RemoteVoicePositionInfo &posInfo) = 0; + /** + * Updates the position of remote user. It's supposed to use with IRtcEngineEx::joinChannelEx. + * + * @param uid The remote user ID. It should be the same as RTC channel remote user id. + * @param posInfo The position information of remote user. See #RemoteVoicePositionInfo. + * @param connection The RTC connection whose spatial audio effect you want to update. See #RtcConnection. + * @return + * - 0: Success. + * - <0: Failure. + */ + virtual int updateRemotePositionEx(uid_t uid, const RemoteVoicePositionInfo &posInfo, const RtcConnection& connection) = 0; + /** + * Remove the position information of remote user. You should call it when remote user called IRtcEngine::leaveChannel. + * + * @param uid The remote user ID. It should be the same as RTC channel remote user id. + * @return + * - 0: Success. + * - <0: Failure. + */ + virtual int removeRemotePosition(uid_t uid) = 0; + /** + * Remove the position information of remote user. It's supposed to use with IRtcEngineEx::joinChannelEx. + * + * @param uid The remote user ID. It should be the same as RTC channel remote user id. + * @param connection The RTC connection whose spatial audio effect you want to update. See #RtcConnection. + * @return + * - 0: Success. + * - <0: Failure. + */ + virtual int removeRemotePositionEx(uid_t uid, const RtcConnection& connection) = 0; + /** + * Clear the position informations of remote users. It's supposed to use with IRtcEngineEx::joinChannelEx. + * + * @return + * - 0: Success. + * - <0: Failure. + */ + virtual int clearRemotePositionsEx(const RtcConnection& connection) = 0; + /** + * Updates the position of local user. This method is used in scene with multi RtcConnection. + * + * @note + * - This method is only effective in ILocalSpatialAudioEngine currently. + * + * @param position The sound position of the user. The coordinate order is forward, right, and up. + * @param axisForward The vector in the direction of the forward axis in the coordinate system. + * @param axisRight The vector in the direction of the right axis in the coordinate system. + * @param axisUp The vector in the direction of the up axis in the coordinate system. + * @param connection The RTC connection whose spatial audio effect you want to update. + * @return + * - 0: Success. + * - <0: Failure. + */ + virtual int updateSelfPositionEx(const float position[3], const float axisForward[3], const float axisRight[3], const float axisUp[3], const RtcConnection& connection) = 0; + /** * This method sets the maximum number of streams that a player can receive in a * specified audio reception range. @@ -136,24 +211,7 @@ class IBaseSpatialAudioEngine: public RefCountInterface { * - 0: Success. * - <0: Failure. */ - virtual int updateSelfPosition(float position[3], float axisForward[3], float axisRight[3], float axisUp[3]) = 0; - /** - * Updates the position of local user. This method is used in scene with multi RtcConnection. - * - * @note - * - This method is only effective in ILocalSpatialAudioEngine currently. - * - * @param position The sound position of the user. The coordinate order is forward, right, and up. - * @param axisForward The vector in the direction of the forward axis in the coordinate system. - * @param axisRight The vector in the direction of the right axis in the coordinate system. - * @param axisUp The vector in the direction of the up axis in the coordinate system. - * @param connection The RTC connection whose spatial audio effect you want to update. - * @return - * - 0: Success. - * - <0: Failure. - */ - virtual int updateSelfPositionEx(float position[3], float axisForward[3], float axisRight[3], float axisUp[3], const RtcConnection& connection) = 0; - + virtual int updateSelfPosition(const float position[3], const float axisForward[3], const float axisRight[3], const float axisUp[3]) = 0; /** * Updates the position of a media player in scene. This method has same behavior both in ICloudSpatialAudioEngine and ILocalSpatialAudioEngine. * @@ -196,28 +254,7 @@ class IBaseSpatialAudioEngine: public RefCountInterface { * - <0: Failure. */ virtual int muteAllRemoteAudioStreams(bool mute) = 0; - - - /** - * Setting up sound Space - * - * @param zones The Sound space array - * @param zoneCount the sound Space count of array - * @return - * - 0: Success. - * - <0: Failure. - */ - virtual int setZones(const SpatialAudioZone *zones, unsigned int zoneCount) = 0; - /** - * Set the audio attenuation coefficient of the player - * @param playerId The ID of the media player. You can get it by IMediaPlayer::getMediaPlayerId. - * @param attenuation The audio attenuation of the media player. - * @param forceSet Whether to force the setting of audio attenuation coefficient. - * @return - * - 0: Success. - * - <0: Failure. - */ - virtual int setPlayerAttenuation(int playerId, double attenuation, bool forceSet) = 0; + /** * Mute or unmute remote user audio stream. * @@ -228,65 +265,29 @@ class IBaseSpatialAudioEngine: public RefCountInterface { * - <0: Failure. */ virtual int muteRemoteAudioStream(uid_t uid, bool mute) = 0; -}; - -class ILocalSpatialAudioEngine : public IBaseSpatialAudioEngine { -protected: - virtual ~ILocalSpatialAudioEngine() {} -public: - /** - * Initializes the ILocalSpatialAudioEngine object and allocates the internal resources. - * - * @note Ensure that you call IRtcEngine::queryInterface and initialize before calling any other ILocalSpatialAudioEngine APIs. - * - * @param config The pointer to the LocalSpatialAudioConfig. See #LocalSpatialAudioConfig. - * - * @return - * - 0: Success. - * - <0: Failure. - */ - virtual int initialize(const LocalSpatialAudioConfig& config) = 0; - /** - * Updates the position information of remote user. You should call it when remote user whose role is broadcaster moves. - * - * @param uid The remote user ID. It should be the same as RTC channel remote user id. - * @param posInfo The position information of remote user. See #RemoteVoicePositionInfo. - * @return - * - 0: Success. - * - <0: Failure. - */ - virtual int updateRemotePosition(uid_t uid, const RemoteVoicePositionInfo &posInfo) = 0; - /** - * Updates the position of remote user. It's supposed to use with IRtcEngineEx::joinChannelEx. - * - * @param uid The remote user ID. It should be the same as RTC channel remote user id. - * @param posInfo The position information of remote user. See #RemoteVoicePositionInfo. - * @param connection The RTC connection whose spatial audio effect you want to update. See #RtcConnection. - * @return - * - 0: Success. - * - <0: Failure. - */ - virtual int updateRemotePositionEx(uid_t uid, const RemoteVoicePositionInfo &posInfo, const RtcConnection& connection) = 0; + virtual int setRemoteAudioAttenuation(uid_t uid, double attenuation, bool forceSet) = 0; + /** - * Remove the position information of remote user. You should call it when remote user called IRtcEngine::leaveChannel. + * Setting up sound Space * - * @param uid The remote user ID. It should be the same as RTC channel remote user id. + * @param zones The Sound space array + * @param zoneCount the sound Space count of array * @return * - 0: Success. * - <0: Failure. */ - virtual int removeRemotePosition(uid_t uid) = 0; + virtual int setZones(const SpatialAudioZone *zones, unsigned int zoneCount) = 0; /** - * Remove the position information of remote user. It's supposed to use with IRtcEngineEx::joinChannelEx. - * - * @param uid The remote user ID. It should be the same as RTC channel remote user id. - * @param connection The RTC connection whose spatial audio effect you want to update. See #RtcConnection. + * Set the audio attenuation coefficient of the player + * @param playerId The ID of the media player. You can get it by IMediaPlayer::getMediaPlayerId. + * @param attenuation The audio attenuation of the media player. + * @param forceSet Whether to force the setting of audio attenuation coefficient. * @return * - 0: Success. * - <0: Failure. */ - virtual int removeRemotePositionEx(uid_t uid, const RtcConnection& connection) = 0; + virtual int setPlayerAttenuation(int playerId, double attenuation, bool forceSet) = 0; /** * Clear the position informations of remote users. * @@ -294,21 +295,8 @@ class ILocalSpatialAudioEngine : public IBaseSpatialAudioEngine { * - 0: Success. * - <0: Failure. */ - virtual int clearRemotePositions() = 0; - /** - * Clear the position informations of remote users. It's supposed to use with IRtcEngineEx::joinChannelEx. - * - * @return - * - 0: Success. - * - <0: Failure. - */ - virtual int clearRemotePositionsEx(const RtcConnection& connection) = 0; - - - virtual int setRemoteAudioAttenuation(uid_t uid, double attenuation, bool forceSet) = 0; + virtual int clearRemotePositions() = 0; }; } // namespace rtc } // namespace agora - -#endif diff --git a/android/src/main/cpp/third_party/include/iris/iris_base.h b/android/src/main/cpp/third_party/include/iris/iris_base.h index 373d1dd7a..437e1e54f 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_base.h +++ b/android/src/main/cpp/third_party/include/iris/iris_base.h @@ -32,7 +32,6 @@ typedef enum IrisAppType { } IrisAppType; typedef enum IrisLogLevel { - levelTrace = 0, levelDebug = 1, levelInfo = 2, levelWarn = 3, @@ -45,13 +44,17 @@ typedef enum IrisError { ERR_OK = 0, ERR_FAILED = 1, ERR_INVALID_ARGUMENT = 2, + ERR_NOT_SUPPORTED = 4, ERR_NOT_INITIALIZED = 7, /*base from IRIS_VIDEO_PROCESS_ERR::ERR_NULL_POINTER=1*/ ERR_NULL_POINTER = 1001, ERR_SIZE_NOT_MATCHING = 1002, ERR_BUFFER_EMPTY = 1005, - ERR_FRAM_TYPE_NOT_MATCHING = 10006 + ERR_FRAM_TYPE_NOT_MATCHING = 1006, + ERR_ALREADY_REGISTERED = 1007, + ERR_ALREADY_UNREGISTERED = 1008, + ERR_API_NOT_REGISTERED = 1009, } IrisError; IRIS_API void enableUseJsonArray(bool enable); @@ -82,8 +85,6 @@ typedef struct IrisCEventHandler { typedef void *IrisHandle; typedef IrisHandle IrisEventHandlerHandle; -typedef IrisHandle IrisVideoFrameBufferDelegateHandle; -typedef IrisHandle IrisVideoFrameBufferManagerPtr; typedef IrisHandle IrisApiEnginePtr; EXTERN_C_LEAVE diff --git a/android/src/main/cpp/third_party/include/iris/iris_engine_base.h b/android/src/main/cpp/third_party/include/iris/iris_engine_base.h index a7c2a15c2..a1e7de6ea 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_engine_base.h +++ b/android/src/main/cpp/third_party/include/iris/iris_engine_base.h @@ -1,6 +1,6 @@ #pragma once -#include "iris_module.h" +#include "iris_base.h" class IApiEngineBase { public: @@ -8,6 +8,6 @@ class IApiEngineBase { virtual int CallIrisApi(ApiParam *apiParam) = 0; }; -IRIS_API IApiEngineBase *IRIS_CALL createIrisRtcEngine(void *engine); +IRIS_API IApiEngineBase *IRIS_CALL createIrisRtcEngine(IrisHandle rtcEngine); -IRIS_API void IRIS_CALL destroyIrisRtcEngine(IApiEngineBase *engine); \ No newline at end of file +IRIS_API void IRIS_CALL destroyIrisRtcEngine(IApiEngineBase *apiEngine); \ No newline at end of file diff --git a/android/src/main/cpp/third_party/include/iris/iris_media_base_cxx.h b/android/src/main/cpp/third_party/include/iris/iris_media_base_cxx.h deleted file mode 100644 index 4aaca97e8..000000000 --- a/android/src/main/cpp/third_party/include/iris/iris_media_base_cxx.h +++ /dev/null @@ -1,9 +0,0 @@ -// -// Created by LXH on 2021/7/20. -// - -#ifndef IRIS_MEDIA_BASE_H_ -#define IRIS_MEDIA_BASE_H_ -#include "iris_media_base_c.h" -#include -#endif//IRIS_MEDIA_BASE_H_ diff --git a/android/src/main/cpp/third_party/include/iris/iris_module.h b/android/src/main/cpp/third_party/include/iris/iris_module.h index e98489975..0ec4eb531 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_module.h +++ b/android/src/main/cpp/third_party/include/iris/iris_module.h @@ -6,26 +6,16 @@ #define IRIS_DELEGATE_H_ #include "iris_base.h" -#include namespace agora { namespace iris { -class IRIS_DEBUG_CPP_API IrisEventHandler { +class IrisEventHandler { public: virtual ~IrisEventHandler() = default; public: - virtual void OnEvent(EventParam *param){}; -}; - -class IModule { - public: - virtual ~IModule(){}; - virtual void Initialize(void *rtc_engine) = 0; - virtual void Release() = 0; - virtual int CallApi(const char *func_name, const char *buff, - uint32_t buffLength, std::string &out) = 0; + virtual void OnEvent(EventParam *param) {} }; }// namespace iris diff --git a/android/src/main/cpp/third_party/include/iris/iris_platform.h b/android/src/main/cpp/third_party/include/iris/iris_platform.h index c9b9ec916..a485a3580 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_platform.h +++ b/android/src/main/cpp/third_party/include/iris/iris_platform.h @@ -64,14 +64,6 @@ #define IRIS_DEPRECATED #endif -#if defined(IRIS_DEBUG) -#define IRIS_DEBUG_API IRIS_API -#define IRIS_DEBUG_CPP_API IRIS_CPP_API -#else -#define IRIS_DEBUG_API -#define IRIS_DEBUG_CPP_API -#endif - #if defined(__GUNC__) #define COMPILER_IS_GCC #if defined(__MINGW32__) || defined(__MINGW64__) diff --git a/android/src/main/cpp/third_party/include/iris/iris_queue.h b/android/src/main/cpp/third_party/include/iris/iris_queue.h deleted file mode 100644 index ff0fee385..000000000 --- a/android/src/main/cpp/third_party/include/iris/iris_queue.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef __IRIS_QUEUE_H__ -#define __IRIS_QUEUE_H__ - -#include -#include -#include - -template -class QueueBase { - public: - QueueBase() : max_size_(0) {} - - bool add(T *obj) { - std::lock_guard lock(mutex_); - assert(obj != nullptr); - if (max_size_ != 0 && objects_.size() >= max_size_) { return false; } - objects_.emplace_back(obj); - return true; - } - - bool addUnique(T *obj) { - std::lock_guard lock(mutex_); - assert(obj != nullptr); - if (max_size_ != 0 && objects_.size() >= max_size_) { return false; } - - for (auto it = objects_.begin(); it != objects_.end(); it++) { - if (obj == (*it)) { return false; } - } - - objects_.emplace_back(obj); - return true; - } - - bool remove(T *obj) { - std::lock_guard lock(mutex_); - assert(obj != nullptr); - for (auto it = objects_.begin(); it != objects_.end(); it++) { - if (obj == (*it)) { - objects_.erase(it); - return true; - } - } - return false; - } - - int count() { return objects_.size(); } - - void set_maxsize(size_t maxsize) { max_size_ = maxsize; } - - T *get(int i) { - if (objects_.size() > 0) return objects_[i]; - else - return nullptr; - } - - void clear() { - std::lock_guard lock(mutex_); - objects_.clear(); - } - - public: - std::mutex mutex_; - - private: - std::vector objects_; - size_t max_size_; -}; - -#endif \ No newline at end of file diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_api_type.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_api_type.h deleted file mode 100644 index 6f768ff8e..000000000 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_api_type.h +++ /dev/null @@ -1,937 +0,0 @@ -#pragma once - -// class IVideoDeviceManager start -#define FUNC_VIDEODEVICEMANAGER_ENUMERATEVIDEODEVICES \ - "VideoDeviceManager_enumerateVideoDevices" -#define FUNC_VIDEODEVICEMANAGER_SETDEVICE "VideoDeviceManager_setDevice" -#define FUNC_VIDEODEVICEMANAGER_GETDEVICE "VideoDeviceManager_getDevice" -#define FUNC_VIDEODEVICEMANAGER_STARTDEVICETEST \ - "VideoDeviceManager_startDeviceTest" -#define FUNC_VIDEODEVICEMANAGER_STOPDEVICETEST \ - "VideoDeviceManager_stopDeviceTest" -#define FUNC_VIDEODEVICEMANAGER_RELEASE "VideoDeviceManager_release" -#define FUNC_VIDEODEVICEMANAGER_NUMBEROFCAPABILITIES \ - "VideoDeviceManager_numberOfCapabilities" -#define FUNC_VIDEODEVICEMANAGER_GETCAPABILITY "VideoDeviceManager_getCapability" - -// class IVideoDeviceManager end - -// class IMediaPlayer start -// class IMediaPlayer end - -// class IRtcEngine start -#define FUNC_RTCENGINE_SETAPPTYPE "RtcEngine_setAppType" -#define FUNC_RTCENGINE_SETPARAMETERS "RtcEngine_setParameters" -#define FUNC_RTCENGINE_STARTMEDIARENDERINGTRACING \ - "RtcEngine_startMediaRenderingTracing" -#define FUNC_RTCENGINEEX_STARTMEDIARENDERINGTRACINGEX \ - "RtcEngineEx_startMediaRenderingTracingEx" -#define FUNC_RTCENGINE_ENABLEINSTANTMEDIARENDERING \ - "RtcEngine_enableInstantMediaRendering" -#define FUNC_RTCENGINE_RELEASE "RtcEngine_release" -#define FUNC_RTCENGINE_INITIALIZE "RtcEngine_initialize" -#define FUNC_RTCENGINE_QUERYINTERFACE "RtcEngine_queryInterface" -#define FUNC_RTCENGINE_GETVERSION "RtcEngine_getVersion" -#define FUNC_RTCENGINE_GETERRORDESCRIPTION "RtcEngine_getErrorDescription" -#define FUNC_RTCENGINE_QUERYCODECCAPABILITY "RtcEngine_queryCodecCapability" -#define FUNC_RTCENGINE_JOINCHANNEL "RtcEngine_joinChannel" -#define FUNC_RTCENGINE_JOINCHANNEL2 "RtcEngine_joinChannel2" -#define FUNC_RTCENGINE_UPDATECHANNELMEDIAOPTIONS \ - "RtcEngine_updateChannelMediaOptions" -#define FUNC_RTCENGINE_LEAVECHANNEL "RtcEngine_leaveChannel" -#define FUNC_RTCENGINE_LEAVECHANNEL2 "RtcEngine_leaveChannel2" -#define FUNC_RTCENGINE_RENEWTOKEN "RtcEngine_renewToken" -#define FUNC_RTCENGINE_SETCHANNELPROFILE "RtcEngine_setChannelProfile" -#define FUNC_RTCENGINE_SETCLIENTROLE "RtcEngine_setClientRole" -#define FUNC_RTCENGINE_SETCLIENTROLE2 "RtcEngine_setClientRole2" -#define FUNC_RTCENGINE_STARTECHOTEST "RtcEngine_startEchoTest" -#define FUNC_RTCENGINE_STARTECHOTEST2 "RtcEngine_startEchoTest2" -#define FUNC_RTCENGINE_STARTECHOTEST3 "RtcEngine_startEchoTest3" -#define FUNC_RTCENGINE_STOPECHOTEST "RtcEngine_stopEchoTest" -#define FUNC_RTCENGINE_ENABLEVIDEO "RtcEngine_enableVideo" -#define FUNC_RTCENGINE_DISABLEVIDEO "RtcEngine_disableVideo" -#define FUNC_RTCENGINE_STARTPREVIEW "RtcEngine_startPreview" -#define FUNC_RTCENGINE_STARTPREVIEW2 "RtcEngine_startPreview2" -#define FUNC_RTCENGINE_STOPPREVIEW "RtcEngine_stopPreview" -#define FUNC_RTCENGINE_STOPPREVIEW2 "RtcEngine_stopPreview2" -#define FUNC_RTCENGINE_STARTLASTMILEPROBETEST "RtcEngine_startLastmileProbeTest" -#define FUNC_RTCENGINE_STOPLASTMILEPROBETEST "RtcEngine_stopLastmileProbeTest" -#define FUNC_RTCENGINE_SETVIDEOENCODERCONFIGURATION \ - "RtcEngine_setVideoEncoderConfiguration" -#define FUNC_RTCENGINE_SETBEAUTYEFFECTOPTIONS "RtcEngine_setBeautyEffectOptions" -#define FUNC_RTCENGINE_ENABLEVIRTUALBACKGROUND \ - "RtcEngine_enableVirtualBackground" -#define FUNC_RTCENGINE_SETREMOTEVIDEOSUBSCRIPTIONOPTIONS \ - "RtcEngine_setRemoteVideoSubscriptionOptions" -#define FUNC_RTCENGINEEX_SETREMOTEVIDEOSUBSCRIPTIONOPTIONSEX \ - "RtcEngineEx_setRemoteVideoSubscriptionOptionsEx" -#define FUNC_RTCENGINE_ENABLEVIDEOIMAGESOURCE "RtcEngine_enableVideoImageSource" -#define FUNC_RTCENGINE_ENABLECONTENTINSPECT "RtcEngine_enableContentInspect" -#define FUNC_RTCENGINE_GETCURRENTMONOTONICTIMEINMS \ - "RtcEngine_getCurrentMonotonicTimeInMs" -#define FUNC_RTCENGINE_SETEARMONITORINGAUDIOFRAMEPARAMETERS \ - "RtcEngine_setEarMonitoringAudioFrameParameters" -#define FUNC_RTCENGINE_SETUPREMOTEVIDEO "RtcEngine_setupRemoteVideo" -#define FUNC_RTCENGINE_SETUPLOCALVIDEO "RtcEngine_setupLocalVideo" -#define FUNC_RTCENGINE_SETVIDEOSCENARIO "RtcEngine_setVideoScenario" -#define FUNC_RTCENGINE_ENABLEAUDIO "RtcEngine_enableAudio" -#define FUNC_RTCENGINE_DISABLEAUDIO "RtcEngine_disableAudio" -#define FUNC_RTCENGINE_SETAUDIOPROFILE "RtcEngine_setAudioProfile" -#define FUNC_RTCENGINE_SETAUDIOPROFILE2 "RtcEngine_setAudioProfile2" -#define FUNC_RTCENGINE_ENABLELOCALAUDIO "RtcEngine_enableLocalAudio" -#define FUNC_RTCENGINE_MUTELOCALAUDIOSTREAM "RtcEngine_muteLocalAudioStream" -#define FUNC_RTCENGINE_MUTEALLREMOTEAUDIOSTREAMS \ - "RtcEngine_muteAllRemoteAudioStreams" -#define FUNC_RTCENGINE_SETDEFAULTMUTEALLREMOTEAUDIOSTREAMS \ - "RtcEngine_setDefaultMuteAllRemoteAudioStreams" -#define FUNC_RTCENGINE_MUTEREMOTEAUDIOSTREAM "RtcEngine_muteRemoteAudioStream" -#define FUNC_RTCENGINE_MUTELOCALVIDEOSTREAM "RtcEngine_muteLocalVideoStream" -#define FUNC_RTCENGINE_ENABLELOCALVIDEO "RtcEngine_enableLocalVideo" -#define FUNC_RTCENGINE_MUTEALLREMOTEVIDEOSTREAMS \ - "RtcEngine_muteAllRemoteVideoStreams" -#define FUNC_RTCENGINE_SETDEFAULTMUTEALLREMOTEVIDEOSTREAMS \ - "RtcEngine_setDefaultMuteAllRemoteVideoStreams" -#define FUNC_RTCENGINE_MUTEREMOTEVIDEOSTREAM "RtcEngine_muteRemoteVideoStream" -#define FUNC_RTCENGINE_SETREMOTEVIDEOSTREAMTYPE \ - "RtcEngine_setRemoteVideoStreamType" -#define FUNC_RTCENGINE_SETREMOTEDEFAULTVIDEOSTREAMTYPE \ - "RtcEngine_setRemoteDefaultVideoStreamType" -#define FUNC_RTCENGINE_ENABLEAUDIOVOLUMEINDICATION \ - "RtcEngine_enableAudioVolumeIndication" -#define FUNC_RTCENGINE_STARTAUDIORECORDING "RtcEngine_startAudioRecording" -#define FUNC_RTCENGINE_STARTAUDIORECORDING2 "RtcEngine_startAudioRecording2" -#define FUNC_RTCENGINE_STARTAUDIORECORDING3 "RtcEngine_startAudioRecording3" -#define FUNC_RTCENGINE_REGISTERAUDIOENCODEDFRAMEOBSERVER \ - "RtcEngine_registerAudioEncodedFrameObserver" -#define FUNC_RTCENGINE_UNREGISTERAUDIOENCODEDFRAMEOBSERVER \ - "RtcEngine_unregisterAudioEncodedFrameObserver" - -#define FUNC_RTCENGINE_STOPAUDIORECORDING "RtcEngine_stopAudioRecording" -#define FUNC_RTCENGINE_CREATEMEDIAPLAYER "RtcEngine_createMediaPlayer" -#define FUNC_RTCENGINE_DESTROYMEDIAPLAYER "RtcEngine_destroyMediaPlayer" -#define FUNC_RTCENGINE_STARTAUDIOMIXING "RtcEngine_startAudioMixing" -#define FUNC_RTCENGINE_STARTAUDIOMIXING2 "RtcEngine_startAudioMixing2" -#define FUNC_RTCENGINE_STOPAUDIOMIXING "RtcEngine_stopAudioMixing" -#define FUNC_RTCENGINE_PAUSEAUDIOMIXING "RtcEngine_pauseAudioMixing" -#define FUNC_RTCENGINE_RESUMEAUDIOMIXING "RtcEngine_resumeAudioMixing" -#define FUNC_RTCENGINE_ADJUSTAUDIOMIXINGVOLUME \ - "RtcEngine_adjustAudioMixingVolume" -#define FUNC_RTCENGINE_ADJUSTAUDIOMIXINGPUBLISHVOLUME \ - "RtcEngine_adjustAudioMixingPublishVolume" -#define FUNC_RTCENGINE_GETAUDIOMIXINGPUBLISHVOLUME \ - "RtcEngine_getAudioMixingPublishVolume" -#define FUNC_RTCENGINE_ADJUSTAUDIOMIXINGPLAYOUTVOLUME \ - "RtcEngine_adjustAudioMixingPlayoutVolume" -#define FUNC_RTCENGINE_GETAUDIOMIXINGPLAYOUTVOLUME \ - "RtcEngine_getAudioMixingPlayoutVolume" -#define FUNC_RTCENGINE_GETAUDIOMIXINGDURATION "RtcEngine_getAudioMixingDuration" -#define FUNC_RTCENGINE_GETAUDIOMIXINGCURRENTPOSITION \ - "RtcEngine_getAudioMixingCurrentPosition" -#define FUNC_RTCENGINE_SETAUDIOMIXINGPOSITION "RtcEngine_setAudioMixingPosition" -#define FUNC_RTCENGINE_SETAUDIOMIXINGPITCH "RtcEngine_setAudioMixingPitch" -#define FUNC_RTCENGINE_GETEFFECTSVOLUME "RtcEngine_getEffectsVolume" -#define FUNC_RTCENGINE_SETEFFECTSVOLUME "RtcEngine_setEffectsVolume" -#define FUNC_RTCENGINE_PRELOADEFFECT "RtcEngine_preloadEffect" -#define FUNC_RTCENGINE_PLAYEFFECT "RtcEngine_playEffect" -#define FUNC_RTCENGINE_PLAYALLEFFECTS "RtcEngine_playAllEffects" -#define FUNC_RTCENGINE_GETVOLUMEOFEFFECT "RtcEngine_getVolumeOfEffect" -#define FUNC_RTCENGINE_SETVOLUMEOFEFFECT "RtcEngine_setVolumeOfEffect" -#define FUNC_RTCENGINE_PAUSEEFFECT "RtcEngine_pauseEffect" -#define FUNC_RTCENGINE_PAUSEALLEFFECTS "RtcEngine_pauseAllEffects" -#define FUNC_RTCENGINE_RESUMEEFFECT "RtcEngine_resumeEffect" -#define FUNC_RTCENGINE_RESUMEALLEFFECTS "RtcEngine_resumeAllEffects" -#define FUNC_RTCENGINE_STOPEFFECT "RtcEngine_stopEffect" -#define FUNC_RTCENGINE_STOPALLEFFECTS "RtcEngine_stopAllEffects" -#define FUNC_RTCENGINE_UNLOADEFFECT "RtcEngine_unloadEffect" -#define FUNC_RTCENGINE_UNLOADALLEFFECTS "RtcEngine_unloadAllEffects" -#define FUNC_RTCENGINE_ENABLESOUNDPOSITIONINDICATION \ - "RtcEngine_enableSoundPositionIndication" -#define FUNC_RTCENGINE_SETREMOTEVOICEPOSITION "RtcEngine_setRemoteVoicePosition" -#define FUNC_RTCENGINE_ENABLESPATIALAUDIO "RtcEngine_enableSpatialAudio" -#define FUNC_RTCENGINE_SETREMOTEUSERSPATIALAUDIOPARAMS \ - "RtcEngine_setRemoteUserSpatialAudioParams" -#define FUNC_RTCENGINE_SETVOICEBEAUTIFIERPRESET \ - "RtcEngine_setVoiceBeautifierPreset" -#define FUNC_RTCENGINE_SETAUDIOEFFECTPRESET "RtcEngine_setAudioEffectPreset" -#define FUNC_RTCENGINE_SETVOICECONVERSIONPRESET \ - "RtcEngine_setVoiceConversionPreset" -#define FUNC_RTCENGINE_SETAUDIOEFFECTPARAMETERS \ - "RtcEngine_setAudioEffectParameters" -#define FUNC_RTCENGINE_SETVOICEBEAUTIFIERPARAMETERS \ - "RtcEngine_setVoiceBeautifierParameters" -#define FUNC_RTCENGINE_SETVOICECONVERSIONPARAMETERS \ - "RtcEngine_setVoiceConversionParameters" -#define FUNC_RTCENGINE_SETLOCALVOICEPITCH "RtcEngine_setLocalVoicePitch" -#define FUNC_RTCENGINE_SETLOCALVOICEFORMANT "RtcEngine_setLocalVoiceFormant" -#define FUNC_RTCENGINE_SETLOCALVOICEEQUALIZATION \ - "RtcEngine_setLocalVoiceEqualization" -#define FUNC_RTCENGINE_SETLOCALVOICEREVERB "RtcEngine_setLocalVoiceReverb" -#define FUNC_RTCENGINE_SETLOGFILE "RtcEngine_setLogFile" -#define FUNC_RTCENGINE_SETLOGFILTER "RtcEngine_setLogFilter" -#define FUNC_RTCENGINE_SETLOGLEVEL "RtcEngine_setLogLevel" -#define FUNC_RTCENGINE_SETLOGFILESIZE "RtcEngine_setLogFileSize" -#define FUNC_RTCENGINE_UPLOADLOGFILE "RtcEngine_uploadLogFile" -#define FUNC_RTCENGINE_SETLOCALRENDERMODE "RtcEngine_setLocalRenderMode" -#define FUNC_RTCENGINE_SETREMOTERENDERMODE "RtcEngine_setRemoteRenderMode" -#define FUNC_RTCENGINE_SETLOCALRENDERMODE2 "RtcEngine_setLocalRenderMode2" -#define FUNC_RTCENGINE_SETLOCALVIDEOMIRRORMODE \ - "RtcEngine_setLocalVideoMirrorMode" -#define FUNC_RTCENGINE_ENABLEDUALSTREAMMODE "RtcEngine_enableDualStreamMode" -#define FUNC_RTCENGINE_ENABLEDUALSTREAMMODE2 "RtcEngine_enableDualStreamMode2" - -#define FUNC_RTCENGINE_ENABLECUSTOMAUDIOLOCALPLAYBACK \ - "RtcEngine_enableCustomAudioLocalPlayback" -#define FUNC_RTCENGINE_SETRECORDINGAUDIOFRAMEPARAMETERS \ - "RtcEngine_setRecordingAudioFrameParameters" -#define FUNC_RTCENGINE_SETPLAYBACKAUDIOFRAMEPARAMETERS \ - "RtcEngine_setPlaybackAudioFrameParameters" -#define FUNC_RTCENGINE_SETMIXEDAUDIOFRAMEPARAMETERS \ - "RtcEngine_setMixedAudioFrameParameters" -#define FUNC_RTCENGINE_SETPLAYBACKAUDIOFRAMEBEFOREMIXINGPARAMETERS \ - "RtcEngine_setPlaybackAudioFrameBeforeMixingParameters" -#define FUNC_RTCENGINE_ENABLEAUDIOSPECTRUMMONITOR \ - "RtcEngine_enableAudioSpectrumMonitor" -#define FUNC_RTCENGINE_DISABLEAUDIOSPECTRUMMONITOR \ - "RtcEngine_disableAudioSpectrumMonitor" -#define FUNC_RTCENGINE_REGISTERAUDIOSPECTRUMOBSERVER \ - "RtcEngine_registerAudioSpectrumObserver" -#define FUNC_RTCENGINE_UNREGISTERAUDIOSPECTRUMOBSERVER \ - "RtcEngine_unregisterAudioSpectrumObserver" -#define FUNC_RTCENGINE_REGISTERAUDIOSPECTRUMOBSERVER_OBSERVER \ - "RtcEngine_registerAudioSpectrumObserverObserver" -#define FUNC_RTCENGINE_UNREGISTERAUDIOSPECTRUMOBSERVER_OBSERVER \ - "RtcEngine_unregisterAudioSpectrumObserverObserver" - -#define FUNC_RTCENGINE_ADJUSTRECORDINGSIGNALVOLUME \ - "RtcEngine_adjustRecordingSignalVolume" -#define FUNC_RTCENGINE_MUTERECORDINGSIGNAL "RtcEngine_muteRecordingSignal" -#define FUNC_RTCENGINE_ADJUSTPLAYBACKSIGNALVOLUME \ - "RtcEngine_adjustPlaybackSignalVolume" -#define FUNC_RTCENGINE_ADJUSTUSERPLAYBACKSIGNALVOLUME \ - "RtcEngine_adjustUserPlaybackSignalVolume" -#define FUNC_RTCENGINE_SETLOCALPUBLISHFALLBACKOPTION \ - "RtcEngine_setLocalPublishFallbackOption" -#define FUNC_RTCENGINE_SETREMOTESUBSCRIBEFALLBACKOPTION \ - "RtcEngine_setRemoteSubscribeFallbackOption" -#define FUNC_RTCENGINE_SETHIGHPRIORITYUSERLIST \ - "RtcEngine_setHighPriorityUserList" -#define FUNC_RTCENGINE_ENABLELOOPBACKRECORDING \ - "RtcEngine_enableLoopbackRecording" -#define FUNC_RTCENGINE_ADJUSTLOOPBACKRECORDINGVOLUME \ - "RtcEngine_adjustLoopbackRecordingVolume" -#define FUNC_RTCENGINE_GETLOOPBACKRECORDINGVOLUME \ - "RtcEngine_getLoopbackRecordingVolume" -#define FUNC_RTCENGINE_ENABLEINEARMONITORING "RtcEngine_enableInEarMonitoring" -#define FUNC_RTCENGINE_SETINEARMONITORINGVOLUME \ - "RtcEngine_setInEarMonitoringVolume" -#define FUNC_RTCENGINE_LOADEXTENSIONPROVIDER "RtcEngine_loadExtensionProvider" -#define FUNC_RTCENGINE_SETEXTENSIONPROVIDERPROPERTY \ - "RtcEngine_setExtensionProviderProperty" -#define FUNC_RTCENGINE_ENABLEEXTENSION "RtcEngine_enableExtension" -#define FUNC_RTCENGINE_SETEXTENSIONPROPERTY "RtcEngine_setExtensionProperty" -#define FUNC_RTCENGINE_GETEXTENSIONPROPERTY "RtcEngine_getExtensionProperty" -#define FUNC_RTCENGINE_SETCAMERACAPTURERCONFIGURATION \ - "RtcEngine_setCameraCapturerConfiguration" -#define FUNC_RTCENGINE_SWITCHCAMERA "RtcEngine_switchCamera" -#define FUNC_RTCENGINE_ISCAMERAZOOMSUPPORTED "RtcEngine_isCameraZoomSupported" -#define FUNC_RTCENGINE_ISCAMERAFACEDETECTSUPPORTED \ - "RtcEngine_isCameraFaceDetectSupported" -#define FUNC_RTCENGINE_ISCAMERATORCHSUPPORTED "RtcEngine_isCameraTorchSupported" -#define FUNC_RTCENGINE_ISCAMERAFOCUSSUPPORTED "RtcEngine_isCameraFocusSupported" -#define FUNC_RTCENGINE_ISCAMERAAUTOFOCUSFACEMODESUPPORTED \ - "RtcEngine_isCameraAutoFocusFaceModeSupported" -#define FUNC_RTCENGINE_SETCAMERAZOOMFACTOR "RtcEngine_setCameraZoomFactor" -#define FUNC_RTCENGINE_ENABLEFACEDETECTION "RtcEngine_enableFaceDetection" -#define FUNC_RTCENGINE_GETCAMERAMAXZOOMFACTOR "RtcEngine_getCameraMaxZoomFactor" -#define FUNC_RTCENGINE_SETCAMERAFOCUSPOSITIONINPREVIEW \ - "RtcEngine_setCameraFocusPositionInPreview" -#define FUNC_RTCENGINE_SETCAMERATORCHON "RtcEngine_setCameraTorchOn" -#define FUNC_RTCENGINE_SETCAMERAAUTOFOCUSFACEMODEENABLED \ - "RtcEngine_setCameraAutoFocusFaceModeEnabled" -#define FUNC_RTCENGINE_ISCAMERAEXPOSUREPOSITIONSUPPORTED \ - "RtcEngine_isCameraExposurePositionSupported" -#define FUNC_RTCENGINE_ISCAMERAEXPOSURESUPPORTED \ - "RtcEngine_isCameraExposureSupported" -#define FUNC_RTCENGINE_SETCAMERAEXPOSUREFACTOR \ - "RtcEngine_setCameraExposureFactor" -#define FUNC_RTCENGINE_SETCAMERAEXPOSUREPOSITION \ - "RtcEngine_setCameraExposurePosition" -#define FUNC_RTCENGINE_ISCAMERAAUTOEXPOSUREFACEMODESUPPORTED \ - "RtcEngine_isCameraAutoExposureFaceModeSupported" -#define FUNC_RTCENGINE_SETCAMERAAUTOEXPOSUREFACEMODEENABLED \ - "RtcEngine_setCameraAutoExposureFaceModeEnabled" -#define FUNC_RTCENGINE_SETDEFAULTAUDIOROUTETOSPEAKERPHONE \ - "RtcEngine_setDefaultAudioRouteToSpeakerphone" -#define FUNC_RTCENGINE_SETENABLESPEAKERPHONE "RtcEngine_setEnableSpeakerphone" -#define FUNC_RTCENGINE_ISSPEAKERPHONEENABLED "RtcEngine_isSpeakerphoneEnabled" -#define FUNC_RTCENGINE_SETROUTEINCOMMUNICATIONMODE \ - "RtcEngine_setRouteInCommunicationMode" -#define FUNC_RTCENGINE_GETSCREENCAPTURESOURCES \ - "RtcEngine_getScreenCaptureSources" -#define FUNC_RTCENGINE_RELEASESCREENCAPTURESOURCES \ - "RtcEngine_releaseScreenCaptureSources" -#define FUNC_RTCENGINE_SETAUDIOSESSIONOPERATIONRESTRICTION \ - "RtcEngine_setAudioSessionOperationRestriction" -#define FUNC_RTCENGINE_STARTSCREENCAPTUREBYSCREENRECT \ - "RtcEngine_startScreenCaptureByScreenRect" -#define FUNC_RTCENGINE_STARTSCREENCAPTURE "RtcEngine_startScreenCapture" -#define FUNC_RTCENGINE_GETAUDIODEVICEINFO "RtcEngine_getAudioDeviceInfo" -#define FUNC_RTCENGINE_STARTSCREENCAPTUREBYWINDOWID \ - "RtcEngine_startScreenCaptureByWindowId" -#define FUNC_RTCENGINE_SETSCREENCAPTURECONTENTHINT \ - "RtcEngine_setScreenCaptureContentHint" -#define FUNC_RTCENGINE_UPDATESCREENCAPTUREREGION \ - "RtcEngine_updateScreenCaptureRegion" -#define FUNC_RTCENGINE_UPDATESCREENCAPTUREPARAMETERS \ - "RtcEngine_updateScreenCaptureParameters" -#define FUNC_RTCENGINE_STOPSCREENCAPTURE "RtcEngine_stopScreenCapture" -#define FUNC_RTCENGINE_GETCALLID "RtcEngine_getCallId" -#define FUNC_RTCENGINE_RATE "RtcEngine_rate" -#define FUNC_RTCENGINE_COMPLAIN "RtcEngine_complain" -//#define FUNC_RTCENGINE_ADDPUBLISHSTREAMURL "RtcEngine_addPublishStreamUrl" -//#define FUNC_RTCENGINE_REMOVEPUBLISHSTREAMURL "RtcEngine_removePublishStreamUrl" -//#define FUNC_RTCENGINE_SETLIVETRANSCODING "RtcEngine_setLiveTranscoding" -#define FUNC_RTCENGINE_STARTRTMPSTREAMWITHOUTTRANSCODING \ - "RtcEngine_startRtmpStreamWithoutTranscoding" -#define FUNC_RTCENGINE_STARTRTMPSTREAMWITHTRANSCODING \ - "RtcEngine_startRtmpStreamWithTranscoding" -#define FUNC_RTCENGINE_UPDATERTMPTRANSCODING "RtcEngine_updateRtmpTranscoding" -#define FUNC_RTCENGINE_STOPRTMPSTREAM "RtcEngine_stopRtmpStream" -#define FUNC_RTCENGINE_STARTLOCALVIDEOTRANSCODER \ - "RtcEngine_startLocalVideoTranscoder" -#define FUNC_RTCENGINE_UPDATELOCALTRANSCODERCONFIGURATION \ - "RtcEngine_updateLocalTranscoderConfiguration" -#define FUNC_RTCENGINE_STOPLOCALVIDEOTRANSCODER \ - "RtcEngine_stopLocalVideoTranscoder" -#define FUNC_RTCENGINE_STARTCAMERACAPTURE "RtcEngine_startCameraCapture" -#define FUNC_RTCENGINE_STOPCAMERACAPTURE "RtcEngine_stopCameraCapture" -#define FUNC_RTCENGINE_SETCAMERADEVICEORIENTATION \ - "RtcEngine_setCameraDeviceOrientation" -#define FUNC_RTCENGINE_SETSCREENCAPTUREORIENTATION \ - "RtcEngine_setScreenCaptureOrientation" -#define FUNC_RTCENGINE_STARTSCREENCAPTURE2 "RtcEngine_startScreenCapture2" -#define FUNC_RTCENGINE_STOPSCREENCAPTURE2 "RtcEngine_stopScreenCapture2" -#define FUNC_RTCENGINE_GETCONNECTIONSTATE "RtcEngine_getConnectionState" -#define FUNC_RTCENGINE_REGISTEREVENTHANDLER "RtcEngine_registerEventHandler" -#define FUNC_RTCENGINE_UNREGISTEREVENTHANDLER "RtcEngine_unregisterEventHandler" -#define FUNC_RTCENGINE_SETREMOTEUSERPRIORITY "RtcEngine_setRemoteUserPriority" -#define FUNC_RTCENGINE_REGISTERPACKETOBSERVER "RtcEngine_registerPacketObserver" -#define FUNC_RTCENGINE_SETENCRYPTIONMODE "RtcEngine_setEncryptionMode" -#define FUNC_RTCENGINE_SETENCRYPTIONSECRET "RtcEngine_setEncryptionSecret" -#define FUNC_RTCENGINE_ENABLEENCRYPTION "RtcEngine_enableEncryption" -#define FUNC_RTCENGINE_CREATEDATASTREAM "RtcEngine_createDataStream" -#define FUNC_RTCENGINE_CREATEDATASTREAM2 "RtcEngine_createDataStream2" -#define FUNC_RTCENGINE_SENDSTREAMMESSAGE "RtcEngine_sendStreamMessage" -#define FUNC_RTCENGINE_ADDVIDEOWATERMARK "RtcEngine_addVideoWatermark" -#define FUNC_RTCENGINE_ADDVIDEOWATERMARK2 "RtcEngine_addVideoWatermark2" -//#define FUNC_RTCENGINE_CLEARVIDEOWATERMARK "RtcEngine_clearVideoWatermark" -#define FUNC_RTCENGINE_CLEARVIDEOWATERMARKS "RtcEngine_clearVideoWatermarks" -#define FUNC_RTCENGINE_PAUSEAUDIO "RtcEngine_pauseAudio" -#define FUNC_RTCENGINE_RESUMEAUDIO "RtcEngine_resumeAudio" -#define FUNC_RTCENGINE_ENABLEWEBSDKINTEROPERABILITY \ - "RtcEngine_enableWebSdkInteroperability" -#define FUNC_RTCENGINE_SENDCUSTOMREPORTMESSAGE \ - "RtcEngine_sendCustomReportMessage" - -#define FUNC_RTCENGINE_REGISTERMEDIAMETADATAOBSERVER \ - "RtcEngine_registerMediaMetadataObserver" -#define FUNC_RTCENGINE_UNREGISTERMEDIAMETADATAOBSERVER \ - "RtcEngine_unregisterMediaMetadataObserver" - -#define FUNC_RTCENGINE_STARTAUDIOFRAMEDUMP "RtcEngine_startAudioFrameDump" -#define FUNC_RTCENGINE_STOPAUDIOFRAMEDUMP "RtcEngine_stopAudioFrameDump" -#define FUNC_RTCENGINE_SETAINSMODE "RtcEngine_setAINSMode" -#define FUNC_RTCENGINE_REGISTERLOCALUSERACCOUNT \ - "RtcEngine_registerLocalUserAccount" -#define FUNC_RTCENGINE_JOINCHANNELWITHUSERACCOUNT \ - "RtcEngine_joinChannelWithUserAccount" -#define FUNC_RTCENGINE_JOINCHANNELWITHUSERACCOUNT2 \ - "RtcEngine_joinChannelWithUserAccount2" -#define FUNC_RTCENGINE_JOINCHANNELWITHUSERACCOUNTEX \ - "RtcEngine_joinChannelWithUserAccountEx" -#define FUNC_RTCENGINE_GETUSERINFOBYUSERACCOUNT \ - "RtcEngine_getUserInfoByUserAccount" -#define FUNC_RTCENGINE_GETUSERINFOBYUID "RtcEngine_getUserInfoByUid" -#define FUNC_RTCENGINE_STARTCHANNELMEDIARELAY "RtcEngine_startChannelMediaRelay" -#define FUNC_RTCENGINE_UPDATECHANNELMEDIARELAY \ - "RtcEngine_updateChannelMediaRelay" -#define FUNC_RTCENGINE_STOPCHANNELMEDIARELAY "RtcEngine_stopChannelMediaRelay" -#define FUNC_RTCENGINE_PAUSEALLCHANNELMEDIARELAY \ - "RtcEngine_pauseAllChannelMediaRelay" -#define FUNC_RTCENGINE_RESUMEALLCHANNELMEDIARELAY \ - "RtcEngine_resumeAllChannelMediaRelay" -#define FUNC_RTCENGINE_SETDIRECTCDNSTREAMINGAUDIOCONFIGURATION \ - "RtcEngine_setDirectCdnStreamingAudioConfiguration" -#define FUNC_RTCENGINE_SETDIRECTCDNSTREAMINGVIDEOCONFIGURATION \ - "RtcEngine_setDirectCdnStreamingVideoConfiguration" -#define FUNC_RTCENGINE_STARTDIRECTCDNSTREAMING \ - "RtcEngine_startDirectCdnStreaming" -#define FUNC_RTCENGINE_STOPDIRECTCDNSTREAMING "RtcEngine_stopDirectCdnStreaming" -#define FUNC_RTCENGINE_UPDATEDIRECTCDNSTREAMINGMEDIAOPTIONS \ - "RtcEngine_updateDirectCdnStreamingMediaOptions" -//to delete -//#define FUNC_RTCENGINE_PUSHDIRECTCDNSTREAMINGCUSTOMVIDEOFRAME \ -// "RtcEngine_pushDirectCdnStreamingCustomVideoFrame" -#define FUNC_RTCENGINE_TAKESNAPSHOT "RtcEngine_takeSnapshot" -//to delete -//#define FUNC_RTCENGINE_SETCONTENTINSPECT "RtcEngine_SetContentInspect" -//#define FUNC_RTCENGINE_SWITCHCHANNEL "RtcEngine_switchChannel" -#define FUNC_RTCENGINE_STARTRHYTHMPLAYER "RtcEngine_startRhythmPlayer" -#define FUNC_RTCENGINE_STOPRHYTHMPLAYER "RtcEngine_stopRhythmPlayer" -#define FUNC_RTCENGINE_CONFIGRHYTHMPLAYER "RtcEngine_configRhythmPlayer" -#define FUNC_RTCENGINE_ADJUSTCUSTOMAUDIOPUBLISHVOLUME \ - "RtcEngine_adjustCustomAudioPublishVolume" -#define FUNC_RTCENGINE_ADJUSTCUSTOMAUDIOPLAYOUTVOLUME \ - "RtcEngine_adjustCustomAudioPlayoutVolume" -#define FUNC_RTCENGINE_SETCLOUDPROXY "RtcEngine_setCloudProxy" -#define FUNC_RTCENGINE_SETLOCALACCESSPOINT "RtcEngine_setLocalAccessPoint" -//#define FUNC_RTCENGINE_ENABLEFISHEYECORRECTION \ -// "RtcEngine_enableFishEyeCorrection" -#define FUNC_RTCENGINE_SETADVANCEDAUDIOOPTIONS \ - "RtcEngine_setAdvancedAudioOptions" -#define FUNC_RTCENGINE_SETAVSYNCSOURCE "RtcEngine_setAVSyncSource" -#define FUNC_RTCENGINE_STARTSCREENCAPTUREBYDISPLAYID \ - "RtcEngine_startScreenCaptureByDisplayId" -#define FUNC_RTCENGINE_SETMAXMETADATASIZE "RtcEngine_setMaxMetadataSize" -#define FUNC_RTCENGINE_SENDMETADATA "RtcEngine_sendMetaData" - -#define FUNC_RTCENGINE_SETVIDEODENOISEROPTIONS \ - "RtcEngine_setVideoDenoiserOptions" - -#define FUNC_RTCENGINE_DESTROYCUSTOMVIDEOTRACK \ - "RtcEngine_destroyCustomVideoTrack" -#define FUNC_RTCENGINE_SETSUBSCRIBEAUDIOBLOCKLIST \ - "RtcEngine_setSubscribeAudioBlocklist" - -#define FUNC_RTCENGINE_SETLOWLIGHTENHANCEOPTIONS \ - "RtcEngine_setLowlightEnhanceOptions" -#define FUNC_RTCENGINE_SETCOLORENHANCEOPTIONS "RtcEngine_setColorEnhanceOptions" -#define FUNC_RTCENGINE_ENABLEVIRTUALBACKGROUND \ - "RtcEngine_enableVirtualBackground" -#define FUNC_RTCENGINE_SETAUDIOSCENARIO "RtcEngine_setAudioScenario" -#define FUNC_RTCENGINE_SETREMOTEVIDEOSUBSCRIPTIONOPTIONS \ - "RtcEngine_setRemoteVideoSubscriptionOptions" -#define FUNC_RTCENGINE_SETSUBSCRIBEAUDIOALLOWLIST \ - "RtcEngine_setSubscribeAudioAllowlist" -#define FUNC_RTCENGINE_SETSUBSCRIBEVIDEOBLOCKLIST \ - "RtcEngine_setSubscribeVideoBlocklist" -#define FUNC_RTCENGINE_SETSUBSCRIBEVIDEOALLOWLIST \ - "RtcEngine_setSubscribeVideoAllowlist" -#define FUNC_RTCENGINE_UPDATESCREENCAPTURE "RtcEngine_updateScreenCapture" -#define FUNC_RTCENGINE_QUERYSCREENCAPTURECAPABILITY \ - "RtcEngine_queryScreenCaptureCapability" -#define FUNC_RTCENGINE_SELECTAUDIOTRACK "RtcEngine_selectAudioTrack" -#define FUNC_RTCENGINE_GETAUDIOTRACKCOUNT "RtcEngine_getAudioTrackCount" -#define FUNC_RTCENGINE_SETAUDIOMIXINGDUALMONOMODE \ - "RtcEngine_setAudioMixingDualMonoMode" -#define FUNC_RTCENGINE_CREATECUSTOMENCODEDVIDEOTRACK \ - "RtcEngine_createCustomEncodedVideoTrack" -#define FUNC_RTCENGINE_CREATECUSTOMVIDEOTRACK "RtcEngine_createCustomVideoTrack" -#define FUNC_RTCENGINE_ADJUSTLOOPBACKSIGNALVOLUME \ - "RtcEngine_adjustLoopbackSignalVolume" -#define FUNC_RTCENGINE_SETADVANCEDAUDIOOPTIONS \ - "RtcEngine_setAdvancedAudioOptions" -#define FUNC_RTCENGINE_DESTROYCUSTOMENCODEDVIDEOTRACK \ - "RtcEngine_destroyCustomEncodedVideoTrack" -#define FUNC_RTCENGINE_SETSCREENCAPTURESCENARIO \ - "RtcEngine_setScreenCaptureScenario" -#define FUNC_RTCENGINE_STARTSCREENCAPTURE "RtcEngine_startScreenCapture" -#define FUNC_RTCENGINE_ENABLEWIRELESSACCELERATE \ - "RtcEngine_enableWirelessAccelerate" -#define FUNC_RTCENGINE_ENABLECONTENTINSPECT "RtcEngine_enableContentInspect" -#define FUNC_RTCENGINE_ENABLEVIDEOIMAGESOURCE "RtcEngine_enableVideoImageSource" -#define FUNC_RTCENGINE_SETDUALSTREAMMODE "RtcEngine_setDualStreamMode" -#define FUNC_RTCENGINE_SETDUALSTREAMMODE2 "RtcEngine_setDualStreamMode2" -#define FUNC_RTCENGINE_GETEFFECTCURRENTPOSITION \ - "RtcEngine_getEffectCurrentPosition" -#define FUNC_RTCENGINE_GETEFFECTDURATION "RtcEngine_getEffectDuration" -#define FUNC_RTCENGINE_SETEFFECTPOSITION "RtcEngine_setEffectPosition" -#define FUNC_RTCENGINE_GETNATIVEHANDLE "RtcEngine_getNativeHandle" - -#define FUNC_RTCENGINE_GETNETWORKTYPE "RtcEngine_getNetworkType" -#define FUNC_RTCENGINE_SETADVANCEDAUDIOOPTIONS \ - "RtcEngine_setAdvancedAudioOptions" -#define FUNC_RTCENGINE_SETEARMONITORINGAUDIOFRAMEPARAMETERS \ - "RtcEngine_setEarMonitoringAudioFrameParameters" -#define FUNC_RTCENGINE_ENABLEMULTICAMERA "RtcEngine_enableMultiCamera" -#define FUNC_RTCENGINE_GETCURRENTMONOTONICTIMEINMS \ - "RtcEngine_getCurrentMonotonicTimeInMs" -#define FUNC_RTCENGINE_SETHEADPHONEEQPARAMETERS \ - "RtcEngine_setHeadphoneEQParameters" -#define FUNC_RTCENGINE_SETHEADPHONEEQPRESET "RtcEngine_setHeadphoneEQPreset" -#define FUNC_RTCENGINE_SETEXTENSIONPROPERTY2 "RtcEngine_setExtensionProperty2" -#define FUNC_RTCENGINE_ENABLEEXTENSION2 "RtcEngine_enableExtension2" -#define FUNC_RTCENGINE_GETEXTENSIONPROPERTY2 "RtcEngine_getExtensionProperty2" -#define FUNC_RTCENGINE_REGISTEREXTENSION "RtcEngine_registerExtension" -#define FUNC_RTCENGINE_STARTORUPDATECHANNELMEDIARELAY \ - "RtcEngine_startOrUpdateChannelMediaRelay" -#define FUNC_RTCENGINE_GETNTPWALLTIMEINMS "RtcEngine_getNtpWallTimeInMs" -#define FUNC_RTCENGINE_ISFEATUREAVAILABLEONDEVICE \ - "RtcEngine_isFeatureAvailableOnDevice" -#define FUNC_RTCENGINE_PRELOADCHANNEL "RtcEngine_preloadChannel" -#define FUNC_RTCENGINE_PRELOADCHANNEL2 "RtcEngine_preloadChannel2" -#define FUNC_RTCENGINE_UPDATEPRELOADCHANNELTOKEN \ - "RtcEngine_updatePreloadChannelToken" -// class IRtcEngine end - -// class IMediaRecorder start -#define FUNC_RTCENGINE_CREATEMEDIARECORDER "RtcEngine_createMediaRecorder" -#define FUNC_RTCENGINE_DESTROYMEDIARECORDER "RtcEngine_destroyMediaRecorder" -#define FUNC_MEDIARECORDER_SETMEDIARECORDEROBSERVER \ - "MediaRecorder_setMediaRecorderObserver" -#define FUNC_MEDIARECORDER_UNSETMEDIARECORDEROBSERVER \ - "MediaRecorder_unsetMediaRecorderObserver" -#define FUNC_MEDIARECORDER_STARTRECORDING "MediaRecorder_startRecording" -#define FUNC_MEDIARECORDER_STOPRECORDING "MediaRecorder_stopRecording" -// class IMediaRecorder end - -// class IMediaPlayer start -#define FUNC_MEDIAPLAYER_INITIALIZE "MediaPlayer_initialize" -#define FUNC_MEDIAPLAYER_GETMEDIAPLAYERID "MediaPlayer_getMediaPlayerId" -#define FUNC_MEDIAPLAYER_OPEN "MediaPlayer_open" -#define FUNC_MEDIAPLAYER_OPENWITHCUSTOMSOURCE "MediaPlayer_openWithCustomSource" -#define FUNC_MEDIAPLAYER_PLAY "MediaPlayer_play" -#define FUNC_MEDIAPLAYER_PAUSE "MediaPlayer_pause" -#define FUNC_MEDIAPLAYER_STOP "MediaPlayer_stop" -#define FUNC_MEDIAPLAYER_RESUME "MediaPlayer_resume" -#define FUNC_MEDIAPLAYER_SEEK "MediaPlayer_seek" -#define FUNC_MEDIAPLAYER_SETAUDIOPITCH "MediaPlayer_setAudioPitch" -#define FUNC_MEDIAPLAYER_GETDURATION "MediaPlayer_getDuration" -#define FUNC_MEDIAPLAYER_GETPLAYPOSITION "MediaPlayer_getPlayPosition" -#define FUNC_MEDIAPLAYER_GETSTREAMCOUNT "MediaPlayer_getStreamCount" -#define FUNC_MEDIAPLAYER_GETSTREAMINFO "MediaPlayer_getStreamInfo" -#define FUNC_MEDIAPLAYER_SETLOOPCOUNT "MediaPlayer_setLoopCount" -/*#define FUNC_MEDIAPLAYER_MUTEAUDIO "MediaPlayer_muteAudio" -#define FUNC_MEDIAPLAYER_ISAUDIOMUTED "MediaPlayer_isAudioMuted" -#define FUNC_MEDIAPLAYER_MUTEVIDEO "MediaPlayer_muteVideo" -#define FUNC_MEDIAPLAYER_ISVIDEOMUTED "MediaPlayer_isVideoMuted"*/ -#define FUNC_MEDIAPLAYER_SETPLAYBACKSPEED "MediaPlayer_setPlaybackSpeed" -#define FUNC_MEDIAPLAYER_SELECTAUDIOTRACK "MediaPlayer_selectAudioTrack" -#define FUNC_MEDIAPLAYER_SETPLAYEROPTION "MediaPlayer_setPlayerOption" -#define FUNC_MEDIAPLAYER_SETPLAYEROPTION2 "MediaPlayer_setPlayerOption2" -#define FUNC_MEDIAPLAYER_TAKESCREENSHOT "MediaPlayer_takeScreenshot" -#define FUNC_MEDIAPLAYER_SELECTINTERNALSUBTITLE \ - "MediaPlayer_selectInternalSubtitle" -#define FUNC_MEDIAPLAYER_SETEXTERNALSUBTITLE "MediaPlayer_setExternalSubtitle" -#define FUNC_MEDIAPLAYER_GETSTATE "MediaPlayer_getState" -#define FUNC_MEDIAPLAYER_MUTE "MediaPlayer_mute" -#define FUNC_MEDIAPLAYER_GETMUTE "MediaPlayer_getMute" -#define FUNC_MEDIAPLAYER_ADJUSTPLAYOUTVOLUME "MediaPlayer_adjustPlayoutVolume" -#define FUNC_MEDIAPLAYER_GETPLAYOUTVOLUME "MediaPlayer_getPlayoutVolume" -#define FUNC_MEDIAPLAYER_ADJUSTPUBLISHSIGNALVOLUME \ - "MediaPlayer_adjustPublishSignalVolume" -#define FUNC_MEDIAPLAYER_GETPUBLISHSIGNALVOLUME \ - "MediaPlayer_getPublishSignalVolume" -#define FUNC_MEDIAPLAYER_SETVIEW "MediaPlayer_setView" -#define FUNC_MEDIAPLAYER_SETRENDERMODE "MediaPlayer_setRenderMode" -#define FUNC_MEDIAPLAYER_REGISTERPLAYERSOURCEOBSERVER \ - "MediaPlayer_registerPlayerSourceObserver" -#define FUNC_MEDIAPLAYER_UNREGISTERPLAYERSOURCEOBSERVER \ - "MediaPlayer_unregisterPlayerSourceObserver" -#define FUNC_MEDIAPLAYER_REGISTERAUDIOFRAMEOBSERVER \ - "MediaPlayer_registerAudioFrameObserver" -#define FUNC_MEDIAPLAYER_UNREGISTERAUDIOFRAMEOBSERVER \ - "MediaPlayer_unregisterAudioFrameObserver" - -#define FUNC_MEDIAPLAYER_REGISTERAUDIOFRAMEOBSERVEROBSERVER \ - "MediaPlayer_registerAudioFrameObserverObserver" -#define FUNC_MEDIAPLAYER_UNREGISTERAUDIOFRAMEOBSERVEROBSERVER \ - "MediaPlayer_unregisterAudioFrameObserverObserver" - -#define FUNC_MEDIAPLAYER_REGISTERVIDEOFRAMEOBSERVER \ - "MediaPlayer_registerVideoFrameObserver" -#define FUNC_MEDIAPLAYER_UNREGISTERVIDEOFRAMEOBSERVER \ - "MediaPlayer_unregisterVideoFrameObserver" -#define FUNC_MEDIAPLAYER_REGISTERVIDEOFRAMEOBSERVEROBSERVER \ - "MediaPlayer_registerVideoFrameObserverObserver" -#define FUNC_MEDIAPLAYER_UNREGISTERVIDEOFRAMEOBSERVEROBSERVER \ - "MediaPlayer_unregisterVideoFrameObserverObserver" - -#define FUNC_MEDIAPLAYER_REGISTERMEDIAPLAYERAUDIOSPECTRUMOBSERVER \ - "MediaPlayer_registerMediaPlayerAudioSpectrumObserver" -#define FUNC_MEDIAPLAYER_UNREGISTERMEDIAPLAYERAUDIOSPECTRUMOBSERVER \ - "MediaPlayer_unregisterMediaPlayerAudioSpectrumObserver" - -#define FUNC_MEDIAPLAYER_REGISTERMEDIAPLAYERAUDIOSPECTRUMOBSERVER_OBSERVER \ - "MediaPlayer_registerMediaPlayerAudioSpectrumObserverObserver" -#define FUNC_MEDIAPLAYER_UNREGISTERMEDIAPLAYERAUDIOSPECTRUMOBSERVER_OBSERVER \ - "MediaPlayer_unregisterMediaPlayerAudioSpectrumObserverObserver" - -#define FUNC_MEDIAPLAYER_SETAUDIODUALMONOMODE "MediaPlayer_setAudioDualMonoMode" -#define FUNC_MEDIAPLAYER_GETPLAYERSDKVERSION "MediaPlayer_getPlayerSdkVersion" -#define FUNC_MEDIAPLAYER_GETPLAYSRC "MediaPlayer_getPlaySrc" -#define FUNC_MEDIAPLAYER_OPENWITHAGORACDNSRC "MediaPlayer_openWithAgoraCDNSrc" -#define FUNC_MEDIAPLAYER_GETAGORACDNLINECOUNT "MediaPlayer_getAgoraCDNLineCount" -#define FUNC_MEDIAPLAYER_SWITCHAGORACDNLINEBYINDEX \ - "MediaPlayer_switchAgoraCDNLineByIndex" -#define FUNC_MEDIAPLAYER_GETCURRENTAGORACDNINDEX \ - "MediaPlayer_getCurrentAgoraCDNIndex" -#define FUNC_MEDIAPLAYER_ENABLEAUTOSWITCHAGORACDN \ - "MediaPlayer_enableAutoSwitchAgoraCDN" -#define FUNC_MEDIAPLAYER_RENEWAGORACDNSRCTOKEN \ - "MediaPlayer_renewAgoraCDNSrcToken" -#define FUNC_MEDIAPLAYER_SWITCHAGORACDNSRC "MediaPlayer_switchAgoraCDNSrc" -#define FUNC_MEDIAPLAYER_SWITCHSRC "MediaPlayer_switchSrc" -#define FUNC_MEDIAPLAYER_PRELOADSRC "MediaPlayer_preloadSrc" -#define FUNC_MEDIAPLAYER_PLAYPRELOADEDSRC "MediaPlayer_playPreloadedSrc" -#define FUNC_MEDIAPLAYER_UNLOADSRC "MediaPlayer_unloadSrc" -#define FUNC_MEDIAPLAYER_SETSPATIALAUDIOPARAMS \ - "MediaPlayer_setSpatialAudioParams" - -#define FUNC_MEDIAPLAYER_SETSOUNDPOSITIONPARAMS \ - "MediaPlayer_setSoundPositionParams" - -#define FUNC_MEDIAPLAYER_OPENWITHMEDIASOURCEPROVIDER \ - "MediaPlayer_openWithMediaSourceProvider" -#define FUNC_MEDIAPLAYER_OPENWITHCUSTOMSOURCEPROVIDER \ - "MediaPlayer_openWithCustomSourceProvider" -#define FUNC_MEDIAPLAYER_UNOPENWITHMEDIASOURCEPROVIDER \ - "MediaPlayer_unOpenWithMediaSourceProvider" -#define FUNC_MEDIAPLAYER_UNOPENWITHCUSTOMSOURCEPROVIDER \ - "MediaPlayer_unOpenWithCustomSourceProvider" - -#define FUNC_MEDIAPLAYER_OPENWITHMEDIASOURCE "MediaPlayer_openWithMediaSource" -#define FUNC_MEDIAPLAYER_OPENWITHCUSTOMSOURCE "MediaPlayer_openWithCustomSource" -#define FUNC_MEDIAPLAYER_UNOPENWITHMEDIASOURCE \ - "MediaPlayer_unOpenWithMediaSource" -#define FUNC_MEDIAPLAYER_UNOPENWITHCUSTOMSOURCE \ - "MediaPlayer_unOpenWithCustomSource" -// class IMediaPlayer end - -// class IMediaPlayerCacheManager start -#define FUNC_MEDIAPLAYERCACHEMANAGER_ENABLEAUTOREMOVECACHE \ - "MediaPlayerCacheManager_enableAutoRemoveCache" -#define FUNC_MEDIAPLAYERCACHEMANAGER_GETCACHEDIR \ - "MediaPlayerCacheManager_getCacheDir" -#define FUNC_MEDIAPLAYERCACHEMANAGER_GETCACHEFILECOUNT \ - "MediaPlayerCacheManager_getCacheFileCount" -#define FUNC_MEDIAPLAYERCACHEMANAGER_GETMAXCACHEFILECOUNT \ - "MediaPlayerCacheManager_getMaxCacheFileCount" -#define FUNC_MEDIAPLAYERCACHEMANAGER_GETMAXCACHEFILESIZE \ - "MediaPlayerCacheManager_getMaxCacheFileSize" -#define FUNC_MEDIAPLAYERCACHEMANAGER_REMOVEALLCACHES \ - "MediaPlayerCacheManager_removeAllCaches" -#define FUNC_MEDIAPLAYERCACHEMANAGER_REMOVECACHEBYURI \ - "MediaPlayerCacheManager_removeCacheByUri" -#define FUNC_MEDIAPLAYERCACHEMANAGER_REMOVEOLDCACHE \ - "MediaPlayerCacheManager_removeOldCache" -#define FUNC_MEDIAPLAYERCACHEMANAGER_SETCACHEDIR \ - "MediaPlayerCacheManager_setCacheDir" -#define FUNC_MEDIAPLAYERCACHEMANAGER_SETMAXCACHEFILECOUNT \ - "MediaPlayerCacheManager_setMaxCacheFileCount" -#define FUNC_MEDIAPLAYERCACHEMANAGER_SETMAXCACHEFILESIZE \ - "MediaPlayerCacheManager_setMaxCacheFileSize" -//class IMediaPlayerCacheManager end - -// class IAudioDeviceManager start -#define FUNC_AUDIODEVICEMANAGER_ENUMERATEPLAYBACKDEVICES \ - "AudioDeviceManager_enumeratePlaybackDevices" -#define FUNC_AUDIODEVICEMANAGER_ENUMERATERECORDINGDEVICES \ - "AudioDeviceManager_enumerateRecordingDevices" -#define FUNC_AUDIODEVICEMANAGER_SETPLAYBACKDEVICE \ - "AudioDeviceManager_setPlaybackDevice" -#define FUNC_AUDIODEVICEMANAGER_GETPLAYBACKDEVICE \ - "AudioDeviceManager_getPlaybackDevice" -#define FUNC_AUDIODEVICEMANAGER_GETPLAYBACKDEVICEINFO \ - "AudioDeviceManager_getPlaybackDeviceInfo" -#define FUNC_AUDIODEVICEMANAGER_SETPLAYBACKDEVICEVOLUME \ - "AudioDeviceManager_setPlaybackDeviceVolume" -#define FUNC_AUDIODEVICEMANAGER_GETPLAYBACKDEVICEVOLUME \ - "AudioDeviceManager_getPlaybackDeviceVolume" -#define FUNC_AUDIODEVICEMANAGER_SETRECORDINGDEVICE \ - "AudioDeviceManager_setRecordingDevice" -#define FUNC_AUDIODEVICEMANAGER_GETRECORDINGDEVICE \ - "AudioDeviceManager_getRecordingDevice" -#define FUNC_AUDIODEVICEMANAGER_GETRECORDINGDEVICEINFO \ - "AudioDeviceManager_getRecordingDeviceInfo" -#define FUNC_AUDIODEVICEMANAGER_SETRECORDINGDEVICEVOLUME \ - "AudioDeviceManager_setRecordingDeviceVolume" -#define FUNC_AUDIODEVICEMANAGER_GETRECORDINGDEVICEVOLUME \ - "AudioDeviceManager_getRecordingDeviceVolume" -#define FUNC_AUDIODEVICEMANAGER_SETPLAYBACKDEVICEMUTE \ - "AudioDeviceManager_setPlaybackDeviceMute" -#define FUNC_AUDIODEVICEMANAGER_GETPLAYBACKDEVICEMUTE \ - "AudioDeviceManager_getPlaybackDeviceMute" -#define FUNC_AUDIODEVICEMANAGER_SETRECORDINGDEVICEMUTE \ - "AudioDeviceManager_setRecordingDeviceMute" -#define FUNC_AUDIODEVICEMANAGER_GETRECORDINGDEVICEMUTE \ - "AudioDeviceManager_getRecordingDeviceMute" -#define FUNC_AUDIODEVICEMANAGER_STARTPLAYBACKDEVICETEST \ - "AudioDeviceManager_startPlaybackDeviceTest" -#define FUNC_AUDIODEVICEMANAGER_STOPPLAYBACKDEVICETEST \ - "AudioDeviceManager_stopPlaybackDeviceTest" -#define FUNC_AUDIODEVICEMANAGER_STARTRECORDINGDEVICETEST \ - "AudioDeviceManager_startRecordingDeviceTest" -#define FUNC_AUDIODEVICEMANAGER_STOPRECORDINGDEVICETEST \ - "AudioDeviceManager_stopRecordingDeviceTest" -#define FUNC_AUDIODEVICEMANAGER_STARTAUDIODEVICELOOPBACKTEST \ - "AudioDeviceManager_startAudioDeviceLoopbackTest" -#define FUNC_AUDIODEVICEMANAGER_STOPAUDIODEVICELOOPBACKTEST \ - "AudioDeviceManager_stopAudioDeviceLoopbackTest" -#define FUNC_AUDIODEVICEMANAGER_RELEASE "AudioDeviceManager_release" -#define FUNC_AUDIODEVICEMANAGER_FOLLOWSYSTEMRECORDINGDEVICE \ - "AudioDeviceManager_followSystemRecordingDevice" -#define FUNC_AUDIODEVICEMANAGER_FOLLOWSYSTEMPLAYBACKDEVICE \ - "AudioDeviceManager_followSystemPlaybackDevice" -#define FUNC_AUDIODEVICEMANAGER_FOLLOWSYSTEMLOOPBACKDEVICE \ - "AudioDeviceManager_followSystemLoopbackDevice" -#define FUNC_AUDIODEVICEMANAGER_GETLOOPBACKDEVICE \ - "AudioDeviceManager_getLoopbackDevice" -#define FUNC_AUDIODEVICEMANAGER_SETLOOPBACKDEVICE \ - "AudioDeviceManager_setLoopbackDevice" -#define FUNC_AUDIODEVICEMANAGER_GETPLAYBACKDEFAULTDEVICE \ - "AudioDeviceManager_getPlaybackDefaultDevice" -#define FUNC_AUDIODEVICEMANAGER_GETRECORDINGDEAFULTDEVICE \ - "AudioDeviceManager_getRecordingDefaultDevice" -// class IAudioDeviceManager end - -// class ICloudSpatialAudioEngine start -#define FUNC_CLOUDSPATIALAUDIOENGINE_SETMAXAUDIORECVCOUNT \ - "CloudSpatialAudioEngine_setMaxAudioRecvCount" -#define FUNC_CLOUDSPATIALAUDIOENGINE_SETAUDIORECVRANGE \ - "CloudSpatialAudioEngine_setAudioRecvRange" -#define FUNC_CLOUDSPATIALAUDIOENGINE_SETDISTANCEUNIT \ - "CloudSpatialAudioEngine_setDistanceUnit" -#define FUNC_CLOUDSPATIALAUDIOENGINE_UPDATESELFPOSITION \ - "CloudSpatialAudioEngine_updateSelfPosition" -#define FUNC_CLOUDSPATIALAUDIOENGINE_UPDATESELFPOSITIONEX \ - "CloudSpatialAudioEngine_updateSelfPositionEx" -#define FUNC_CLOUDSPATIALAUDIOENGINE_UPDATEPLAYERPOSITIONINFO \ - "CloudSpatialAudioEngine_updatePlayerPositionInfo" -#define FUNC_CLOUDSPATIALAUDIOENGINE_SETPARAMETERS \ - "CloudSpatialAudioEngine_setParameters" -#define FUNC_CLOUDSPATIALAUDIOENGINE_INITIALIZE \ - "CloudSpatialAudioEngine_initialize" -#define FUNC_CLOUDSPATIALAUDIOENGINE_ADDEVENTHANDLER \ - "CloudSpatialAudioEngine_addEventHandler" -#define FUNC_CLOUDSPATIALAUDIOENGINE_REMOVEEVENTHANDLER \ - "CloudSpatialAudioEngine_removeEventHandler" -#define FUNC_CLOUDSPATIALAUDIOENGINE_ENABLESPATIALIZER \ - "CloudSpatialAudioEngine_enableSpatializer" -#define FUNC_CLOUDSPATIALAUDIOENGINE_SETTEAMID \ - "CloudSpatialAudioEngine_setTeamId" -#define FUNC_CLOUDSPATIALAUDIOENGINE_SETAUDIORANGEMODE \ - "CloudSpatialAudioEngine_setAudioRangeMode" -#define FUNC_CLOUDSPATIALAUDIOENGINE_ENTERROOM \ - "CloudSpatialAudioEngine_enterRoom" -#define FUNC_CLOUDSPATIALAUDIOENGINE_RENEWTOKEN \ - "CloudSpatialAudioEngine_renewToken" -#define FUNC_CLOUDSPATIALAUDIOENGINE_EXITROOM "CloudSpatialAudioEngine_exitRoom" -#define FUNC_CLOUDSPATIALAUDIOENGINE_GETTEAMMATES \ - "CloudSpatialAudioEngine_getTeammates" -#define FUNC_CLOUDSPATIALAUDIOENGINE_MUTELOCALAUDIOSTREAM \ - "CloudSpatialAudioEngine_muteLocalAudioStream" -#define FUNC_CLOUDSPATIALAUDIOENGINE_MUTEALLREMOTEAUDIOSTREAMS \ - "CloudSpatialAudioEngine_muteAllRemoteAudioStreams" -// class ICloudSpatialAudioEngine end - -// class ILocalSpatialAudioEngine start -#define FUNC_LOCALSPATIALAUDIOENGINE_SETMAXAUDIORECVCOUNT \ - "LocalSpatialAudioEngine_setMaxAudioRecvCount" -#define FUNC_LOCALSPATIALAUDIOENGINE_SETAUDIORECVRANGE \ - "LocalSpatialAudioEngine_setAudioRecvRange" -#define FUNC_LOCALSPATIALAUDIOENGINE_SETDISTANCEUNIT \ - "LocalSpatialAudioEngine_setDistanceUnit" -#define FUNC_LOCALSPATIALAUDIOENGINE_UPDATESELFPOSITION \ - "LocalSpatialAudioEngine_updateSelfPosition" -#define FUNC_LOCALSPATIALAUDIOENGINE_UPDATESELFPOSITIONEX \ - "LocalSpatialAudioEngine_updateSelfPositionEx" -#define FUNC_LOCALSPATIALAUDIOENGINE_UPDATEPLAYERPOSITIONINFO \ - "LocalSpatialAudioEngine_updatePlayerPositionInfo" -#define FUNC_LOCALSPATIALAUDIOENGINE_SETPARAMETERS \ - "LocalSpatialAudioEngine_setParameters" -#define FUNC_LOCALSPATIALAUDIOENGINE_UPDATEREMOTEPOSITION \ - "LocalSpatialAudioEngine_updateRemotePosition" -#define FUNC_LOCALSPATIALAUDIOENGINE_REMOVEREMOTEPOSITION \ - "LocalSpatialAudioEngine_removeRemotePosition" -#define FUNC_LOCALSPATIALAUDIOENGINE_CLEARREMOTEPOSITIONS \ - "LocalSpatialAudioEngine_clearRemotePositions" -#define FUNC_LOCALSPATIALAUDIOENGINE_UPDATEREMOTEPOSITIONEX \ - "LocalSpatialAudioEngine_updateRemotePositionEx" -#define FUNC_LOCALSPATIALAUDIOENGINE_REMOVEREMOTEPOSITIONEX \ - "LocalSpatialAudioEngine_removeRemotePositionEx" -#define FUNC_LOCALSPATIALAUDIOENGINE_CLEARREMOTEPOSITIONSEX \ - "LocalSpatialAudioEngine_clearRemotePositionsEx" -#define FUNC_LOCALSPATIALAUDIOENGINE_MUTELOCALAUDIOSTREAM \ - "LocalSpatialAudioEngine_muteLocalAudioStream" -#define FUNC_LOCALSPATIALAUDIOENGINE_MUTEALLREMOTEAUDIOSTREAMS \ - "LocalSpatialAudioEngine_muteAllRemoteAudioStreams" -#define FUNC_LOCALSPATIALAUDIOENGINE_INITIALIZE \ - "LocalSpatialAudioEngine_initialize" -#define FUNC_LOCALSPATIALAUDIOENGINE_RELEASE "LocalSpatialAudioEngine_release" -#define FUNC_LOCALSPATIALAUDIOENGINE_MUTEREMOTEAUDIOSTREAM \ - "LocalSpatialAudioEngine_muteRemoteAudioStream" -#define FUNC_LOCALSPATIALAUDIOENGINE_SETPLAYERATTENUATION \ - "LocalSpatialAudioEngine_setPlayerAttenuation" -#define FUNC_LOCALSPATIALAUDIOENGINE_SETZONES "LocalSpatialAudioEngine_setZones" -#define FUNC_LOCALSPATIALAUDIOENGINE_SETREMOTEAUDIOATTENUATION \ - "LocalSpatialAudioEngine_setRemoteAudioAttenuation" -// class ILocalSpatialAudioEngine end - -// class IMediaEngine start -#define FUNC_MEDIAENGINE_PUSHAUDIOFRAME "MediaEngine_pushAudioFrame" -#define FUNC_MEDIAENGINE_PULLAUDIOFRAME "MediaEngine_pullAudioFrame" -#define FUNC_MEDIAENGINE_SETEXTERNALVIDEOSOURCE \ - "MediaEngine_setExternalVideoSource" -#define FUNC_MEDIAENGINE_SETEXTERNALAUDIOSOURCE \ - "MediaEngine_setExternalAudioSource" -#define FUNC_MEDIAENGINE_CREATECUSTOMAUDIOTRACK \ - "MediaEngine_createCustomAudioTrack" -#define FUNC_MEDIAENGINE_DESTROYCUSTOMAUDIOTRACK \ - "MediaEngine_destroyCustomAudioTrack" -#define FUNC_MEDIAENGINE_SETEXTERNALAUDIOSINK "MediaEngine_setExternalAudioSink" -#define FUNC_MEDIAENGINE_ENABLECUSTOMAUDIOLOCALPLAYBACK \ - "MediaEngine_enableCustomAudioLocalPlayback" -#define FUNC_MEDIAENGINE_PUSHVIDEOFRAME "MediaEngine_pushVideoFrame" -#define FUNC_MEDIAENGINE_PUSHVIDEOFRAME2 "MediaEngine_pushVideoFrame2" -#define FUNC_MEDIAENGINE_PUSHENCODEDVIDEOIMAGE \ - "MediaEngine_pushEncodedVideoImage" -#define FUNC_MEDIAENGINE_PUSHENCODEDVIDEOIMAGE2 \ - "MediaEngine_pushEncodedVideoImage2" -#define FUNC_MEDIAENGINE_RELEASE "MediaEngine_release" -#define FUNC_MEDIAENGINE_REGISTERVIDEOFRAMEOBSERVER \ - "MediaEngine_registerVideoFrameObserver" -#define FUNC_MEDIAENGINE_UNREGISTERVIDEOFRAMEOBSERVER \ - "MediaEngine_unregisterVideoFrameObserver" -#define FUNC_MEDIAENGINE_REGISTERAUDIOFRAMEOBSERVER \ - "MediaEngine_registerAudioFrameObserver" -#define FUNC_MEDIAENGINE_UNREGISTERAUDIOFRAMEOBSERVER \ - "MediaEngine_unregisterAudioFrameObserver" -#define FUNC_MEDIAENGINE_REGISTERVIDEOENCODEDFRAMEOBSERVER \ - "MediaEngine_registerVideoEncodedFrameObserver" -#define FUNC_MEDIAENGINE_UNREGISTERVIDEOENCODEDFRAMEOBSERVER \ - "MediaEngine_unregisterVideoEncodedFrameObserver" -#define FUNC_MEDIAENGINE_ADDVIDEOFRAMERENDERER \ - "MediaEngine_addVideoFrameRenderer" -#define FUNC_MEDIAENGINE_REMOVEVIDEOFRAMERENDERER \ - "MediaEngine_removeVideoFrameRenderer" - -// class IMediaEngine end - -// class IRtcEngineEx start -#define FUNC_RTCENGINEEX_JOINCHANNELEX "RtcEngineEx_joinChannelEx" -#define FUNC_RTCENGINEEX_LEAVECHANNELEX "RtcEngineEx_leaveChannelEx" -#define FUNC_RTCENGINEEX_UPDATECHANNELMEDIAOPTIONSEX \ - "RtcEngineEx_updateChannelMediaOptionsEx" -#define FUNC_RTCENGINEEX_SETVIDEOENCODERCONFIGURATIONEX \ - "RtcEngineEx_setVideoEncoderConfigurationEx" -#define FUNC_RTCENGINEEX_SETUPREMOTEVIDEOEX "RtcEngineEx_setupRemoteVideoEx" -#define FUNC_RTCENGINEEX_MUTEREMOTEAUDIOSTREAMEX \ - "RtcEngineEx_muteRemoteAudioStreamEx" -#define FUNC_RTCENGINEEX_MUTEREMOTEVIDEOSTREAMEX \ - "RtcEngineEx_muteRemoteVideoStreamEx" -#define FUNC_RTCENGINEEX_SETREMOTEVIDEOSTREAMTYPEEX \ - "RtcEngineEx_setRemoteVideoStreamTypeEx" -#define FUNC_RTCENGINEEX_SETREMOTEVOICEPOSITIONEX \ - "RtcEngineEx_setRemoteVoicePositionEx" -#define FUNC_RTCENGINEEX_SETREMOTEUSERSPATIALAUDIOPARAMSEX \ - "RtcEngineEx_setRemoteUserSpatialAudioParamsEx" -#define FUNC_RTCENGINEEX_SETREMOTERENDERMODEEX \ - "RtcEngineEx_setRemoteRenderModeEx" -#define FUNC_RTCENGINEEX_ENABLELOOPBACKRECORDINGEX \ - "RtcEngineEx_enableLoopbackRecordingEx" -#define FUNC_RTCENGINEEX_GETCONNECTIONSTATEEX "RtcEngineEx_getConnectionStateEx" -#define FUNC_RTCENGINEEX_ENABLEENCRYPTIONEX "RtcEngineEx_enableEncryptionEx" -#define FUNC_RTCENGINEEX_CREATEDATASTREAMEX "RtcEngineEx_createDataStreamEx" -#define FUNC_RTCENGINEEX_CREATEDATASTREAMEX2 "RtcEngineEx_createDataStreamEx2" -#define FUNC_RTCENGINEEX_SENDSTREAMMESSAGEEX "RtcEngineEx_sendStreamMessageEx" -#define FUNC_RTCENGINEEX_ADDVIDEOWATERMARKEX "RtcEngineEx_addVideoWatermarkEx" -#define FUNC_RTCENGINEEX_CLEARVIDEOWATERMARKEX \ - "RtcEngineEx_clearVideoWatermarkEx" -#define FUNC_RTCENGINEEX_SENDCUSTOMREPORTMESSAGEEX \ - "RtcEngineEx_sendCustomReportMessageEx" -#define FUNC_RTCENGINEEX_ENABLEAUDIOVOLUMEINDICATIONEX \ - "RtcEngineEx_enableAudioVolumeIndicationEx" -#define FUNC_RTCENGINEEX_GETUSERINFOBYUSERACCOUNTEX \ - "RtcEngineEx_getUserInfoByUserAccountEx" -#define FUNC_RTCENGINEEX_GETUSERINFOBYUIDEX "RtcEngineEx_getUserInfoByUidEx" -#define FUNC_RTCENGINEEX_ENABLEDUALSTREAMMODEEX \ - "RtcEngineEx_enableDualStreamModeEx" -//#define FUNC_RTCENGINEEX_ADDPUBLISHSTREAMURLEX \ -// "RtcEngineEx_addPublishStreamUrlEx" -#define FUNC_RTCENGINEEX_SETSUBSCRIBEVIDEOBLOCKLISTEX \ - "RtcEngineEx_setSubscribeVideoBlocklistEx" - -#define FUNC_RTCENGINEEX_SETSUBSCRIBEAUDIOBLOCKLISTEX \ - "RtcEngineEx_setSubscribeAudioBlocklistEx" -#define FUNC_RTCENGINEEX_SETSUBSCRIBEAUDIOALLOWLISTEX \ - "RtcEngineEx_setSubscribeAudioAllowlistEx" -#define FUNC_RTCENGINEEX_SETSUBSCRIBEVIDEOALLOWLISTEX \ - "RtcEngineEx_setSubscribeVideoAllowlistEx" -#define FUNC_RTCENGINEEX_SETREMOTEVIDEOSUBSCRIPTIONOPTIONSEX \ - "RtcEngineEx_setRemoteVideoSubscriptionOptionsEx" -#define FUNC_RTCENGINEEX_ENABLEWIRELESSACCELERATE \ - "RtcEngineEx_enableWirelessAccelerate" -#define FUNC_RTCENGINEEX_SETDUALSTREAMMODEEX "RtcEngineEx_setDualStreamModeEx" -#define FUNC_RTCENGINEEX_TAKESNAPSHOTEX "RtcEngineEx_takeSnapshotEx" -#define FUNC_RTCENGINEEX_ENABLECONTENTINSPECTEX \ - "RtcEngineEx_enableContentInspectEx" -#define FUNC_RTCENGINEEX_LEAVECHANNELEX2 "RtcEngineEx_leaveChannelEx2" -#define FUNC_RTCENGINEEX_ADJUSTUSERPLAYBACKSIGNALVOLUMEEX \ - "RtcEngineEx_adjustUserPlaybackSignalVolumeEx" -#define FUNC_RTCENGINEEX_MUTEALLREMOTEAUDIOSTREAMSEX \ - "RtcEngineEx_muteAllRemoteAudioStreamsEx" -#define FUNC_RTCENGINEEX_MUTEALLREMOTEVIDEOSTREAMSEX \ - "RtcEngineEx_muteAllRemoteVideoStreamsEx" -#define FUNC_RTCENGINEEX_MUTELOCALAUDIOSTREAMEX \ - "RtcEngineEx_muteLocalAudioStreamEx" -#define FUNC_RTCENGINEEX_MUTELOCALVIDEOSTREAMEX \ - "RtcEngineEx_muteLocalVideoStreamEx" -#define FUNC_RTCENGINEEX_PAUSEALLCHANNELMEDIARELAYEX \ - "RtcEngineEx_pauseAllChannelMediaRelayEx" -#define FUNC_RTCENGINEEX_RESUMEALLCHANNELMEDIARELAYEX \ - "RtcEngineEx_resumeAllChannelMediaRelayEx" -#define FUNC_RTCENGINEEX_STARTCHANNELMEDIARELAYEX \ - "RtcEngineEx_startChannelMediaRelayEx" -#define FUNC_RTCENGINEEX_STARTRTMPSTREAMWITHTRANSCODINGEX \ - "RtcEngineEx_startRtmpStreamWithTranscodingEx" -#define FUNC_RTCENGINEEX_STARTRTMPSTREAMWITHOUTTRANSCODINGEX \ - "RtcEngineEx_startRtmpStreamWithoutTranscodingEx" -#define FUNC_RTCENGINEEX_STOPCHANNELMEDIARELAYEX \ - "RtcEngineEx_stopChannelMediaRelayEx" -#define FUNC_RTCENGINEEX_STOPRTMPSTREAMEX "RtcEngineEx_stopRtmpStreamEx" -#define FUNC_RTCENGINEEX_UPDATECHANNELMEDIARELAYEX \ - "RtcEngineEx_updateChannelMediaRelayEx" -#define FUNC_RTCENGINEEX_UPDATERTMPTRANSCODINGEX \ - "RtcEngineEx_updateRtmpTranscodingEx" -#define FUNC_RTCENGINEEX_ADJUSTRECORDINGSIGNALVOLUMEEX \ - "RtcEngineEx_adjustRecordingSignalVolumeEx" -#define FUNC_RTCENGINEEX_MUTERECORDINGSIGNALEX \ - "RtcEngineEx_muteRecordingSignalEx" -#define FUNC_RTCENGINEEX_STARTORUPDATECHANNELMEDIARELAYEX \ - "RtcEngineEx_startOrUpdateChannelMediaRelayEx" -#define FUNC_RTCENGINEEX_SETHIGHPRIORITYUSERLISTEX \ - "RtcEngineEx_setHighPriorityUserListEx" - -// class IRtcEngineEx end - -// class IMusicContentCenter start -#define FUNC_MUSICCONTENTCENTER_INITIALIZE "MusicContentCenter_initialize" -#define FUNC_MUSICCONTENTCENTER_REGISTEREVENTHANDLER \ - "MusicContentCenter_registerEventHandler" -#define FUNC_MUSICCONTENTCENTER_UNREGISTEREVENTHANDLER \ - "MusicContentCenter_unregisterEventHandler" -#define FUNC_MUSICCONTENTCENTER_CREATEMUSICPLAYER \ - "MusicContentCenter_createMusicPlayer" -#define FUNC_MUSICCONTENTCENTER_DESTROYMUSICPLAYER \ - "MusicContentCenter_destroyMusicPlayer" -#define FUNC_MUSICCONTENTCENTER_GETMUSICCHARTS \ - "MusicContentCenter_getMusicCharts" -#define FUNC_MUSICCONTENTCENTER_GETMUSICCOLLECTIONBYMUSICCHARTID \ - "MusicContentCenter_getMusicCollectionByMusicChartId" -#define FUNC_MUSICCONTENTCENTER_SEARCHMUSIC "MusicContentCenter_searchMusic" -#define FUNC_MUSICCONTENTCENTER_PRELOAD "MusicContentCenter_preload" -#define FUNC_MUSICCONTENTCENTER_PRELOAD2 "MusicContentCenter_preload2" -#define FUNC_MUSICCONTENTCENTER_ISPRELOADED "MusicContentCenter_isPreloaded" -#define FUNC_MUSICCONTENTCENTER_GETLYRIC "MusicContentCenter_getLyric" -#define FUNC_MUSICCONTENTCENTER_RENEWTOKEN "MusicContentCenter_renewToken" -#define FUNC_MUSICCONTENTCENTER_REMOVECACHE "MusicContentCenter_removeCache" -#define FUNC_MUSICCONTENTCENTER_GETCACHES "MusicContentCenter_getCaches" -#define FUNC_MUSICCONTENTCENTER_GETSONGSIMPLEINFO \ - "MusicContentCenter_getSongSimpleInfo" -#define FUNC_MUSICCONTENTCENTER_GETINTERNALSONGCODE \ - "MusicContentCenter_getInternalSongCode" -// class IMusicContentCenter end -// class IMusicPlayer start -#define FUNC_MUSICPLAYER_OPEN "MusicPlayer_open" -// class IMusicPlayer end diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_base.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_base.h deleted file mode 100644 index 1a67bb299..000000000 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_base.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// Created by LXH on 2021/1/14. -// - -#ifndef IRIS_RTC_BASE_H_ -#define IRIS_RTC_BASE_H_ - -#include "iris_base.h" -#include "iris_media_base_c.h" -#include "iris_rtc_api_type.h" -#include "iris_rtc_rendering_c.h" - -#endif//IRIS_RTC_BASE_H_ diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_c_api.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_c_api.h index 5cd09d5c5..58499af90 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_c_api.h +++ b/android/src/main/cpp/third_party/include/iris/iris_rtc_c_api.h @@ -5,7 +5,8 @@ #ifndef IRIS_RTC_C_API_H_ #define IRIS_RTC_C_API_H_ -#include "iris_rtc_base.h" +#include "iris_base.h" +#include "iris_platform.h" EXTERN_C_ENTER @@ -13,18 +14,15 @@ typedef enum IRIS_API_ERROR_CODE_TYPE { IRIS_API_NOT_CREATE = 666666, } IRIS_API_ERROR_CODE_TYPE; -typedef void *IrisApiEnginePtr; - -IRIS_API int IRIS_CALL CallIrisApi(IrisApiEnginePtr engine_ptr, +IRIS_API int IRIS_CALL CallIrisApi(IrisApiEnginePtr api_engine, ApiParam *param); -/// IrisRtcEngine -IRIS_API IrisApiEnginePtr IRIS_CALL CreateIrisApiEngine(void *rtcEngine); +IRIS_API IrisApiEnginePtr IRIS_CALL CreateIrisApiEngine(IrisHandle rtc_engine); -IRIS_API void IRIS_CALL DestroyIrisApiEngine(IrisApiEnginePtr engine_ptr); +IRIS_API void IRIS_CALL DestroyIrisApiEngine(IrisApiEnginePtr api_engine); IRIS_API IrisEventHandlerHandle IRIS_CALL -CreateIrisEventHandler(IrisCEventHandler *event_handler); +CreateIrisEventHandler(IrisCEventHandler *c_event_handler); IRIS_API void IRIS_CALL DestroyIrisEventHandler(IrisEventHandlerHandle handler); diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_engine.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_engine.h deleted file mode 100644 index 3497e0dbb..000000000 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_engine.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Created by LXH on 2021/1/14. -// - -#ifndef IRIS_RTC_ENGINE_H_ -#define IRIS_RTC_ENGINE_H_ - -namespace agora { -namespace iris { -namespace rtc { - -class IRIS_DEBUG_CPP_API IIrisRtcEngine : public IModule { - public: - virtual IModule *device_manager() = 0; - - virtual IModule *media_player() = 0; - - virtual IModule *local_audio_engine() = 0; - - virtual IModule *cloud_audio_engine() = 0; - - virtual IModule *media_recorder() = 0; - - virtual IModule *media_player_cache_manager() = 0; - - virtual IModule *music_center() = 0; -}; - -}// namespace rtc -}// namespace iris -}// namespace agora - -#endif//IRIS_RTC_ENGINE_H_ diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h index 57937aa97..ba8d08dee 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h +++ b/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h @@ -1,9 +1,7 @@ #pragma once -#include "iris_rtc_base.h" #include "iris_rtc_c_api.h" -EXTERN_C_ENTER struct IrisSpatialAudioZone { //the zone id @@ -24,10 +22,10 @@ struct IrisSpatialAudioZone { float upLength; //the audio attenuation of zone float audioAttenuation; - - IrisSpatialAudioZone() = default; }; +EXTERN_C_ENTER + IRIS_API int IRIS_CALL ILocalSpatialAudioEngine_SetMaxAudioRecvCount( IrisApiEnginePtr enginePtr, int maxCount); diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h index 464edead3..d2e74cc8e 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h +++ b/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h @@ -3,7 +3,7 @@ #include "iris_base.h" -typedef void *IrisRtcRenderingHandle; +typedef IrisHandle IrisRtcRenderingHandle; /// The agora::media::base::VideoFrame C projection but remove some unsupported property in C, /// e.g., agora::media::base::VideoFrame.sharedContext, agora::media::base::VideoFrame.textureId, etc. @@ -56,7 +56,7 @@ typedef enum GET_VIDEO_FRAME_CACHE_RETURN_TYPE { } GET_VIDEO_FRAME_CACHE_RETURN_TYPE; IRIS_API IrisRtcRenderingHandle -CreateIrisRtcRendering(void *iris_api_engine_handle); +CreateIrisRtcRendering(IrisApiEnginePtr iris_api_engine_handle); IRIS_API void FreeIrisRtcRendering(IrisRtcRenderingHandle handle); diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_cxx.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_cxx.h index 71dbe3068..646f52e14 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_cxx.h +++ b/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_cxx.h @@ -33,7 +33,7 @@ class IRIS_CPP_API IrisRtcRendering { public: virtual ~IrisRtcRendering() {} - static IrisRtcRendering *Create(void *iris_api_engine_handle); + static IrisRtcRendering *Create(IrisApiEnginePtr iris_api_engine_handle); /// Add `VideoFrameObserverDelegate` with `config`, return a delegate id that save inside /// `IrisRtcRendering`, you should save the id and pass it to `RemoveVideoFrameObserverDelegate`. diff --git a/ci/rendering_test_android.sh b/ci/rendering_test_android.sh index 5e83273cf..c29b88a65 100644 --- a/ci/rendering_test_android.sh +++ b/ci/rendering_test_android.sh @@ -7,6 +7,8 @@ MY_PATH=$(dirname "$0") pushd ${MY_PATH}/../test_shard/rendering_test +export SAVE_DEBUG_GOLDEN="true" + flutter packages get flutter drive --driver=test_driver/integration_test.dart --target=integration_test/agora_video_view_render_test.dart --dart-define=TEST_APP_ID="${TEST_APP_ID}" diff --git a/ci/run_flutter_macos_integration_test.sh b/ci/run_flutter_macos_integration_test.sh index 1c53a92ef..fd626595d 100644 --- a/ci/run_flutter_macos_integration_test.sh +++ b/ci/run_flutter_macos_integration_test.sh @@ -36,6 +36,7 @@ for filename in integration_test/*.dart; do if [[ "$filename" == *.generated.dart ]]; then continue fi + flutter test $filename --dart-define=TEST_APP_ID="${TEST_APP_ID}" -d macos done diff --git a/ci/setup-crash-dumps.ps1 b/ci/setup-crash-dumps.ps1 new file mode 100644 index 000000000..d63aa953d --- /dev/null +++ b/ci/setup-crash-dumps.ps1 @@ -0,0 +1,16 @@ +# setup-crash-dumps.ps1 +$dumpFolder = ".\CrashDumps" +$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" + +# 创建转储文件夹 +if (-not (Test-Path -Path $dumpFolder)) { + New-Item -Path $dumpFolder -ItemType Directory +} + +# 设置注册表以启用崩溃转储 +New-Item -Path $registryPath -Force +New-ItemProperty -Path $registryPath -Name "DumpFolder" -Value (Resolve-Path $dumpFolder) -PropertyType String -Force +New-ItemProperty -Path $registryPath -Name "DumpCount" -Value 10 -PropertyType DWord -Force +New-ItemProperty -Path $registryPath -Name "DumpType" -Value 2 -PropertyType DWord -Force + +Write-Host "Crash dump settings configured successfully." diff --git a/example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/MainActivity.kt b/example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/MainActivity.kt index 0b2b5ec10..dcfc6cd4b 100644 --- a/example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/MainActivity.kt +++ b/example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/MainActivity.kt @@ -1,12 +1,17 @@ package io.agora.agora_rtc_ng_example import android.content.Context +import android.os.Bundle +import android.util.Log +import io.agora.agora_rtc_flutter_example.VideoRawDataController import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.engine.FlutterEngine import io.flutter.plugin.common.MethodChannel class MainActivity: FlutterActivity() { private lateinit var methodChannel: MethodChannel + private lateinit var sharedNativeHandleMethodChannel: MethodChannel + private var videoRawDataController: VideoRawDataController? = null override fun provideFlutterEngine(context: Context): FlutterEngine? { return (context.applicationContext as MyApplication).getFlutterEngine() @@ -31,11 +36,37 @@ class MainActivity: FlutterActivity() { } } } + + sharedNativeHandleMethodChannel = MethodChannel(flutterEngine.dartExecutor, "agora_rtc_engine_example/shared_native_handle") + sharedNativeHandleMethodChannel.setMethodCallHandler { call, result -> + when (call.method) { + "native_init" -> { + var nativeHandle = 0L + call.argument("appId")?.apply { + videoRawDataController = VideoRawDataController(this@MainActivity,this) + nativeHandle = videoRawDataController!!.nativeHandle() + } + + result.success(nativeHandle) + } + "native_dispose" -> { + videoRawDataController?.dispose() + videoRawDataController = null + result.success(true) + } + else -> { + result.notImplemented() + } + } + } } override fun detachFromFlutterEngine() { super.detachFromFlutterEngine() + videoRawDataController?.dispose() + videoRawDataController = null methodChannel.setMethodCallHandler(null) + sharedNativeHandleMethodChannel.setMethodCallHandler(null) } } diff --git a/example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/VideoRawDataController.kt b/example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/VideoRawDataController.kt new file mode 100644 index 000000000..418832d50 --- /dev/null +++ b/example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/VideoRawDataController.kt @@ -0,0 +1,102 @@ +package io.agora.agora_rtc_flutter_example + +import android.content.Context +import android.util.Log +import io.agora.base.VideoFrame +import io.agora.rtc2.IRtcEngineEventHandler +import io.agora.rtc2.RtcEngine +import io.agora.rtc2.RtcEngineConfig +import io.agora.rtc2.video.IVideoFrameObserver +import io.agora.rtc2.video.IVideoFrameObserver.POSITION_POST_CAPTURER +import io.agora.rtc2.video.IVideoFrameObserver.PROCESS_MODE_READ_WRITE +import io.agora.rtc2.video.IVideoFrameObserver.VIDEO_PIXEL_I420 +import java.util.Arrays + + +class VideoRawDataController(context: Context, myAppId: String ) { + + private var rtcEngine: RtcEngine? = null + + init { + rtcEngine = RtcEngine.create(RtcEngineConfig().apply { + mAppId = myAppId + mContext = context.applicationContext + mEventHandler = object : IRtcEngineEventHandler() { } + }) + + rtcEngine!!.registerVideoFrameObserver(object : IVideoFrameObserver { + override fun onCaptureVideoFrame(sourceType: Int, videoFrame: VideoFrame?): Boolean { + videoFrame?.apply { + val i420Buffer = buffer.toI420() + + // Make it grey: Set U and V (chroma) components to neutral value + val neutralValue: Byte = 128.toByte() + val dataU = i420Buffer.dataU + val dataV = i420Buffer.dataV + + while (dataU.hasRemaining()) { + dataU.put(neutralValue) + } + + while (dataV.hasRemaining()) { + dataV.put(neutralValue) + } + + videoFrame.replaceBuffer(i420Buffer, videoFrame.rotation, videoFrame.timestampNs) + } + + return true; + } + + override fun onPreEncodeVideoFrame(sourceType: Int, videoFrame: VideoFrame?): Boolean { + return false; + } + + override fun onMediaPlayerVideoFrame( + videoFrame: VideoFrame?, + mediaPlayerId: Int + ): Boolean { + return false; + } + + override fun onRenderVideoFrame( + channelId: String?, + uid: Int, + videoFrame: VideoFrame? + ): Boolean { + return false; + } + + override fun getVideoFrameProcessMode(): Int { + return PROCESS_MODE_READ_WRITE + } + + override fun getVideoFormatPreference(): Int { + return VIDEO_PIXEL_I420 + } + + override fun getRotationApplied(): Boolean { + return false + } + + override fun getMirrorApplied(): Boolean { + return false + } + + override fun getObservedFramePosition(): Int { + return POSITION_POST_CAPTURER + } + + }) + } + + fun nativeHandle() = rtcEngine!!.nativeHandle + + + + fun dispose() { + rtcEngine!!.registerVideoFrameObserver(null) + RtcEngine.destroy() + rtcEngine = null + } +} \ No newline at end of file diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 01d61d20b..bb4699101 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 71BBA3BA28AB50E2007B0DBC /* ReplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 71BBA3B928AB50E2007B0DBC /* ReplayKit.framework */; }; 71BBA3BE28AB50E2007B0DBC /* SampleHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 71BBA3BD28AB50E2007B0DBC /* SampleHandler.m */; }; 71BBA3C228AB50E2007B0DBC /* ScreenSharing.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 71BBA3B828AB50E2007B0DBC /* ScreenSharing.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 84969AB62B3ABD9500A81666 /* VideoRawDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = 84969AB52B3ABD9500A81666 /* VideoRawDataController.m */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -71,6 +72,8 @@ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 84969AB42B3ABCB200A81666 /* VideoRawDataController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoRawDataController.h; sourceTree = ""; }; + 84969AB52B3ABD9500A81666 /* VideoRawDataController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoRawDataController.m; sourceTree = ""; }; 95E2CCC7A17B556B48DA5225 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; @@ -183,6 +186,8 @@ 97C146F11CF9000F007C117D /* Supporting Files */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 84969AB42B3ABCB200A81666 /* VideoRawDataController.h */, + 84969AB52B3ABD9500A81666 /* VideoRawDataController.m */, ); path = Runner; sourceTree = ""; @@ -407,6 +412,7 @@ files = ( 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 97C146F31CF9000F007C117D /* main.m in Sources */, + 84969AB62B3ABD9500A81666 /* VideoRawDataController.m in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m index 9ca7fd9e2..16304b32f 100644 --- a/example/ios/Runner/AppDelegate.m +++ b/example/ios/Runner/AppDelegate.m @@ -2,6 +2,13 @@ #import "AppDelegate.h" #import "GeneratedPluginRegistrant.h" #import +#import "VideoRawDataController.h" + +@interface AppDelegate () + +@property(nonatomic, strong, nullable) VideoRawDataController *videoRawDataController; + +@end @implementation AppDelegate @@ -35,6 +42,42 @@ - (BOOL)application:(UIApplication *)application }); } }]; + + __weak typeof(self) weakSelf = self; + + FlutterMethodChannel* sharedNativeHandleMethodChannel = [FlutterMethodChannel + methodChannelWithName:@"agora_rtc_engine_example/shared_native_handle" + binaryMessenger:controller.binaryMessenger]; + + [sharedNativeHandleMethodChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) { + if (!weakSelf) { + result(FlutterMethodNotImplemented); + return; + } + + NSDictionary *data = call.arguments; + if ([@"native_init" isEqualToString:call.method]) { + NSString *appId = data[@"appId"]; + intptr_t nativeHandle = 0L; + if (!weakSelf.videoRawDataController) { + weakSelf.videoRawDataController = [[VideoRawDataController alloc] initWith:appId]; + nativeHandle = [weakSelf.videoRawDataController getNativeHandle]; + + } + + result(@(nativeHandle)); + return; + } else if ([@"native_dispose" isEqualToString:call.method]) { + if (weakSelf.videoRawDataController) { + [weakSelf.videoRawDataController dispose]; + weakSelf.videoRawDataController = NULL; + } + result(@(true)); + return; + } + + result(FlutterMethodNotImplemented); + }]; [GeneratedPluginRegistrant registerWithRegistry:self]; // Override point for customization after application launch. diff --git a/example/ios/Runner/VideoRawDataController.h b/example/ios/Runner/VideoRawDataController.h new file mode 100644 index 000000000..62d17db65 --- /dev/null +++ b/example/ios/Runner/VideoRawDataController.h @@ -0,0 +1,12 @@ +#ifndef VideoRawDataController_h +#define VideoRawDataController_h + +@interface VideoRawDataController : NSObject + +- (instancetype)initWith:(NSString *) appId; +- (intptr_t)getNativeHandle; +- (void)dispose; + +@end + +#endif /* VideoRawDataController_h */ diff --git a/example/ios/Runner/VideoRawDataController.m b/example/ios/Runner/VideoRawDataController.m new file mode 100644 index 000000000..3de810c6c --- /dev/null +++ b/example/ios/Runner/VideoRawDataController.m @@ -0,0 +1,50 @@ +#import +#import "VideoRawDataController.h" +#import + +@interface VideoRawDataController () + +@property(nonatomic, strong) AgoraRtcEngineKit *agoraRtcEngine; + +@end + +@implementation VideoRawDataController + +- (instancetype)initWith:(NSString *) appId { + self = [super init]; + if (self) { + AgoraRtcEngineConfig *config = [[AgoraRtcEngineConfig alloc] init]; + config.appId = appId; + self.agoraRtcEngine = [AgoraRtcEngineKit sharedEngineWithConfig:config delegate:self]; + [self.agoraRtcEngine setVideoFrameDelegate:self]; + } + + return self; +} + +- (intptr_t)getNativeHandle { + return (intptr_t)[self.agoraRtcEngine getNativeHandle]; +} + +- (void)dispose { + [self.agoraRtcEngine setVideoFrameDelegate:NULL]; + [AgoraRtcEngineKit destroy]; +} + +// MARK: - AgoraVideoFrameDelegate +- (BOOL)onCaptureVideoFrame:(AgoraOutputVideoFrame *)videoFrame sourceType:(AgoraVideoSourceType)sourceType { + memset(videoFrame.uBuffer, 128, (videoFrame.uStride * videoFrame.height) / 2); + memset(videoFrame.vBuffer, 128, (videoFrame.vStride * videoFrame.height) / 2); + return YES; +} + +- (AgoraVideoFormat)getVideoFormatPreference { + return AgoraVideoFormatI420; +} + +- (AgoraVideoFrameProcessMode)getVideoFrameProcessMode { + return AgoraVideoFrameProcessModeReadWrite; +} + +@end + diff --git a/example/lib/examples/advanced/channel_media_relay/channel_media_relay.dart b/example/lib/examples/advanced/channel_media_relay/channel_media_relay.dart index bb52d3839..7fd29c719 100644 --- a/example/lib/examples/advanced/channel_media_relay/channel_media_relay.dart +++ b/example/lib/examples/advanced/channel_media_relay/channel_media_relay.dart @@ -163,7 +163,7 @@ class _State extends State with KeepRemoteVideoViewsMixin { return; } - await _engine.startChannelMediaRelay(ChannelMediaRelayConfiguration( + await _engine.startOrUpdateChannelMediaRelay(ChannelMediaRelayConfiguration( srcInfo: ChannelMediaInfo( channelName: _channelController.text, token: config.token, diff --git a/example/lib/examples/advanced/index.dart b/example/lib/examples/advanced/index.dart index b65f1f4f8..cf4739fd6 100644 --- a/example/lib/examples/advanced/index.dart +++ b/example/lib/examples/advanced/index.dart @@ -80,7 +80,7 @@ final advanced = [ 'name': 'StartLocalVideoTranscoder', 'widget': const StartLocalVideoTranscoder() }, - if (!kIsWeb) + if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {'name': 'ProcessVideoRawData', 'widget': const ProcessVideoRawData()}, if (!kIsWeb) {'name': 'ProcessAudioRawData', 'widget': const ProcessAudioRawData()}, diff --git a/example/lib/examples/advanced/media_player/media_player.dart b/example/lib/examples/advanced/media_player/media_player.dart index 10838551a..2afc034ab 100644 --- a/example/lib/examples/advanced/media_player/media_player.dart +++ b/example/lib/examples/advanced/media_player/media_player.dart @@ -101,7 +101,7 @@ class _State extends State { logSink.log('[onCompleted]'); }, onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { logSink.log('[onPlayerSourceStateChanged] state: $state ec: $ec'); if (state == MediaPlayerState.playerStateOpenCompleted) { _streamCount = await _mediaPlayerController.getStreamCount(); @@ -126,11 +126,12 @@ class _State extends State { setState(() {}); }, - onPositionChanged: (int position) { - logSink.log('[onPositionChanged] position: $position'); + onPositionChanged: (int positionMs, int timestampMs) { + logSink.log( + '[onPositionChanged] position: $positionMs, timestampMs: $timestampMs'); setState(() { - _seekPos = position; + _seekPos = positionMs; }); }, onPlayerEvent: diff --git a/example/lib/examples/advanced/media_recorder/media_recorder.dart b/example/lib/examples/advanced/media_recorder/media_recorder.dart index 451c8d2de..48a6a7275 100644 --- a/example/lib/examples/advanced/media_recorder/media_recorder.dart +++ b/example/lib/examples/advanced/media_recorder/media_recorder.dart @@ -120,7 +120,7 @@ class _State extends State { await _mediaRecorder?.setMediaRecorderObserver(MediaRecorderObserver( onRecorderStateChanged: (String channelId, int uid, RecorderState state, - RecorderErrorCode error) { + RecorderReasonCode error) { logSink.log( 'onRecorderStateChanged channelId: $channelId, uid: $uid state: $state, error: $error'); }, diff --git a/example/lib/examples/advanced/music_player/music_player.dart b/example/lib/examples/advanced/music_player/music_player.dart index 304c791a3..b0d3f344c 100644 --- a/example/lib/examples/advanced/music_player/music_player.dart +++ b/example/lib/examples/advanced/music_player/music_player.dart @@ -282,11 +282,11 @@ class _MusicPlayerExampleState extends State { _musicContentCenter.registerEventHandler(MusicContentCenterEventHandler( onMusicChartsResult: (String requestId, List result, - MusicContentCenterStatusCode errorCode) { + MusicContentCenterStateReason errorCode) { logSink.log( '[onMusicChartsResult], requestId: $requestId, errorCode: $errorCode, result: ${result.toString()}'); if (errorCode == - MusicContentCenterStatusCode.kMusicContentCenterStatusOk) { + MusicContentCenterStateReason.kMusicContentCenterReasonOk) { if (_currentRequestId == requestId) { setState(() { _musicChartInfos = result; @@ -295,7 +295,7 @@ class _MusicPlayerExampleState extends State { } }, onMusicCollectionResult: (String requestId, MusicCollection result, - MusicContentCenterStatusCode errorCode) { + MusicContentCenterStateReason errorCode) { logSink.log( '[onMusicCollectionResult], requestId: $requestId, errorCode: $errorCode, result: ${result.toString()}'); @@ -314,13 +314,13 @@ class _MusicPlayerExampleState extends State { int songCode, int percent, String lyricUrl, - PreloadStatusCode status, - MusicContentCenterStatusCode errorCode, + PreloadState status, + MusicContentCenterStateReason errorCode, ) { logSink.log( '[onPreLoadEvent], requestId: $requestId songCode: $songCode, percent: $percent status: $status, errorCode: $errorCode, lyricUrl: $lyricUrl'); if (_selectedMusic.songCode == songCode && - status == PreloadStatusCode.kPreloadStatusCompleted) { + status == PreloadState.kPreloadStateCompleted) { _preloadCompleted?.complete(); _preloadCompleted = null; } @@ -329,7 +329,7 @@ class _MusicPlayerExampleState extends State { String requestId, int songCode, String lyricUrl, - MusicContentCenterStatusCode errorCode, + MusicContentCenterStateReason errorCode, ) { logSink.log( '[onLyricResult], requestId: $requestId songCode: $songCode, lyricUrl: $lyricUrl errorCode: $errorCode'); @@ -344,7 +344,7 @@ class _MusicPlayerExampleState extends State { _mediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { logSink.log('[onPlayerSourceStateChanged] state: $state ec: $ec'); if (state == MediaPlayerState.playerStateOpenCompleted) { _isPlaying = !_isPlaying; diff --git a/example/lib/examples/advanced/process_video_raw_data/process_video_raw_data.dart b/example/lib/examples/advanced/process_video_raw_data/process_video_raw_data.dart index 6c1bcdd84..e67fd0ec6 100644 --- a/example/lib/examples/advanced/process_video_raw_data/process_video_raw_data.dart +++ b/example/lib/examples/advanced/process_video_raw_data/process_video_raw_data.dart @@ -4,12 +4,9 @@ import 'package:agora_rtc_engine_example/components/example_actions_widget.dart' import 'package:agora_rtc_engine_example/components/log_sink.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:video_raw_data/video_raw_data.dart'; +import 'package:flutter/services.dart'; /// ProcessVideoRawData Example -/// -/// Demonstrate how to process video raw data in C++, check `VideoRawDataController` -/// implementation in https://github.com/AgoraIO-Extensions/RawDataPluginSample/tree/main/frameworks/flutter/video_raw_data class ProcessVideoRawData extends StatefulWidget { /// Construct the [ProcessVideoRawData] const ProcessVideoRawData({Key? key}) : super(key: key); @@ -29,8 +26,8 @@ class _State extends State { ChannelProfileType _channelProfileType = ChannelProfileType.channelProfileLiveBroadcasting; - final VideoRawDataController _videoRawDataController = - VideoRawDataController(); + final MethodChannel _sharedNativeHandleChannel = + const MethodChannel('agora_rtc_engine_example/shared_native_handle'); @override void initState() { @@ -47,17 +44,22 @@ class _State extends State { } Future _dispose() async { - _videoRawDataController.dispose(); await _engine.leaveChannel(); await _engine.release(); + await _sharedNativeHandleChannel.invokeMethod('native_dispose'); } Future _initEngine() async { - _engine = createAgoraRtcEngine(); + final sharedNativeHandle = await _sharedNativeHandleChannel.invokeMethod( + 'native_init', + {'appId': config.appId}, + ); + + _engine = createAgoraRtcEngine(sharedNativeHandle: sharedNativeHandle); await _engine.initialize(RtcEngineContext( appId: config.appId, )); - await _engine.setLogFilter(LogFilterType.logFilterError); + await _engine.setLogFilter(LogFilterType.logFilterInfo); _engine.registerEventHandler(RtcEngineEventHandler( onError: (ErrorCodeType err, String msg) { @@ -96,11 +98,6 @@ class _State extends State { )); await _engine.enableVideo(); - - final nativeHandle = await _engine.getNativeHandle(); - - _videoRawDataController.initialize(nativeHandle); - await _engine.startPreview(); setState(() { diff --git a/example/lib/examples/advanced/rtmp_streaming/rtmp_streaming.dart b/example/lib/examples/advanced/rtmp_streaming/rtmp_streaming.dart index ce63e0e4d..55bebb9db 100644 --- a/example/lib/examples/advanced/rtmp_streaming/rtmp_streaming.dart +++ b/example/lib/examples/advanced/rtmp_streaming/rtmp_streaming.dart @@ -94,7 +94,7 @@ class _RtmpStreamingState extends State { }); }, onRtmpStreamingStateChanged: (String url, RtmpStreamPublishState state, - RtmpStreamPublishErrorType errCode) { + RtmpStreamPublishReason errCode) { logSink.log( '[onRtmpStreamingStateChanged] url: $url state: $state, errCode: $errCode'); }, diff --git a/example/lib/examples/advanced/screen_sharing/screen_sharing.dart b/example/lib/examples/advanced/screen_sharing/screen_sharing.dart index af81cc9f2..330529124 100644 --- a/example/lib/examples/advanced/screen_sharing/screen_sharing.dart +++ b/example/lib/examples/advanced/screen_sharing/screen_sharing.dart @@ -64,7 +64,7 @@ class _State extends State with KeepRemoteVideoViewsMixin { isJoined = false; }); }, onLocalVideoStateChanged: (VideoSourceType source, - LocalVideoStreamState state, LocalVideoStreamError error) { + LocalVideoStreamState state, LocalVideoStreamReason error) { logSink.log( '[onLocalVideoStateChanged] source: $source, state: $state, error: $error'); if (!(source == VideoSourceType.videoSourceScreen || @@ -115,6 +115,8 @@ class _State extends State with KeepRemoteVideoViewsMixin { connection: RtcConnection(channelId: _controller.text, localUid: localUid), options: const ChannelMediaOptions( + autoSubscribeVideo: true, + autoSubscribeAudio: true, publishCameraTrack: true, publishMicrophoneTrack: true, clientRoleType: ClientRoleType.clientRoleBroadcaster, @@ -128,8 +130,8 @@ class _State extends State with KeepRemoteVideoViewsMixin { connection: RtcConnection( channelId: _controller.text, localUid: shareShareUid), options: const ChannelMediaOptions( - autoSubscribeVideo: true, - autoSubscribeAudio: true, + autoSubscribeVideo: false, + autoSubscribeAudio: false, publishScreenTrack: true, publishSecondaryScreenTrack: true, publishCameraTrack: false, diff --git a/example/lib/examples/advanced/send_multi_video_stream/send_multi_video_stream.dart b/example/lib/examples/advanced/send_multi_video_stream/send_multi_video_stream.dart index bc391fcbc..0c57e3b7d 100644 --- a/example/lib/examples/advanced/send_multi_video_stream/send_multi_video_stream.dart +++ b/example/lib/examples/advanced/send_multi_video_stream/send_multi_video_stream.dart @@ -93,7 +93,7 @@ class _State extends State { logSink.log('[onCompleted]'); }, onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) { + (MediaPlayerState state, MediaPlayerReason ec) { logSink.log('[onPlayerSourceStateChanged] state: $state ec: $ec'); if (state == MediaPlayerState.playerStateOpenCompleted) { debugPrint('src ${_mediaPlayerController.getPlaySrc()}'); @@ -104,8 +104,9 @@ class _State extends State { }); } }, - onPositionChanged: (int position) { - logSink.log('[onPositionChanged] position: $position'); + onPositionChanged: (int positionMs, int timestampMs) { + logSink.log( + '[onPositionChanged] position: $positionMs, timestampMs: $timestampMs'); }, onPlayerEvent: (MediaPlayerEvent eventCode, int elapsedTime, String message) { diff --git a/example/lib/examples/advanced/spatial_audio_with_media_player/spatial_audio_with_media_player.dart b/example/lib/examples/advanced/spatial_audio_with_media_player/spatial_audio_with_media_player.dart index 3cfbcebe3..39adacf1c 100644 --- a/example/lib/examples/advanced/spatial_audio_with_media_player/spatial_audio_with_media_player.dart +++ b/example/lib/examples/advanced/spatial_audio_with_media_player/spatial_audio_with_media_player.dart @@ -116,7 +116,7 @@ class _State extends State { logSink.log('[onCompleted]'); }, onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) { + (MediaPlayerState state, MediaPlayerReason ec) { logSink.log('[onPlayerSourceStateChanged] state: $state ec: $ec'); if (state == MediaPlayerState.playerStateOpenCompleted) { debugPrint('src ${_mediaPlayerController.getPlaySrc()}'); @@ -127,8 +127,9 @@ class _State extends State { }); } }, - onPositionChanged: (int position) { - logSink.log('[onPositionChanged] position: $position'); + onPositionChanged: (int positionMs, int timestampMs) { + logSink.log( + '[onPositionChanged] position: $positionMs, timestampMs: $timestampMs'); }, onPlayerEvent: (MediaPlayerEvent eventCode, int elapsedTime, String message) { diff --git a/example/lib/examples/advanced/start_local_video_transcoder/start_local_video_transcoder.dart b/example/lib/examples/advanced/start_local_video_transcoder/start_local_video_transcoder.dart index b6e40a9c5..0b9661512 100644 --- a/example/lib/examples/advanced/start_local_video_transcoder/start_local_video_transcoder.dart +++ b/example/lib/examples/advanced/start_local_video_transcoder/start_local_video_transcoder.dart @@ -110,6 +110,10 @@ class _State extends State { remoteUid.clear(); }); }, + onLocalVideoTranscoderError: (stream, error) { + logSink + .log('[onLocalVideoTranscoderError] stream: $stream error: $error'); + }, )); _videoDeviceManager = _engine.getVideoDeviceManager(); @@ -229,6 +233,7 @@ class _State extends State { await _engine.stopCameraCapture(VideoSourceType.videoSourceCameraPrimary); await _engine.stopLocalVideoTranscoder(); + await _engine.startPreview(); transcodingVideoStreams.clear(); _isSecondaryCameraSource = false; _isPrimaryScreenSource = false; @@ -591,16 +596,17 @@ class _State extends State { if (!_isReadyPreview) return Container(); return Stack( children: [ - AgoraVideoView( - controller: VideoViewController( - rtcEngine: _engine, - canvas: const VideoCanvas( - uid: 0, - sourceType: VideoSourceType.videoSourceTranscoded, - renderMode: RenderModeType.renderModeFit, + if (_isStartLocalvideoTranscoder) + AgoraVideoView( + controller: VideoViewController( + rtcEngine: _engine, + canvas: const VideoCanvas( + uid: 0, + sourceType: VideoSourceType.videoSourceTranscoded, + renderMode: RenderModeType.renderModeFit, + ), ), ), - ), Align( alignment: Alignment.topLeft, child: SingleChildScrollView( diff --git a/example/lib/examples/advanced/stream_message/stream_message.dart b/example/lib/examples/advanced/stream_message/stream_message.dart index 6cf58725b..b1ab1f6e0 100644 --- a/example/lib/examples/advanced/stream_message/stream_message.dart +++ b/example/lib/examples/advanced/stream_message/stream_message.dart @@ -167,8 +167,7 @@ class _State extends State with KeepRemoteVideoViewsMixin { child: RemoteVideoViewsWidget( key: keepRemoteVideoViewsKey, rtcEngine: _engine, - channelId: _controller.text, - connectionUid: int.tryParse(_controller.text), + channelId: _channelIdController.text, ), ) ], diff --git a/example/web/index.html b/example/web/index.html index 1420346df..6840f97ae 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -100,6 +100,6 @@ loadMainDartJs(); } - + diff --git a/ios/agora_rtc_engine.podspec b/ios/agora_rtc_engine.podspec index 0349b6371..c9d5eb81a 100644 --- a/ios/agora_rtc_engine.podspec +++ b/ios/agora_rtc_engine.podspec @@ -23,8 +23,8 @@ Pod::Spec.new do |s| puts '[plugin_dev] Found .plugin_dev file, use vendored_frameworks instead.' s.vendored_frameworks = 'libs/*.xcframework' else - s.dependency 'AgoraIrisRTC_iOS', '4.2.6-build.3' - s.dependency 'AgoraRtcEngine_iOS', '4.2.6' + s.dependency 'AgoraIrisRTC_iOS', '4.3.0-build.2' + s.dependency 'AgoraRtcEngine_iOS', '4.3.0' end s.platform = :ios, '9.0' diff --git a/lib/agora_rtc_engine.dart b/lib/agora_rtc_engine.dart index eb0635f4d..822de18ee 100644 --- a/lib/agora_rtc_engine.dart +++ b/lib/agora_rtc_engine.dart @@ -13,6 +13,7 @@ export 'src/agora_rtc_engine_ex.dart'; export 'src/agora_rtc_engine.dart'; export 'src/agora_spatial_audio.dart'; export 'src/audio_device_manager.dart'; +export 'src/agora_h265_transcoder.dart'; export 'src/render/agora_video_view.dart'; export 'src/render/media_player_controller.dart'; diff --git a/lib/src/agora_base.dart b/lib/src/agora_base.dart index 5812cbd05..c1b913aad 100644 --- a/lib/src/agora_base.dart +++ b/lib/src/agora_base.dart @@ -458,10 +458,6 @@ enum ErrorCodeType { /// 1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted. @JsonValue(1501) errVdmCameraNotAuthorized, - - /// @nodoc - @JsonValue(2007) - errAdmApplicationLoopback, } /// @nodoc @@ -623,10 +619,6 @@ enum InterfaceIdType { @JsonValue(9) agoraIidMediaEngineRegulator, - /// @nodoc - @JsonValue(10) - agoraIidCloudSpatialAudio, - /// @nodoc @JsonValue(11) agoraIidLocalSpatialAudio, @@ -637,7 +629,7 @@ enum InterfaceIdType { /// @nodoc @JsonValue(14) - agoraIidMetachatService, + agoraIidMetaService, /// @nodoc @JsonValue(15) @@ -1071,7 +1063,7 @@ extension VideoCodecCapabilityLevelExt on VideoCodecCapabilityLevel { /// Video codec types. @JsonEnum(alwaysCreate: true) enum VideoCodecType { - /// @nodoc + /// 0: (Default) Unspecified codec format. The SDK automatically matches the appropriate codec format based on the current video stream's resolution and device performance. @JsonValue(0) videoCodecNone, @@ -1079,7 +1071,7 @@ enum VideoCodecType { @JsonValue(1) videoCodecVp8, - /// 2: (Default) Standard H.264. + /// 2: Standard H.264. @JsonValue(2) videoCodecH264, @@ -1490,12 +1482,34 @@ class VideoSubscriptionOptions { Map toJson() => _$VideoSubscriptionOptionsToJson(this); } +/// The maximum length of the user account. +@JsonEnum(alwaysCreate: true) +enum MaxUserAccountLengthType { + /// The maximum length of the user account is 256 bytes. + @JsonValue(256) + maxUserAccountLength, +} + +/// @nodoc +extension MaxUserAccountLengthTypeExt on MaxUserAccountLengthType { + /// @nodoc + static MaxUserAccountLengthType fromValue(int value) { + return $enumDecode(_$MaxUserAccountLengthTypeEnumMap, value); + } + + /// @nodoc + int value() { + return _$MaxUserAccountLengthTypeEnumMap[this]!; + } +} + /// Information about externally encoded video frames. @JsonSerializable(explicitToJson: true, includeIfNull: false) class EncodedVideoFrameInfo { /// @nodoc const EncodedVideoFrameInfo( - {this.codecType, + {this.uid, + this.codecType, this.width, this.height, this.framesPerSecond, @@ -1504,9 +1518,12 @@ class EncodedVideoFrameInfo { this.trackId, this.captureTimeMs, this.decodeTimeMs, - this.uid, this.streamType}); + /// The user ID to push the externally encoded video frame. + @JsonKey(name: 'uid') + final int? uid; + /// The codec type of the local video stream. See VideoCodecType. The default value is videoCodecH264 (2). @JsonKey(name: 'codecType') final VideoCodecType? codecType; @@ -1543,10 +1560,6 @@ class EncodedVideoFrameInfo { @JsonKey(name: 'decodeTimeMs') final int? decodeTimeMs; - /// The user ID to push the externally encoded video frame. - @JsonKey(name: 'uid') - final int? uid; - /// The type of video streams. See VideoStreamType. @JsonKey(name: 'streamType') final VideoStreamType? streamType; @@ -1778,7 +1791,7 @@ class VideoEncoderConfiguration { @JsonKey(name: 'frameRate') final int? frameRate; - /// The encoding bitrate (Kbps) of the video. (0): (Recommended) Standard bitrate mode. In this mode, the bitrates of the live broadcasting profile is higher than that of the communication profile. (-1): Adaptive bitrate mode. In this mode, the bitrates of the live broadcasting profile equals that of the communication profile. If this mode is selected, the video frame rate of live broadcasting scenarios may be lower than the set value. + /// The encoding bitrate (Kbps) of the video. This parameter does not need to be set; keeping the default value standardBitrate is sufficient. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you have set. For the correspondence between video resolution, frame rate, and bitrate, please refer to. standardBitrate (0): (Recommended) Standard bitrate mode. compatibleBitrate (-1): Adaptive bitrate mode. In general, Agora suggests that you do not use this value. @JsonKey(name: 'bitrate') final int? bitrate; @@ -1837,7 +1850,7 @@ class DataStreamConfig { /// The mode in which the video stream is sent. @JsonEnum(alwaysCreate: true) enum SimulcastStreamMode { - /// -1: By default, the low-quality video steam is not sent; the SDK automatically switches to low-quality video stream mode after it receives a request to subscribe to a low-quality video stream. + /// -1: By default, do not send the low-quality video stream until a subscription request for the low-quality video stream is received from the receiving end, then automatically start sending low-quality video stream. @JsonValue(-1) autoSimulcastStream, @@ -1960,7 +1973,7 @@ class WatermarkOptions { this.watermarkRatio, this.mode}); - /// Reserved for future use. + /// Is the watermark visible in the local preview view? true : (Default) The watermark is visible in the local preview view. false : The watermark is not visible in the local preview view. @JsonKey(name: 'visibleInPreview') final bool? visibleInPreview; @@ -2577,6 +2590,39 @@ extension VideoApplicationScenarioTypeExt on VideoApplicationScenarioType { } } +/// @nodoc +@JsonEnum(alwaysCreate: true) +enum VideoQoePreferenceType { + /// @nodoc + @JsonValue(1) + videoQoePreferenceBalance, + + /// @nodoc + @JsonValue(2) + videoQoePreferenceDelayFirst, + + /// @nodoc + @JsonValue(3) + videoQoePreferencePictureQualityFirst, + + /// @nodoc + @JsonValue(4) + videoQoePreferenceFluencyFirst, +} + +/// @nodoc +extension VideoQoePreferenceTypeExt on VideoQoePreferenceType { + /// @nodoc + static VideoQoePreferenceType fromValue(int value) { + return $enumDecode(_$VideoQoePreferenceTypeEnumMap, value); + } + + /// @nodoc + int value() { + return _$VideoQoePreferenceTypeEnumMap[this]!; + } +} + /// The brightness level of the video image captured by the local camera. @JsonEnum(alwaysCreate: true) enum CaptureBrightnessLevelType { @@ -2643,64 +2689,64 @@ extension LocalAudioStreamStateExt on LocalAudioStreamState { } } -/// Local audio state error codes. +/// Reasons for local audio state changes. @JsonEnum(alwaysCreate: true) -enum LocalAudioStreamError { +enum LocalAudioStreamReason { /// 0: The local audio is normal. @JsonValue(0) - localAudioStreamErrorOk, + localAudioStreamReasonOk, /// 1: No specified reason for the local audio failure. Remind your users to try to rejoin the channel. @JsonValue(1) - localAudioStreamErrorFailure, + localAudioStreamReasonFailure, /// 2: No permission to use the local audio capturing device. Remind your users to grant permission. Deprecated: This enumerator is deprecated. Please use recordAudio in the onPermissionError callback instead. @JsonValue(2) - localAudioStreamErrorDeviceNoPermission, + localAudioStreamReasonDeviceNoPermission, /// 3: (Android and iOS only) The local audio capture device is already in use. Remind your users to check whether another application occupies the microphone. Local audio capture automatically resumes after the microphone is idle for about five seconds. You can also try to rejoin the channel after the microphone is idle. @JsonValue(3) - localAudioStreamErrorDeviceBusy, + localAudioStreamReasonDeviceBusy, /// 4: The local audio capture fails. @JsonValue(4) - localAudioStreamErrorRecordFailure, + localAudioStreamReasonRecordFailure, /// 5: The local audio encoding fails. @JsonValue(5) - localAudioStreamErrorEncodeFailure, + localAudioStreamReasonEncodeFailure, - /// 6: (Windows only) The application cannot find the local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control plane of the device or if the microphone is working properly. + /// 6: (Windows and macOS only) No local audio capture device. Remind your users to check whether the microphone is connected to the device properly in the control plane of the device or if the microphone is working properly. @JsonValue(6) - localAudioStreamErrorNoRecordingDevice, + localAudioStreamReasonNoRecordingDevice, - /// 7: (Windows only) The application cannot find the local audio playback device. Remind your users to check whether the speaker is connected to the device properly in the control plane of the device or if the speaker is working properly. + /// 7: (Windows and macOS only) No local audio capture device. Remind your users to check whether the speaker is connected to the device properly in the control plane of the device or if the speaker is working properly. @JsonValue(7) - localAudioStreamErrorNoPlayoutDevice, + localAudioStreamReasonNoPlayoutDevice, /// 8: (Android and iOS only) The local audio capture is interrupted by a system call, Siri, or alarm clock. Remind your users to end the phone call, Siri, or alarm clock if the local audio capture is required. @JsonValue(8) - localAudioStreamErrorInterrupted, + localAudioStreamReasonInterrupted, /// 9: (Windows only) The ID of the local audio-capture device is invalid. Check the audio capture device ID. @JsonValue(9) - localAudioStreamErrorRecordInvalidId, + localAudioStreamReasonRecordInvalidId, /// 10: (Windows only) The ID of the local audio-playback device is invalid. Check the audio playback device ID. @JsonValue(10) - localAudioStreamErrorPlayoutInvalidId, + localAudioStreamReasonPlayoutInvalidId, } /// @nodoc -extension LocalAudioStreamErrorExt on LocalAudioStreamError { +extension LocalAudioStreamReasonExt on LocalAudioStreamReason { /// @nodoc - static LocalAudioStreamError fromValue(int value) { - return $enumDecode(_$LocalAudioStreamErrorEnumMap, value); + static LocalAudioStreamReason fromValue(int value) { + return $enumDecode(_$LocalAudioStreamReasonEnumMap, value); } /// @nodoc int value() { - return _$LocalAudioStreamErrorEnumMap[this]!; + return _$LocalAudioStreamReasonEnumMap[this]!; } } @@ -2737,115 +2783,119 @@ extension LocalVideoStreamStateExt on LocalVideoStreamState { } } -/// Local video state error codes. +/// Reasons for local video state changes. @JsonEnum(alwaysCreate: true) -enum LocalVideoStreamError { +enum LocalVideoStreamReason { /// 0: The local video is normal. @JsonValue(0) - localVideoStreamErrorOk, + localVideoStreamReasonOk, /// 1: No specified reason for the local video failure. @JsonValue(1) - localVideoStreamErrorFailure, + localVideoStreamReasonFailure, /// 2: No permission to use the local video capturing device. Remind the user to grant permissions and rejoin the channel. Deprecated: This enumerator is deprecated. Please use camera in the onPermissionError callback instead. @JsonValue(2) - localVideoStreamErrorDeviceNoPermission, + localVideoStreamReasonDeviceNoPermission, /// 3: The local video capturing device is in use. Remind the user to check whether another application occupies the camera. @JsonValue(3) - localVideoStreamErrorDeviceBusy, + localVideoStreamReasonDeviceBusy, /// 4: The local video capture fails. Remind your user to check whether the video capture device is working properly, whether the camera is occupied by another application, or try to rejoin the channel. @JsonValue(4) - localVideoStreamErrorCaptureFailure, + localVideoStreamReasonCaptureFailure, /// 5: The local video encoding fails. @JsonValue(5) - localVideoStreamErrorEncodeFailure, + localVideoStreamReasonCodecNotSupport, /// 6: (iOS only) The app is in the background. Remind the user that video capture cannot be performed normally when the app is in the background. @JsonValue(6) - localVideoStreamErrorCaptureInbackground, + localVideoStreamReasonCaptureInbackground, /// 7: (iOS only) The current application window is running in Slide Over, Split View, or Picture in Picture mode, and another app is occupying the camera. Remind the user that the application cannot capture video properly when the app is running in Slide Over, Split View, or Picture in Picture mode and another app is occupying the camera. @JsonValue(7) - localVideoStreamErrorCaptureMultipleForegroundApps, + localVideoStreamReasonCaptureMultipleForegroundApps, /// 8: Fails to find a local video capture device. Remind the user to check whether the camera is connected to the device properly or the camera is working properly, and then to rejoin the channel. @JsonValue(8) - localVideoStreamErrorDeviceNotFound, + localVideoStreamReasonDeviceNotFound, /// 9: (macOS only) The video capture device currently in use is disconnected (such as being unplugged). @JsonValue(9) - localVideoStreamErrorDeviceDisconnected, + localVideoStreamReasonDeviceDisconnected, /// 10: (macOS and Windows only) The SDK cannot find the video device in the video device list. Check whether the ID of the video device is valid. @JsonValue(10) - localVideoStreamErrorDeviceInvalidId, + localVideoStreamReasonDeviceInvalidId, /// 101: The current video capture device is unavailable due to excessive system pressure. @JsonValue(101) - localVideoStreamErrorDeviceSystemPressure, + localVideoStreamReasonDeviceSystemPressure, - /// 11: (macOS only) The shared window is minimized when you call startScreenCaptureByWindowId to share a window. The SDK cannot share a minimized window. You can cancel the minimization of this window at the application layer, for example by maximizing this window. + /// 11: (macOS and Windows only) The shared windows is minimized when you call the startScreenCaptureByWindowId method to share a window. The SDK cannot share a minimized window. You can cancel the minimization of this window at the application layer, for example by maximizing this window. @JsonValue(11) - localVideoStreamErrorScreenCaptureWindowMinimized, + localVideoStreamReasonScreenCaptureWindowMinimized, /// 12: (macOS and Windows only) The error code indicates that a window shared by the window ID has been closed or a full-screen window shared by the window ID has exited full-screen mode. After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a black screen, Agora recommends that you immediately stop screen sharing. Common scenarios reporting this error code: /// When the local user closes the shared window, the SDK reports this error code. /// The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After the user exits full-screen mode, the SDK reports this error code. /// The local user watches a web video or reads a web document in full-screen mode first, and then shares the window of the web video or document. After the user exits full-screen mode, the SDK reports this error code. @JsonValue(12) - localVideoStreamErrorScreenCaptureWindowClosed, + localVideoStreamReasonScreenCaptureWindowClosed, /// 13: (Windows only) The window being shared is overlapped by another window, so the overlapped area is blacked out by the SDK during window sharing. @JsonValue(13) - localVideoStreamErrorScreenCaptureWindowOccluded, + localVideoStreamReasonScreenCaptureWindowOccluded, /// @nodoc @JsonValue(20) - localVideoStreamErrorScreenCaptureWindowNotSupported, + localVideoStreamReasonScreenCaptureWindowNotSupported, /// @nodoc @JsonValue(21) - localVideoStreamErrorScreenCaptureFailure, + localVideoStreamReasonScreenCaptureFailure, /// 22: (Windows and macOS only) No permission for screen capture. @JsonValue(22) - localVideoStreamErrorScreenCaptureNoPermission, - - /// 23: (Windows only) Screen capture has been paused. Common scenarios reporting this error code: The current screen may have been switched to a secure desktop, such as a UAC dialog box or Winlogon desktop. - @JsonValue(23) - localVideoStreamErrorScreenCapturePaused, + localVideoStreamReasonScreenCaptureNoPermission, - /// 24: (Windows only) Screen capture has resumed from paused state. + /// 24: (Windows only) An unexpected error occurred during screen sharing (possibly due to window blocking failure), resulting in decreased performance, but the screen sharing process itself was not affected. @JsonValue(24) - localVideoStreamErrorScreenCaptureResumed, + localVideoStreamReasonScreenCaptureAutoFallback, /// 25: (Windows only) The window for the current screen capture is hidden and not visible on the current screen. @JsonValue(25) - localVideoStreamErrorScreenCaptureWindowHidden, + localVideoStreamReasonScreenCaptureWindowHidden, /// 26: (Windows only) The window for screen capture has been restored from hidden state. @JsonValue(26) - localVideoStreamErrorScreenCaptureWindowRecoverFromHidden, + localVideoStreamReasonScreenCaptureWindowRecoverFromHidden, /// 27: (Windows only) The window for screen capture has been restored from minimized state. @JsonValue(27) - localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized, + localVideoStreamReasonScreenCaptureWindowRecoverFromMinimized, + + /// 28: (Windows only) Screen capture has been paused. Common scenarios reporting this error code: The current screen may have been switched to a secure desktop, such as a UAC dialog box or Winlogon desktop. + @JsonValue(28) + localVideoStreamReasonScreenCapturePaused, + + /// 29: (Windows only) Screen capture has resumed from paused state. + @JsonValue(29) + localVideoStreamReasonScreenCaptureResumed, } /// @nodoc -extension LocalVideoStreamErrorExt on LocalVideoStreamError { +extension LocalVideoStreamReasonExt on LocalVideoStreamReason { /// @nodoc - static LocalVideoStreamError fromValue(int value) { - return $enumDecode(_$LocalVideoStreamErrorEnumMap, value); + static LocalVideoStreamReason fromValue(int value) { + return $enumDecode(_$LocalVideoStreamReasonEnumMap, value); } /// @nodoc int value() { - return _$LocalVideoStreamErrorEnumMap[this]!; + return _$LocalVideoStreamReasonEnumMap[this]!; } } @@ -3007,11 +3057,11 @@ enum RemoteVideoStateReason { @JsonValue(7) remoteVideoStateReasonRemoteOffline, - /// @nodoc + /// 8: The remote audio-and-video stream falls back to the audio-only stream due to poor network conditions. @JsonValue(8) remoteVideoStateReasonAudioFallback, - /// @nodoc + /// 9: The remote audio-only stream switches back to the audio-and-video stream after the network conditions improve. @JsonValue(9) remoteVideoStateReasonAudioFallbackRecovery, @@ -3373,7 +3423,10 @@ class LocalAudioStats { this.sentBitrate, this.internalCodec, this.txPacketLossRate, - this.audioDeviceDelay}); + this.audioDeviceDelay, + this.audioPlayoutDelay, + this.earMonitorDelay, + this.aecEstimatedDelay}); /// The number of audio channels. @JsonKey(name: 'numChannels') @@ -3395,10 +3448,22 @@ class LocalAudioStats { @JsonKey(name: 'txPacketLossRate') final int? txPacketLossRate; - /// The delay of the audio device module when playing or recording audio. + /// The audio device module delay (ms) when playing or recording audio. @JsonKey(name: 'audioDeviceDelay') final int? audioDeviceDelay; + /// @nodoc + @JsonKey(name: 'audioPlayoutDelay') + final int? audioPlayoutDelay; + + /// The ear monitor delay (ms), which is the delay from microphone input to headphone output. + @JsonKey(name: 'earMonitorDelay') + final int? earMonitorDelay; + + /// Acoustic echo cancellation (AEC) module estimated delay (ms), which is the signal delay between when audio is played locally before being locally captured. + @JsonKey(name: 'aecEstimatedDelay') + final int? aecEstimatedDelay; + /// @nodoc factory LocalAudioStats.fromJson(Map json) => _$LocalAudioStatsFromJson(json); @@ -3450,88 +3515,88 @@ extension RtmpStreamPublishStateExt on RtmpStreamPublishState { } } -/// Error codes of the RTMP or RTMPS streaming. +/// Reasons for changes in the status of RTMP or RTMPS streaming. @JsonEnum(alwaysCreate: true) -enum RtmpStreamPublishErrorType { +enum RtmpStreamPublishReason { /// 0: The RTMP or RTMPS streaming has not started or has ended. @JsonValue(0) - rtmpStreamPublishErrorOk, + rtmpStreamPublishReasonOk, /// 1: Invalid argument used. Check the parameter setting. @JsonValue(1) - rtmpStreamPublishErrorInvalidArgument, + rtmpStreamPublishReasonInvalidArgument, /// 2: The RTMP or RTMPS streaming is encrypted and cannot be published. @JsonValue(2) - rtmpStreamPublishErrorEncryptedStreamNotAllowed, + rtmpStreamPublishReasonEncryptedStreamNotAllowed, /// 3: Timeout for the RTMP or RTMPS streaming. @JsonValue(3) - rtmpStreamPublishErrorConnectionTimeout, + rtmpStreamPublishReasonConnectionTimeout, /// 4: An error occurs in Agora's streaming server. @JsonValue(4) - rtmpStreamPublishErrorInternalServerError, + rtmpStreamPublishReasonInternalServerError, /// 5: An error occurs in the CDN server. @JsonValue(5) - rtmpStreamPublishErrorRtmpServerError, + rtmpStreamPublishReasonRtmpServerError, /// 6: The RTMP or RTMPS streaming publishes too frequently. @JsonValue(6) - rtmpStreamPublishErrorTooOften, + rtmpStreamPublishReasonTooOften, /// 7: The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones. @JsonValue(7) - rtmpStreamPublishErrorReachLimit, + rtmpStreamPublishReasonReachLimit, /// 8: The host manipulates other hosts' URLs. For example, the host updates or stops other hosts' streams. Check your app logic. @JsonValue(8) - rtmpStreamPublishErrorNotAuthorized, + rtmpStreamPublishReasonNotAuthorized, /// 9: Agora's server fails to find the RTMP or RTMPS streaming. @JsonValue(9) - rtmpStreamPublishErrorStreamNotFound, + rtmpStreamPublishReasonStreamNotFound, /// 10: The format of the RTMP or RTMPS streaming URL is not supported. Check whether the URL format is correct. @JsonValue(10) - rtmpStreamPublishErrorFormatNotSupported, + rtmpStreamPublishReasonFormatNotSupported, /// 11: The user role is not host, so the user cannot use the CDN live streaming function. Check your application code logic. @JsonValue(11) - rtmpStreamPublishErrorNotBroadcaster, + rtmpStreamPublishReasonNotBroadcaster, /// 13: The updateRtmpTranscoding method is called to update the transcoding configuration in a scenario where there is streaming without transcoding. Check your application code logic. @JsonValue(13) - rtmpStreamPublishErrorTranscodingNoMixStream, + rtmpStreamPublishReasonTranscodingNoMixStream, /// 14: Errors occurred in the host's network. @JsonValue(14) - rtmpStreamPublishErrorNetDown, + rtmpStreamPublishReasonNetDown, /// @nodoc @JsonValue(15) - rtmpStreamPublishErrorInvalidAppid, + rtmpStreamPublishReasonInvalidAppid, /// 16: Your project does not have permission to use streaming services. Refer to Media Push to enable the Media Push permission. @JsonValue(16) - rtmpStreamPublishErrorInvalidPrivilege, + rtmpStreamPublishReasonInvalidPrivilege, /// 100: The streaming has been stopped normally. After you stop the Media Push, the SDK returns this value. @JsonValue(100) - rtmpStreamUnpublishErrorOk, + rtmpStreamUnpublishReasonOk, } /// @nodoc -extension RtmpStreamPublishErrorTypeExt on RtmpStreamPublishErrorType { +extension RtmpStreamPublishReasonExt on RtmpStreamPublishReason { /// @nodoc - static RtmpStreamPublishErrorType fromValue(int value) { - return $enumDecode(_$RtmpStreamPublishErrorTypeEnumMap, value); + static RtmpStreamPublishReason fromValue(int value) { + return $enumDecode(_$RtmpStreamPublishReasonEnumMap, value); } /// @nodoc int value() { - return _$RtmpStreamPublishErrorTypeEnumMap[this]!; + return _$RtmpStreamPublishReasonEnumMap[this]!; } } @@ -3587,19 +3652,19 @@ class RtcImage { @JsonKey(name: 'url') final String? url; - /// The x coordinate (pixel) of the image on the video frame (taking the upper left corner of the video frame as the origin). + /// The x-coordinate (px) of the image on the video frame (taking the upper left corner of the video frame as the origin). @JsonKey(name: 'x') final int? x; - /// The y coordinate (pixel) of the image on the video frame (taking the upper left corner of the video frame as the origin). + /// The y-coordinate (px) of the image on the video frame (taking the upper left corner of the video frame as the origin). @JsonKey(name: 'y') final int? y; - /// The width (pixel) of the image on the video frame. + /// The width (px) of the image on the video frame. @JsonKey(name: 'width') final int? width; - /// The height (pixel) of the image on the video frame. + /// The height (px) of the image on the video frame. @JsonKey(name: 'height') final int? height; @@ -4253,6 +4318,14 @@ enum ConnectionChangedReasonType { /// @nodoc @JsonValue(22) connectionChangedCertificationVeryfyFailure, + + /// @nodoc + @JsonValue(23) + connectionChangedStreamChannelNotAvailable, + + /// @nodoc + @JsonValue(24) + connectionChangedInconsistentAppid, } /// @nodoc @@ -4469,8 +4542,9 @@ extension VideoViewSetupModeExt on VideoViewSetupMode { class VideoCanvas { /// @nodoc const VideoCanvas( - {this.view, - this.uid, + {this.uid, + this.subviewUid, + this.view, this.backgroundColor, this.renderMode, this.mirrorMode, @@ -4478,16 +4552,21 @@ class VideoCanvas { this.sourceType, this.mediaPlayerId, this.cropArea, - this.enableAlphaMask}); - - /// The video display window. - @JsonKey(name: 'view') - final int? view; + this.enableAlphaMask, + this.position}); /// The user ID. @JsonKey(name: 'uid') final int? uid; + /// The ID of the user who publishes a specific sub-video stream within the mixed video stream. + @JsonKey(name: 'subviewUid') + final int? subviewUid; + + /// The video display window. + @JsonKey(name: 'view') + final int? view; + /// The background color of the video canvas in RGBA format. The default value is 0x00000000, which represents completely transparent black. @JsonKey(name: 'backgroundColor') final int? backgroundColor; @@ -4518,13 +4597,17 @@ class VideoCanvas { @JsonKey(name: 'cropArea') final Rectangle? cropArea; - /// (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (default) The receiver disables alpha mask rendering. Alpha mask rendering can create images with transparent effects and extract portraits from videos. When used in combination with other methods, you can implement effects such as picture-in-picture and watermarking. + /// (Optional) Whether the receiver enables alpha mask rendering: true : The receiver enables alpha mask rendering. false : (default) The receiver disables alpha mask rendering. Alpha mask rendering can create images with transparent effects and extract portraits from videos. When used in combination with other methods, you can implement effects such as portrait-in-picture and watermarking. /// This property applies to macOS only. /// The receiver can render alpha channel information only when the sender enables alpha transmission. /// To enable alpha transmission,. @JsonKey(name: 'enableAlphaMask') final bool? enableAlphaMask; + /// The observation position of the video frame in the video link. See VideoModulePosition. + @JsonKey(name: 'position') + final VideoModulePosition? position; + /// @nodoc factory VideoCanvas.fromJson(Map json) => _$VideoCanvasFromJson(json); @@ -4784,11 +4867,11 @@ class VirtualBackgroundSource { @JsonKey(name: 'background_source_type') final BackgroundSourceType? backgroundSourceType; - /// The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000, 0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image. This parameter takes effect only when the type of the custom background image is backgroundColor. + /// The type of the custom background image. The color of the custom background image. The format is a hexadecimal integer defined by RGB, without the # sign, such as 0xFFB6C1 for light pink. The default value is 0xFFFFFF, which signifies white. The value range is [0x000000, 0xffffff]. If the value is invalid, the SDK replaces the original background image with a white background image. This parameter is only applicable to custom backgrounds of the following types: backgroundColor : The background image is a solid-colored image of the color passed in by the parameter. backgroundImg : If the image in source has a transparent background, the transparent background will be filled with the color passed in by the parameter. @JsonKey(name: 'color') final int? color; - /// The local absolute path of the custom background image. PNG and JPG formats are supported. If the path is invalid, the SDK replaces the original background image with a white background image. This parameter takes effect only when the type of the custom background image is backgroundImg. + /// The local absolute path of the custom background image. Supports PNG, JPG, MP4, AVI, MKV, and FLV formats. If the path is invalid, the SDK will use either the original background image or the solid color image specified by color. This parameter takes effect only when the type of the custom background image is backgroundImg or backgroundVideo. @JsonKey(name: 'source') final String? source; @@ -5692,87 +5775,6 @@ extension ChannelMediaRelayErrorExt on ChannelMediaRelayError { } } -/// The event code of channel media relay. -@JsonEnum(alwaysCreate: true) -enum ChannelMediaRelayEvent { - /// 0: The user disconnects from the server due to a poor network connection. - @JsonValue(0) - relayEventNetworkDisconnected, - - /// 1: The user is connected to the server. - @JsonValue(1) - relayEventNetworkConnected, - - /// 2: The user joins the source channel. - @JsonValue(2) - relayEventPacketJoinedSrcChannel, - - /// 3: The user joins the target channel. - @JsonValue(3) - relayEventPacketJoinedDestChannel, - - /// 4: The SDK starts relaying the media stream to the target channel. - @JsonValue(4) - relayEventPacketSentToDestChannel, - - /// 5: The server receives the audio stream from the source channel. - @JsonValue(5) - relayEventPacketReceivedVideoFromSrc, - - /// 6: The server receives the audio stream from the source channel. - @JsonValue(6) - relayEventPacketReceivedAudioFromSrc, - - /// 7: The target channel is updated. - @JsonValue(7) - relayEventPacketUpdateDestChannel, - - /// @nodoc - @JsonValue(8) - relayEventPacketUpdateDestChannelRefused, - - /// 9: The target channel does not change, which means that the target channel fails to be updated. - @JsonValue(9) - relayEventPacketUpdateDestChannelNotChange, - - /// 10: The target channel name is NULL. - @JsonValue(10) - relayEventPacketUpdateDestChannelIsNull, - - /// 11: The video profile is sent to the server. - @JsonValue(11) - relayEventVideoProfileUpdate, - - /// 12: The SDK successfully pauses relaying the media stream to target channels. - @JsonValue(12) - relayEventPauseSendPacketToDestChannelSuccess, - - /// 13: The SDK fails to pause relaying the media stream to target channels. - @JsonValue(13) - relayEventPauseSendPacketToDestChannelFailed, - - /// 14: The SDK successfully resumes relaying the media stream to target channels. - @JsonValue(14) - relayEventResumeSendPacketToDestChannelSuccess, - - /// 15: The SDK fails to resume relaying the media stream to target channels. - @JsonValue(15) - relayEventResumeSendPacketToDestChannelFailed, -} - -/// @nodoc -extension ChannelMediaRelayEventExt on ChannelMediaRelayEvent { - /// @nodoc - static ChannelMediaRelayEvent fromValue(int value) { - return $enumDecode(_$ChannelMediaRelayEventEnumMap, value); - } - - /// @nodoc - int value() { - return _$ChannelMediaRelayEventEnumMap[this]!; - } -} - /// The state code of the channel media relay. @JsonEnum(alwaysCreate: true) enum ChannelMediaRelayState { @@ -5810,7 +5812,11 @@ extension ChannelMediaRelayStateExt on ChannelMediaRelayState { @JsonSerializable(explicitToJson: true, includeIfNull: false) class ChannelMediaInfo { /// @nodoc - const ChannelMediaInfo({this.channelName, this.token, this.uid}); + const ChannelMediaInfo({this.uid, this.channelName, this.token}); + + /// The user ID. + @JsonKey(name: 'uid') + final int? uid; /// The channel name. @JsonKey(name: 'channelName') @@ -5820,10 +5826,6 @@ class ChannelMediaInfo { @JsonKey(name: 'token') final String? token; - /// The user ID. - @JsonKey(name: 'uid') - final int? uid; - /// @nodoc factory ChannelMediaInfo.fromJson(Map json) => _$ChannelMediaInfoFromJson(json); @@ -5925,14 +5927,14 @@ class DownlinkNetworkInfo { class PeerDownlinkInfo { /// @nodoc const PeerDownlinkInfo( - {this.uid, + {this.userId, this.streamType, this.currentDownscaleLevel, this.expectedBitrateBps}); /// @nodoc - @JsonKey(name: 'uid') - final String? uid; + @JsonKey(name: 'userId') + final String? userId; /// @nodoc @JsonKey(name: 'stream_type') @@ -6123,27 +6125,6 @@ extension PermissionTypeExt on PermissionType { } } -/// The maximum length of the user account. -@JsonEnum(alwaysCreate: true) -enum MaxUserAccountLengthType { - /// The maximum length of the user account is 256 bytes. - @JsonValue(256) - maxUserAccountLength, -} - -/// @nodoc -extension MaxUserAccountLengthTypeExt on MaxUserAccountLengthType { - /// @nodoc - static MaxUserAccountLengthType fromValue(int value) { - return $enumDecode(_$MaxUserAccountLengthTypeEnumMap, value); - } - - /// @nodoc - int value() { - return _$MaxUserAccountLengthTypeEnumMap[this]!; - } -} - /// The subscribing state. @JsonEnum(alwaysCreate: true) enum StreamSubscribeState { @@ -6242,7 +6223,7 @@ class EchoTestConfiguration { @JsonKey(name: 'enableAudio') final bool? enableAudio; - /// Whether to enable the video device for the loop test: true : (Default) Enable the video device. To test the video device, set this parameter as true. false : Disable the video device. + /// Whether to enable the video device for the loop test. Currently, video device loop test is not supported. Please set this parameter to false. @JsonKey(name: 'enableVideo') final bool? enableVideo; @@ -6254,7 +6235,9 @@ class EchoTestConfiguration { @JsonKey(name: 'channelId') final String? channelId; - /// The time interval (s) between when you start the call and when the recording plays back. The value range is [2, 10], and the default value is 2. + /// Set the time interval or delay for returning the results of the audio and video loop test. The value range is [2,10], in seconds, with the default value being 2 seconds. + /// For audio loop tests, the test results will be returned according to the time interval you set. + /// For video loop tests, the video will be displayed in a short time, after which the delay will gradually increase until it reaches the delay you set. @JsonKey(name: 'intervalInSeconds') final int? intervalInSeconds; @@ -6565,28 +6548,6 @@ extension ConfigFetchTypeExt on ConfigFetchType { } } -/// @nodoc -@JsonSerializable(explicitToJson: true, includeIfNull: false) -class RecorderStreamInfo { - /// @nodoc - const RecorderStreamInfo({this.channelId, this.uid}); - - /// @nodoc - @JsonKey(name: 'channelId') - final String? channelId; - - /// @nodoc - @JsonKey(name: 'uid') - final int? uid; - - /// @nodoc - factory RecorderStreamInfo.fromJson(Map json) => - _$RecorderStreamInfoFromJson(json); - - /// @nodoc - Map toJson() => _$RecorderStreamInfoToJson(this); -} - /// @nodoc @JsonEnum(alwaysCreate: true) enum LocalProxyMode { @@ -6672,7 +6633,8 @@ class LocalAccessPointConfiguration { this.domainListSize, this.verifyDomainName, this.mode, - this.advancedConfig}); + this.advancedConfig, + this.disableAut}); /// @nodoc @JsonKey(name: 'ipList') @@ -6702,6 +6664,10 @@ class LocalAccessPointConfiguration { @JsonKey(name: 'advancedConfig') final AdvancedConfigInfo? advancedConfig; + /// @nodoc + @JsonKey(name: 'disableAut') + final bool? disableAut; + /// @nodoc factory LocalAccessPointConfiguration.fromJson(Map json) => _$LocalAccessPointConfigurationFromJson(json); @@ -6710,6 +6676,28 @@ class LocalAccessPointConfiguration { Map toJson() => _$LocalAccessPointConfigurationToJson(this); } +/// @nodoc +@JsonSerializable(explicitToJson: true, includeIfNull: false) +class RecorderStreamInfo { + /// @nodoc + const RecorderStreamInfo({this.channelId, this.uid}); + + /// @nodoc + @JsonKey(name: 'channelId') + final String? channelId; + + /// @nodoc + @JsonKey(name: 'uid') + final int? uid; + + /// @nodoc + factory RecorderStreamInfo.fromJson(Map json) => + _$RecorderStreamInfoFromJson(json); + + /// @nodoc + Map toJson() => _$RecorderStreamInfoToJson(this); +} + /// The spatial audio parameters. @JsonSerializable(explicitToJson: true, includeIfNull: false) class SpatialAudioParams { @@ -6763,3 +6751,60 @@ class SpatialAudioParams { /// @nodoc Map toJson() => _$SpatialAudioParamsToJson(this); } + +/// Layout information of a specific sub-video stream within the mixed stream. +@JsonSerializable(explicitToJson: true, includeIfNull: false) +class VideoLayout { + /// @nodoc + const VideoLayout( + {this.channelId, + this.uid, + this.strUid, + this.x, + this.y, + this.width, + this.height, + this.videoState}); + + /// The channel name to which the sub-video stream belongs. + @JsonKey(name: 'channelId') + final String? channelId; + + /// User ID who published this sub-video stream. + @JsonKey(name: 'uid') + final int? uid; + + /// Reserved for future use. + @JsonKey(name: 'strUid') + final String? strUid; + + /// X-coordinate (px) of the sub-video stream on the mixing canvas. The relative lateral displacement of the top left corner of the video for video mixing to the origin (the top left corner of the canvas). + @JsonKey(name: 'x') + final int? x; + + /// Y-coordinate (px) of the sub-video stream on the mixing canvas. The relative longitudinal displacement of the top left corner of the captured video to the origin (the top left corner of the canvas). + @JsonKey(name: 'y') + final int? y; + + /// Width (px) of the sub-video stream. + @JsonKey(name: 'width') + final int? width; + + /// Heitht (px) of the sub-video stream. + @JsonKey(name: 'height') + final int? height; + + /// Status of the sub-video stream on the video mixing canvas. + /// 0: Normal. The sub-video stream has been rendered onto the mixing canvas. + /// 1: Placeholder image. The sub-video stream has no video frames and is displayed as a placeholder on the mixing canvas. + /// 2: Black image. The sub-video stream is replaced by a black image. + @JsonKey(name: 'videoState') + final int? videoState; + + /// @nodoc + factory VideoLayout.fromJson(Map json) => + _$VideoLayoutFromJson(json); + + /// @nodoc + Map toJson() => _$VideoLayoutToJson(this); +} diff --git a/lib/src/agora_base.g.dart b/lib/src/agora_base.g.dart index 6e9fca175..8628e20f9 100644 --- a/lib/src/agora_base.g.dart +++ b/lib/src/agora_base.g.dart @@ -191,6 +191,7 @@ const _$VideoStreamTypeEnumMap = { EncodedVideoFrameInfo _$EncodedVideoFrameInfoFromJson( Map json) => EncodedVideoFrameInfo( + uid: json['uid'] as int?, codecType: $enumDecodeNullable(_$VideoCodecTypeEnumMap, json['codecType']), width: json['width'] as int?, @@ -203,7 +204,6 @@ EncodedVideoFrameInfo _$EncodedVideoFrameInfoFromJson( trackId: json['trackId'] as int?, captureTimeMs: json['captureTimeMs'] as int?, decodeTimeMs: json['decodeTimeMs'] as int?, - uid: json['uid'] as int?, streamType: $enumDecodeNullable(_$VideoStreamTypeEnumMap, json['streamType']), ); @@ -218,6 +218,7 @@ Map _$EncodedVideoFrameInfoToJson( } } + writeNotNull('uid', instance.uid); writeNotNull('codecType', _$VideoCodecTypeEnumMap[instance.codecType]); writeNotNull('width', instance.width); writeNotNull('height', instance.height); @@ -227,7 +228,6 @@ Map _$EncodedVideoFrameInfoToJson( writeNotNull('trackId', instance.trackId); writeNotNull('captureTimeMs', instance.captureTimeMs); writeNotNull('decodeTimeMs', instance.decodeTimeMs); - writeNotNull('uid', instance.uid); writeNotNull('streamType', _$VideoStreamTypeEnumMap[instance.streamType]); return val; } @@ -809,6 +809,9 @@ LocalAudioStats _$LocalAudioStatsFromJson(Map json) => internalCodec: json['internalCodec'] as int?, txPacketLossRate: json['txPacketLossRate'] as int?, audioDeviceDelay: json['audioDeviceDelay'] as int?, + audioPlayoutDelay: json['audioPlayoutDelay'] as int?, + earMonitorDelay: json['earMonitorDelay'] as int?, + aecEstimatedDelay: json['aecEstimatedDelay'] as int?, ); Map _$LocalAudioStatsToJson(LocalAudioStats instance) { @@ -826,6 +829,9 @@ Map _$LocalAudioStatsToJson(LocalAudioStats instance) { writeNotNull('internalCodec', instance.internalCodec); writeNotNull('txPacketLossRate', instance.txPacketLossRate); writeNotNull('audioDeviceDelay', instance.audioDeviceDelay); + writeNotNull('audioPlayoutDelay', instance.audioPlayoutDelay); + writeNotNull('earMonitorDelay', instance.earMonitorDelay); + writeNotNull('aecEstimatedDelay', instance.aecEstimatedDelay); return val; } @@ -1200,8 +1206,9 @@ Map _$WlAccStatsToJson(WlAccStats instance) { } VideoCanvas _$VideoCanvasFromJson(Map json) => VideoCanvas( - view: json['view'] as int?, uid: json['uid'] as int?, + subviewUid: json['subviewUid'] as int?, + view: json['view'] as int?, backgroundColor: json['backgroundColor'] as int?, renderMode: $enumDecodeNullable(_$RenderModeTypeEnumMap, json['renderMode']), @@ -1216,6 +1223,8 @@ VideoCanvas _$VideoCanvasFromJson(Map json) => VideoCanvas( ? null : Rectangle.fromJson(json['cropArea'] as Map), enableAlphaMask: json['enableAlphaMask'] as bool?, + position: + $enumDecodeNullable(_$VideoModulePositionEnumMap, json['position']), ); Map _$VideoCanvasToJson(VideoCanvas instance) { @@ -1227,8 +1236,9 @@ Map _$VideoCanvasToJson(VideoCanvas instance) { } } - writeNotNull('view', instance.view); writeNotNull('uid', instance.uid); + writeNotNull('subviewUid', instance.subviewUid); + writeNotNull('view', instance.view); writeNotNull('backgroundColor', instance.backgroundColor); writeNotNull('renderMode', _$RenderModeTypeEnumMap[instance.renderMode]); writeNotNull('mirrorMode', _$VideoMirrorModeTypeEnumMap[instance.mirrorMode]); @@ -1237,6 +1247,7 @@ Map _$VideoCanvasToJson(VideoCanvas instance) { writeNotNull('mediaPlayerId', instance.mediaPlayerId); writeNotNull('cropArea', instance.cropArea?.toJson()); writeNotNull('enableAlphaMask', instance.enableAlphaMask); + writeNotNull('position', _$VideoModulePositionEnumMap[instance.position]); return val; } @@ -1252,6 +1263,13 @@ const _$VideoViewSetupModeEnumMap = { VideoViewSetupMode.videoViewSetupRemove: 2, }; +const _$VideoModulePositionEnumMap = { + VideoModulePosition.positionPostCapturer: 1, + VideoModulePosition.positionPreRenderer: 2, + VideoModulePosition.positionPreEncoder: 4, + VideoModulePosition.positionPostCapturerOrigin: 8, +}; + BeautyOptions _$BeautyOptionsFromJson(Map json) => BeautyOptions( lighteningContrastLevel: $enumDecodeNullable( @@ -1598,9 +1616,9 @@ const _$AudioEncodingTypeEnumMap = { ChannelMediaInfo _$ChannelMediaInfoFromJson(Map json) => ChannelMediaInfo( + uid: json['uid'] as int?, channelName: json['channelName'] as String?, token: json['token'] as String?, - uid: json['uid'] as int?, ); Map _$ChannelMediaInfoToJson(ChannelMediaInfo instance) { @@ -1612,9 +1630,9 @@ Map _$ChannelMediaInfoToJson(ChannelMediaInfo instance) { } } + writeNotNull('uid', instance.uid); writeNotNull('channelName', instance.channelName); writeNotNull('token', instance.token); - writeNotNull('uid', instance.uid); return val; } @@ -1700,7 +1718,7 @@ Map _$DownlinkNetworkInfoToJson(DownlinkNetworkInfo instance) { PeerDownlinkInfo _$PeerDownlinkInfoFromJson(Map json) => PeerDownlinkInfo( - uid: json['uid'] as String?, + userId: json['userId'] as String?, streamType: $enumDecodeNullable(_$VideoStreamTypeEnumMap, json['stream_type']), currentDownscaleLevel: $enumDecodeNullable( @@ -1717,7 +1735,7 @@ Map _$PeerDownlinkInfoToJson(PeerDownlinkInfo instance) { } } - writeNotNull('uid', instance.uid); + writeNotNull('userId', instance.userId); writeNotNull('stream_type', _$VideoStreamTypeEnumMap[instance.streamType]); writeNotNull('current_downscale_level', _$RemoteVideoDownscaleLevelEnumMap[instance.currentDownscaleLevel]); @@ -1941,26 +1959,6 @@ Map _$VideoRenderingTracingInfoToJson( return val; } -RecorderStreamInfo _$RecorderStreamInfoFromJson(Map json) => - RecorderStreamInfo( - channelId: json['channelId'] as String?, - uid: json['uid'] as int?, - ); - -Map _$RecorderStreamInfoToJson(RecorderStreamInfo instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('channelId', instance.channelId); - writeNotNull('uid', instance.uid); - return val; -} - LogUploadServerInfo _$LogUploadServerInfoFromJson(Map json) => LogUploadServerInfo( serverDomain: json['serverDomain'] as String?, @@ -2022,6 +2020,7 @@ LocalAccessPointConfiguration _$LocalAccessPointConfigurationFromJson( ? null : AdvancedConfigInfo.fromJson( json['advancedConfig'] as Map), + disableAut: json['disableAut'] as bool?, ); Map _$LocalAccessPointConfigurationToJson( @@ -2041,6 +2040,7 @@ Map _$LocalAccessPointConfigurationToJson( writeNotNull('verifyDomainName', instance.verifyDomainName); writeNotNull('mode', _$LocalProxyModeEnumMap[instance.mode]); writeNotNull('advancedConfig', instance.advancedConfig?.toJson()); + writeNotNull('disableAut', instance.disableAut); return val; } @@ -2049,6 +2049,26 @@ const _$LocalProxyModeEnumMap = { LocalProxyMode.localOnly: 1, }; +RecorderStreamInfo _$RecorderStreamInfoFromJson(Map json) => + RecorderStreamInfo( + channelId: json['channelId'] as String?, + uid: json['uid'] as int?, + ); + +Map _$RecorderStreamInfoToJson(RecorderStreamInfo instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('channelId', instance.channelId); + writeNotNull('uid', instance.uid); + return val; +} + SpatialAudioParams _$SpatialAudioParamsFromJson(Map json) => SpatialAudioParams( speakerAzimuth: (json['speaker_azimuth'] as num?)?.toDouble(), @@ -2081,6 +2101,37 @@ Map _$SpatialAudioParamsToJson(SpatialAudioParams instance) { return val; } +VideoLayout _$VideoLayoutFromJson(Map json) => VideoLayout( + channelId: json['channelId'] as String?, + uid: json['uid'] as int?, + strUid: json['strUid'] as String?, + x: json['x'] as int?, + y: json['y'] as int?, + width: json['width'] as int?, + height: json['height'] as int?, + videoState: json['videoState'] as int?, + ); + +Map _$VideoLayoutToJson(VideoLayout instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('channelId', instance.channelId); + writeNotNull('uid', instance.uid); + writeNotNull('strUid', instance.strUid); + writeNotNull('x', instance.x); + writeNotNull('y', instance.y); + writeNotNull('width', instance.width); + writeNotNull('height', instance.height); + writeNotNull('videoState', instance.videoState); + return val; +} + const _$ChannelProfileTypeEnumMap = { ChannelProfileType.channelProfileCommunication: 0, ChannelProfileType.channelProfileLiveBroadcasting: 1, @@ -2189,7 +2240,6 @@ const _$ErrorCodeTypeEnumMap = { ErrorCodeType.errAdmStartRecording: 1012, ErrorCodeType.errAdmStopRecording: 1013, ErrorCodeType.errVdmCameraNotAuthorized: 1501, - ErrorCodeType.errAdmApplicationLoopback: 2007, }; const _$LicenseErrorTypeEnumMap = { @@ -2228,10 +2278,9 @@ const _$InterfaceIdTypeEnumMap = { InterfaceIdType.agoraIidRtcConnection: 7, InterfaceIdType.agoraIidSignalingEngine: 8, InterfaceIdType.agoraIidMediaEngineRegulator: 9, - InterfaceIdType.agoraIidCloudSpatialAudio: 10, InterfaceIdType.agoraIidLocalSpatialAudio: 11, InterfaceIdType.agoraIidStateSync: 13, - InterfaceIdType.agoraIidMetachatService: 14, + InterfaceIdType.agoraIidMetaService: 14, InterfaceIdType.agoraIidMusicContentCenter: 15, InterfaceIdType.agoraIidH265Transcoder: 16, }; @@ -2282,6 +2331,10 @@ const _$H264PacketizeModeEnumMap = { H264PacketizeMode.singleNalUnit: 1, }; +const _$MaxUserAccountLengthTypeEnumMap = { + MaxUserAccountLengthType.maxUserAccountLength: 256, +}; + const _$CodecCapMaskEnumMap = { CodecCapMask.codecCapMaskNone: 0, CodecCapMask.codecCapMaskHwDec: 1, @@ -2358,6 +2411,13 @@ const _$VideoApplicationScenarioTypeEnumMap = { VideoApplicationScenarioType.applicationScenarioMeeting: 1, }; +const _$VideoQoePreferenceTypeEnumMap = { + VideoQoePreferenceType.videoQoePreferenceBalance: 1, + VideoQoePreferenceType.videoQoePreferenceDelayFirst: 2, + VideoQoePreferenceType.videoQoePreferencePictureQualityFirst: 3, + VideoQoePreferenceType.videoQoePreferenceFluencyFirst: 4, +}; + const _$CaptureBrightnessLevelTypeEnumMap = { CaptureBrightnessLevelType.captureBrightnessLevelInvalid: -1, CaptureBrightnessLevelType.captureBrightnessLevelNormal: 0, @@ -2372,18 +2432,18 @@ const _$LocalAudioStreamStateEnumMap = { LocalAudioStreamState.localAudioStreamStateFailed: 3, }; -const _$LocalAudioStreamErrorEnumMap = { - LocalAudioStreamError.localAudioStreamErrorOk: 0, - LocalAudioStreamError.localAudioStreamErrorFailure: 1, - LocalAudioStreamError.localAudioStreamErrorDeviceNoPermission: 2, - LocalAudioStreamError.localAudioStreamErrorDeviceBusy: 3, - LocalAudioStreamError.localAudioStreamErrorRecordFailure: 4, - LocalAudioStreamError.localAudioStreamErrorEncodeFailure: 5, - LocalAudioStreamError.localAudioStreamErrorNoRecordingDevice: 6, - LocalAudioStreamError.localAudioStreamErrorNoPlayoutDevice: 7, - LocalAudioStreamError.localAudioStreamErrorInterrupted: 8, - LocalAudioStreamError.localAudioStreamErrorRecordInvalidId: 9, - LocalAudioStreamError.localAudioStreamErrorPlayoutInvalidId: 10, +const _$LocalAudioStreamReasonEnumMap = { + LocalAudioStreamReason.localAudioStreamReasonOk: 0, + LocalAudioStreamReason.localAudioStreamReasonFailure: 1, + LocalAudioStreamReason.localAudioStreamReasonDeviceNoPermission: 2, + LocalAudioStreamReason.localAudioStreamReasonDeviceBusy: 3, + LocalAudioStreamReason.localAudioStreamReasonRecordFailure: 4, + LocalAudioStreamReason.localAudioStreamReasonEncodeFailure: 5, + LocalAudioStreamReason.localAudioStreamReasonNoRecordingDevice: 6, + LocalAudioStreamReason.localAudioStreamReasonNoPlayoutDevice: 7, + LocalAudioStreamReason.localAudioStreamReasonInterrupted: 8, + LocalAudioStreamReason.localAudioStreamReasonRecordInvalidId: 9, + LocalAudioStreamReason.localAudioStreamReasonPlayoutInvalidId: 10, }; const _$LocalVideoStreamStateEnumMap = { @@ -2393,33 +2453,34 @@ const _$LocalVideoStreamStateEnumMap = { LocalVideoStreamState.localVideoStreamStateFailed: 3, }; -const _$LocalVideoStreamErrorEnumMap = { - LocalVideoStreamError.localVideoStreamErrorOk: 0, - LocalVideoStreamError.localVideoStreamErrorFailure: 1, - LocalVideoStreamError.localVideoStreamErrorDeviceNoPermission: 2, - LocalVideoStreamError.localVideoStreamErrorDeviceBusy: 3, - LocalVideoStreamError.localVideoStreamErrorCaptureFailure: 4, - LocalVideoStreamError.localVideoStreamErrorEncodeFailure: 5, - LocalVideoStreamError.localVideoStreamErrorCaptureInbackground: 6, - LocalVideoStreamError.localVideoStreamErrorCaptureMultipleForegroundApps: 7, - LocalVideoStreamError.localVideoStreamErrorDeviceNotFound: 8, - LocalVideoStreamError.localVideoStreamErrorDeviceDisconnected: 9, - LocalVideoStreamError.localVideoStreamErrorDeviceInvalidId: 10, - LocalVideoStreamError.localVideoStreamErrorDeviceSystemPressure: 101, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowMinimized: 11, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowClosed: 12, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowOccluded: 13, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowNotSupported: +const _$LocalVideoStreamReasonEnumMap = { + LocalVideoStreamReason.localVideoStreamReasonOk: 0, + LocalVideoStreamReason.localVideoStreamReasonFailure: 1, + LocalVideoStreamReason.localVideoStreamReasonDeviceNoPermission: 2, + LocalVideoStreamReason.localVideoStreamReasonDeviceBusy: 3, + LocalVideoStreamReason.localVideoStreamReasonCaptureFailure: 4, + LocalVideoStreamReason.localVideoStreamReasonCodecNotSupport: 5, + LocalVideoStreamReason.localVideoStreamReasonCaptureInbackground: 6, + LocalVideoStreamReason.localVideoStreamReasonCaptureMultipleForegroundApps: 7, + LocalVideoStreamReason.localVideoStreamReasonDeviceNotFound: 8, + LocalVideoStreamReason.localVideoStreamReasonDeviceDisconnected: 9, + LocalVideoStreamReason.localVideoStreamReasonDeviceInvalidId: 10, + LocalVideoStreamReason.localVideoStreamReasonDeviceSystemPressure: 101, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowMinimized: 11, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowClosed: 12, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowOccluded: 13, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowNotSupported: 20, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureFailure: 21, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureNoPermission: 22, - LocalVideoStreamError.localVideoStreamErrorScreenCapturePaused: 23, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureResumed: 24, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowHidden: 25, - LocalVideoStreamError - .localVideoStreamErrorScreenCaptureWindowRecoverFromHidden: 26, - LocalVideoStreamError - .localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized: 27, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureFailure: 21, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureNoPermission: 22, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureAutoFallback: 24, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowHidden: 25, + LocalVideoStreamReason + .localVideoStreamReasonScreenCaptureWindowRecoverFromHidden: 26, + LocalVideoStreamReason + .localVideoStreamReasonScreenCaptureWindowRecoverFromMinimized: 27, + LocalVideoStreamReason.localVideoStreamReasonScreenCapturePaused: 28, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureResumed: 29, }; const _$RemoteAudioStateEnumMap = { @@ -2482,24 +2543,24 @@ const _$RtmpStreamPublishStateEnumMap = { RtmpStreamPublishState.rtmpStreamPublishStateDisconnecting: 5, }; -const _$RtmpStreamPublishErrorTypeEnumMap = { - RtmpStreamPublishErrorType.rtmpStreamPublishErrorOk: 0, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidArgument: 1, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorEncryptedStreamNotAllowed: 2, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorConnectionTimeout: 3, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInternalServerError: 4, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorRtmpServerError: 5, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorTooOften: 6, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorReachLimit: 7, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotAuthorized: 8, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorStreamNotFound: 9, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorFormatNotSupported: 10, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotBroadcaster: 11, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorTranscodingNoMixStream: 13, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNetDown: 14, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidAppid: 15, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidPrivilege: 16, - RtmpStreamPublishErrorType.rtmpStreamUnpublishErrorOk: 100, +const _$RtmpStreamPublishReasonEnumMap = { + RtmpStreamPublishReason.rtmpStreamPublishReasonOk: 0, + RtmpStreamPublishReason.rtmpStreamPublishReasonInvalidArgument: 1, + RtmpStreamPublishReason.rtmpStreamPublishReasonEncryptedStreamNotAllowed: 2, + RtmpStreamPublishReason.rtmpStreamPublishReasonConnectionTimeout: 3, + RtmpStreamPublishReason.rtmpStreamPublishReasonInternalServerError: 4, + RtmpStreamPublishReason.rtmpStreamPublishReasonRtmpServerError: 5, + RtmpStreamPublishReason.rtmpStreamPublishReasonTooOften: 6, + RtmpStreamPublishReason.rtmpStreamPublishReasonReachLimit: 7, + RtmpStreamPublishReason.rtmpStreamPublishReasonNotAuthorized: 8, + RtmpStreamPublishReason.rtmpStreamPublishReasonStreamNotFound: 9, + RtmpStreamPublishReason.rtmpStreamPublishReasonFormatNotSupported: 10, + RtmpStreamPublishReason.rtmpStreamPublishReasonNotBroadcaster: 11, + RtmpStreamPublishReason.rtmpStreamPublishReasonTranscodingNoMixStream: 13, + RtmpStreamPublishReason.rtmpStreamPublishReasonNetDown: 14, + RtmpStreamPublishReason.rtmpStreamPublishReasonInvalidAppid: 15, + RtmpStreamPublishReason.rtmpStreamPublishReasonInvalidPrivilege: 16, + RtmpStreamPublishReason.rtmpStreamUnpublishReasonOk: 100, }; const _$RtmpStreamingEventEnumMap = { @@ -2550,6 +2611,8 @@ const _$ConnectionChangedReasonTypeEnumMap = { ConnectionChangedReasonType.connectionChangedTooManyBroadcasters: 20, ConnectionChangedReasonType.connectionChangedLicenseValidationFailure: 21, ConnectionChangedReasonType.connectionChangedCertificationVeryfyFailure: 22, + ConnectionChangedReasonType.connectionChangedStreamChannelNotAvailable: 23, + ConnectionChangedReasonType.connectionChangedInconsistentAppid: 24, }; const _$ClientRoleChangeFailedReasonEnumMap = { @@ -2688,25 +2751,6 @@ const _$ChannelMediaRelayErrorEnumMap = { ChannelMediaRelayError.relayErrorDestTokenExpired: 11, }; -const _$ChannelMediaRelayEventEnumMap = { - ChannelMediaRelayEvent.relayEventNetworkDisconnected: 0, - ChannelMediaRelayEvent.relayEventNetworkConnected: 1, - ChannelMediaRelayEvent.relayEventPacketJoinedSrcChannel: 2, - ChannelMediaRelayEvent.relayEventPacketJoinedDestChannel: 3, - ChannelMediaRelayEvent.relayEventPacketSentToDestChannel: 4, - ChannelMediaRelayEvent.relayEventPacketReceivedVideoFromSrc: 5, - ChannelMediaRelayEvent.relayEventPacketReceivedAudioFromSrc: 6, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannel: 7, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelRefused: 8, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelNotChange: 9, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelIsNull: 10, - ChannelMediaRelayEvent.relayEventVideoProfileUpdate: 11, - ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelSuccess: 12, - ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelFailed: 13, - ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelSuccess: 14, - ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelFailed: 15, -}; - const _$ChannelMediaRelayStateEnumMap = { ChannelMediaRelayState.relayStateIdle: 0, ChannelMediaRelayState.relayStateConnecting: 1, @@ -2732,10 +2776,6 @@ const _$PermissionTypeEnumMap = { PermissionType.screenCapture: 2, }; -const _$MaxUserAccountLengthTypeEnumMap = { - MaxUserAccountLengthType.maxUserAccountLength: 256, -}; - const _$StreamSubscribeStateEnumMap = { StreamSubscribeState.subStateIdle: 0, StreamSubscribeState.subStateNoSubscribed: 1, diff --git a/lib/src/agora_h265_transcoder.dart b/lib/src/agora_h265_transcoder.dart new file mode 100644 index 000000000..462d1dfa9 --- /dev/null +++ b/lib/src/agora_h265_transcoder.dart @@ -0,0 +1,108 @@ +import 'package:agora_rtc_engine/src/binding_forward_export.dart'; +part 'agora_h265_transcoder.g.dart'; + +/// @nodoc +@JsonEnum(alwaysCreate: true) +enum H265TranscodeResult { + /// @nodoc + @JsonValue(-1) + h265TranscodeResultUnknown, + + /// @nodoc + @JsonValue(0) + h265TranscodeResultSuccess, + + /// @nodoc + @JsonValue(1) + h265TranscodeResultRequestInvalid, + + /// @nodoc + @JsonValue(2) + h265TranscodeResultUnauthorized, + + /// @nodoc + @JsonValue(3) + h265TranscodeResultTokenExpired, + + /// @nodoc + @JsonValue(4) + h265TranscodeResultForbidden, + + /// @nodoc + @JsonValue(5) + h265TranscodeResultNotFound, + + /// @nodoc + @JsonValue(6) + h265TranscodeResultConflicted, + + /// @nodoc + @JsonValue(7) + h265TranscodeResultNotSupported, + + /// @nodoc + @JsonValue(8) + h265TranscodeResultTooOften, + + /// @nodoc + @JsonValue(9) + h265TranscodeResultServerInternalError, + + /// @nodoc + @JsonValue(10) + h265TranscodeResultServiceUnavailable, +} + +/// @nodoc +extension H265TranscodeResultExt on H265TranscodeResult { + /// @nodoc + static H265TranscodeResult fromValue(int value) { + return $enumDecode(_$H265TranscodeResultEnumMap, value); + } + + /// @nodoc + int value() { + return _$H265TranscodeResultEnumMap[this]!; + } +} + +/// @nodoc +class H265TranscoderObserver { + /// @nodoc + const H265TranscoderObserver({ + this.onEnableTranscode, + this.onQueryChannel, + this.onTriggerTranscode, + }); + + /// @nodoc + final void Function(H265TranscodeResult result)? onEnableTranscode; + + /// @nodoc + final void Function(H265TranscodeResult result, String originChannel, + String transcodeChannel)? onQueryChannel; + + /// @nodoc + final void Function(H265TranscodeResult result)? onTriggerTranscode; +} + +/// @nodoc +abstract class H265Transcoder { + /// @nodoc + Future enableTranscode( + {required String token, required String channel, required int uid}); + + /// @nodoc + Future queryChannel( + {required String token, required String channel, required int uid}); + + /// @nodoc + Future triggerTranscode( + {required String token, required String channel, required int uid}); + + /// @nodoc + void registerTranscoderObserver(H265TranscoderObserver observer); + + /// @nodoc + void unregisterTranscoderObserver(H265TranscoderObserver observer); +} diff --git a/lib/src/agora_h265_transcoder.g.dart b/lib/src/agora_h265_transcoder.g.dart new file mode 100644 index 000000000..afbfc2d9e --- /dev/null +++ b/lib/src/agora_h265_transcoder.g.dart @@ -0,0 +1,24 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ignore_for_file: non_constant_identifier_names, deprecated_member_use_from_same_package, unused_element + +part of 'agora_h265_transcoder.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +const _$H265TranscodeResultEnumMap = { + H265TranscodeResult.h265TranscodeResultUnknown: -1, + H265TranscodeResult.h265TranscodeResultSuccess: 0, + H265TranscodeResult.h265TranscodeResultRequestInvalid: 1, + H265TranscodeResult.h265TranscodeResultUnauthorized: 2, + H265TranscodeResult.h265TranscodeResultTokenExpired: 3, + H265TranscodeResult.h265TranscodeResultForbidden: 4, + H265TranscodeResult.h265TranscodeResultNotFound: 5, + H265TranscodeResult.h265TranscodeResultConflicted: 6, + H265TranscodeResult.h265TranscodeResultNotSupported: 7, + H265TranscodeResult.h265TranscodeResultTooOften: 8, + H265TranscodeResult.h265TranscodeResultServerInternalError: 9, + H265TranscodeResult.h265TranscodeResultServiceUnavailable: 10, +}; diff --git a/lib/src/agora_log.dart b/lib/src/agora_log.dart index 25abbbb82..3d04c3c87 100644 --- a/lib/src/agora_log.dart +++ b/lib/src/agora_log.dart @@ -94,7 +94,7 @@ const maxLogSize = 20 * 1024 * 1024; const minLogSize = 128 * 1024; /// @nodoc -const defaultLogSizeInKb = 1024; +const defaultLogSizeInKb = 2048; /// Configuration of Agora SDK log files. @JsonSerializable(explicitToJson: true, includeIfNull: false) @@ -106,7 +106,7 @@ class LogConfig { @JsonKey(name: 'filePath') final String? filePath; - /// The size (KB) of an agorasdk.log file. The value range is [128, 20480]. The default value is 1,024 KB. If you set fileSizeInKByte smaller than 128 KB, the SDK automatically adjusts it to 128 KB; if you set fileSizeInKByte greater than 20,480 KB, the SDK automatically adjusts it to 20,480 KB. + /// The size (KB) of an agorasdk.log file. The value range is [128,20480]. The default value is 2,048 KB. If you set fileSizeInKByte smaller than 128 KB, the SDK automatically adjusts it to 128 KB; if you set fileSizeInKByte greater than 20,480 KB, the SDK automatically adjusts it to 20,480 KB. @JsonKey(name: 'fileSizeInKB') final int? fileSizeInKB; diff --git a/lib/src/agora_media_base.dart b/lib/src/agora_media_base.dart index 673dc8895..568a8eb08 100644 --- a/lib/src/agora_media_base.dart +++ b/lib/src/agora_media_base.dart @@ -126,9 +126,9 @@ enum AudioRoute { @JsonValue(4) routeLoudspeaker, - /// 5: The audio route is a bluetooth headset. + /// @nodoc @JsonValue(5) - routeHeadsetbluetooth, + routeBluetoothDeviceHfp, /// 7: The audio route is a USB peripheral device. (For macOS only) @JsonValue(6) @@ -145,6 +145,10 @@ enum AudioRoute { /// 9: The audio route is Apple AirPlay. (For macOS only) @JsonValue(9) routeAirplay, + + /// @nodoc + @JsonValue(10) + routeBluetoothDeviceA2dp, } /// @nodoc @@ -247,7 +251,7 @@ enum MediaSourceType { @JsonValue(2) primaryCameraSource, - /// 3: The secondary camera. + /// 3: A secondary camera. @JsonValue(3) secondaryCameraSource, @@ -259,7 +263,7 @@ enum MediaSourceType { @JsonValue(5) secondaryScreenSource, - /// @nodoc + /// 6. Custom video source. @JsonValue(6) customVideoSource, @@ -671,6 +675,33 @@ extension CameraVideoSourceTypeExt on CameraVideoSourceType { } } +/// @nodoc +abstract class VideoFrameMetaInfo { + /// @nodoc + Future getMetaInfoStr(MetaInfoKey key); +} + +/// @nodoc +@JsonEnum(alwaysCreate: true) +enum MetaInfoKey { + /// @nodoc + @JsonValue(0) + keyFaceCapture, +} + +/// @nodoc +extension MetaInfoKeyExt on MetaInfoKey { + /// @nodoc + static MetaInfoKey fromValue(int value) { + return $enumDecode(_$MetaInfoKeyEnumMap, value); + } + + /// @nodoc + int value() { + return _$MetaInfoKeyEnumMap[this]!; + } +} + /// The external video frame. @JsonSerializable(explicitToJson: true, includeIfNull: false) class ExternalVideoFrame { @@ -853,7 +884,8 @@ class VideoFrame { this.textureId, this.matrix, this.alphaBuffer, - this.pixelBuffer}); + this.pixelBuffer, + this.metaInfo}); /// The pixel format. See VideoPixelFormat. @JsonKey(name: 'type') @@ -927,6 +959,11 @@ class VideoFrame { @JsonKey(name: 'pixelBuffer', ignore: true) final Uint8List? pixelBuffer; + /// The meta information in the video frame. To use this parameter, please. + @JsonKey(name: 'metaInfo') + @VideoFrameMetaInfoConverter() + final VideoFrameMetaInfo? metaInfo; + /// @nodoc factory VideoFrame.fromJson(Map json) => _$VideoFrameFromJson(json); @@ -967,7 +1004,7 @@ extension MediaPlayerSourceTypeExt on MediaPlayerSourceType { /// The frame position of the video observer. @JsonEnum(alwaysCreate: true) enum VideoModulePosition { - /// 1: The post-capturer position, which corresponds to the video data in the onCaptureVideoFrame callback. + /// 1: The location of the locally collected video data after preprocessing corresponds to the onCaptureVideoFrame callback. The observed video here has the effect of video pre-processing, which can be verified by enabling image enhancement, virtual background, or watermark. @JsonValue(1 << 0) positionPostCapturer, @@ -975,9 +1012,15 @@ enum VideoModulePosition { @JsonValue(1 << 1) positionPreRenderer, - /// 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback. + /// 4: The pre-encoder position, which corresponds to the video data in the onPreEncodeVideoFrame callback. The observed video here has the effects of video pre-processing and encoding pre-processing. + /// To verify the pre-processing effects of the video, you can enable image enhancement, virtual background, or watermark. + /// To verify the pre-encoding processing effect, you can set a lower frame rate (for example, 5 fps). @JsonValue(1 << 2) positionPreEncoder, + + /// 8: The position after local video capture and before pre-processing. The observed video here does not have pre-processing effects, which can be verified by enabling image enhancement, virtual background, or watermarks. + @JsonValue(1 << 3) + positionPostCapturerOrigin, } /// @nodoc @@ -1093,7 +1136,8 @@ class AudioFrame { this.buffer, this.renderTimeMs, this.avsyncType, - this.presentationMs}); + this.presentationMs, + this.audioTrackNumber}); /// The type of the audio frame. See AudioFrameType. @JsonKey(name: 'type') @@ -1133,6 +1177,10 @@ class AudioFrame { @JsonKey(name: 'presentationMs') final int? presentationMs; + /// @nodoc + @JsonKey(name: 'audioTrackNumber') + final int? audioTrackNumber; + /// @nodoc factory AudioFrame.fromJson(Map json) => _$AudioFrameFromJson(json); @@ -1519,7 +1567,7 @@ extension MediaRecorderStreamTypeExt on MediaRecorderStreamType { /// The current recording state. @JsonEnum(alwaysCreate: true) enum RecorderState { - /// -1: An error occurs during the recording. See RecorderErrorCode for the reason. + /// -1: An error occurs during the recording. See RecorderReasonCode for the reason. @JsonValue(-1) recorderStateError, @@ -1547,38 +1595,38 @@ extension RecorderStateExt on RecorderState { /// The reason for the state change. @JsonEnum(alwaysCreate: true) -enum RecorderErrorCode { +enum RecorderReasonCode { /// 0: No error. @JsonValue(0) - recorderErrorNone, + recorderReasonNone, /// 1: The SDK fails to write the recorded data to a file. @JsonValue(1) - recorderErrorWriteFailed, + recorderReasonWriteFailed, /// 2: The SDK does not detect any audio and video streams, or audio and video streams are interrupted for more than five seconds during recording. @JsonValue(2) - recorderErrorNoStream, + recorderReasonNoStream, /// 3: The recording duration exceeds the upper limit. @JsonValue(3) - recorderErrorOverMaxDuration, + recorderReasonOverMaxDuration, /// 4: The recording configuration changes. @JsonValue(4) - recorderErrorConfigChanged, + recorderReasonConfigChanged, } /// @nodoc -extension RecorderErrorCodeExt on RecorderErrorCode { +extension RecorderReasonCodeExt on RecorderReasonCode { /// @nodoc - static RecorderErrorCode fromValue(int value) { - return $enumDecode(_$RecorderErrorCodeEnumMap, value); + static RecorderReasonCode fromValue(int value) { + return $enumDecode(_$RecorderReasonCodeEnumMap, value); } /// @nodoc int value() { - return _$RecorderErrorCodeEnumMap[this]!; + return _$RecorderReasonCodeEnumMap[this]!; } } @@ -1657,7 +1705,7 @@ class MediaRecorderObserver { /// @nodoc final void Function(String channelId, int uid, RecorderState state, - RecorderErrorCode error)? onRecorderStateChanged; + RecorderReasonCode reason)? onRecorderStateChanged; /// @nodoc final void Function(String channelId, int uid, RecorderInfo info)? diff --git a/lib/src/agora_media_base.g.dart b/lib/src/agora_media_base.g.dart index 55cc04bc1..30aea693e 100644 --- a/lib/src/agora_media_base.g.dart +++ b/lib/src/agora_media_base.g.dart @@ -253,6 +253,7 @@ VideoFrame _$VideoFrameFromJson(Map json) => VideoFrame( matrix: (json['matrix'] as List?) ?.map((e) => (e as num).toDouble()) .toList(), + metaInfo: const VideoFrameMetaInfoConverter().fromJson(json['metaInfo']), ); Map _$VideoFrameToJson(VideoFrame instance) { @@ -276,6 +277,8 @@ Map _$VideoFrameToJson(VideoFrame instance) { writeNotNull('metadata_size', instance.metadataSize); writeNotNull('textureId', instance.textureId); writeNotNull('matrix', instance.matrix); + writeNotNull('metaInfo', + const VideoFrameMetaInfoConverter().toJson(instance.metaInfo)); return val; } @@ -289,6 +292,7 @@ AudioFrame _$AudioFrameFromJson(Map json) => AudioFrame( renderTimeMs: json['renderTimeMs'] as int?, avsyncType: json['avsync_type'] as int?, presentationMs: json['presentationMs'] as int?, + audioTrackNumber: json['audioTrackNumber'] as int?, ); Map _$AudioFrameToJson(AudioFrame instance) { @@ -309,6 +313,7 @@ Map _$AudioFrameToJson(AudioFrame instance) { writeNotNull('renderTimeMs', instance.renderTimeMs); writeNotNull('avsync_type', instance.avsyncType); writeNotNull('presentationMs', instance.presentationMs); + writeNotNull('audioTrackNumber', instance.audioTrackNumber); return val; } @@ -483,11 +488,12 @@ const _$AudioRouteEnumMap = { AudioRoute.routeHeadsetnomic: 2, AudioRoute.routeSpeakerphone: 3, AudioRoute.routeLoudspeaker: 4, - AudioRoute.routeHeadsetbluetooth: 5, + AudioRoute.routeBluetoothDeviceHfp: 5, AudioRoute.routeUsb: 6, AudioRoute.routeHdmi: 7, AudioRoute.routeDisplayport: 8, AudioRoute.routeAirplay: 9, + AudioRoute.routeBluetoothDeviceA2dp: 10, }; const _$MediaSourceTypeEnumMap = { @@ -532,6 +538,10 @@ const _$CameraVideoSourceTypeEnumMap = { CameraVideoSourceType.videoSourceUnspecified: 2, }; +const _$MetaInfoKeyEnumMap = { + MetaInfoKey.keyFaceCapture: 0, +}; + const _$MediaPlayerSourceTypeEnumMap = { MediaPlayerSourceType.mediaPlayerSourceDefault: 0, MediaPlayerSourceType.mediaPlayerSourceFullFeatured: 1, @@ -542,6 +552,7 @@ const _$VideoModulePositionEnumMap = { VideoModulePosition.positionPostCapturer: 1, VideoModulePosition.positionPreRenderer: 2, VideoModulePosition.positionPreEncoder: 4, + VideoModulePosition.positionPostCapturerOrigin: 8, }; const _$AudioFramePositionEnumMap = { @@ -569,10 +580,10 @@ const _$RecorderStateEnumMap = { RecorderState.recorderStateStop: 3, }; -const _$RecorderErrorCodeEnumMap = { - RecorderErrorCode.recorderErrorNone: 0, - RecorderErrorCode.recorderErrorWriteFailed: 1, - RecorderErrorCode.recorderErrorNoStream: 2, - RecorderErrorCode.recorderErrorOverMaxDuration: 3, - RecorderErrorCode.recorderErrorConfigChanged: 4, +const _$RecorderReasonCodeEnumMap = { + RecorderReasonCode.recorderReasonNone: 0, + RecorderReasonCode.recorderReasonWriteFailed: 1, + RecorderReasonCode.recorderReasonNoStream: 2, + RecorderReasonCode.recorderReasonOverMaxDuration: 3, + RecorderReasonCode.recorderReasonConfigChanged: 4, }; diff --git a/lib/src/agora_media_engine.dart b/lib/src/agora_media_engine.dart index 441e6a908..48ad9b6c6 100644 --- a/lib/src/agora_media_engine.dart +++ b/lib/src/agora_media_engine.dart @@ -150,10 +150,10 @@ abstract class MediaEngine { /// Creates a custom audio track. /// - /// To publish a custom audio source to multiple channels, see the following steps: + /// Ensure that you call this method before joining a channel. To publish a custom audio source, see the following steps: /// Call this method to create a custom audio track and get the audio track ID. - /// In ChannelMediaOptions of each channel, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true. - /// If you call pushAudioFrame, and specify trackId as the audio track ID set in step 2, you can publish the corresponding custom audio source in multiple channels. + /// Call joinChannel to join the channel. In ChannelMediaOptions, set publishCustomAduioTrackId to the audio track ID that you want to publish, and set publishCustomAudioTrack to true. + /// Call pushAudioFrame and specify trackId as the audio track ID set in step 2. You can then publish the corresponding custom audio source in the channel. /// /// * [trackType] The type of the custom audio track. See AudioTrackType. If audioTrackDirect is specified for this parameter, you must set publishMicrophoneTrack to false in ChannelMediaOptions when calling joinChannel to join the channel; otherwise, joining the channel fails and returns the error code -2. /// * [config] The configuration of the custom audio track. See AudioTrackConfig. @@ -170,7 +170,6 @@ abstract class MediaEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future destroyCustomAudioTrack(int trackId); /// Sets the external audio sink. @@ -185,7 +184,6 @@ abstract class MediaEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setExternalAudioSink( {required bool enabled, required int sampleRate, required int channels}); @@ -193,9 +191,14 @@ abstract class MediaEngine { Future enableCustomAudioLocalPlayback( {required int trackId, required bool enabled}); - /// Pushes the external raw video frame to the SDK. + /// Pushes the external raw video frame to the SDK through video tracks. /// - /// If you call createCustomVideoTrack method to get the video track ID, set the customVideoTrackId parameter to the video track ID you want to publish in the ChannelMediaOptions of each channel, and set the publishCustomVideoTrack parameter to true, you can call this method to push the unencoded external video frame to the SDK. + /// To publish a custom video source, see the following steps: + /// Call createCustomVideoTrack to create a video track and get the video track ID. + /// Call joinChannel to join the channel. In ChannelMediaOptions, set customVideoTrackId to the video track ID that you want to publish, and set publishCustomVideoTrack to true. + /// Call this method and specify videoTrackId as the video track ID set in step 2. You can then publish the corresponding custom video source in the channel. After calling this method, even if you stop pushing external video frames to the SDK, the custom video stream will still be counted as the video duration usage and incur charges. Agora recommends that you take appropriate measures based on the actual situation to avoid such video billing. + /// If you no longer need to capture external video data, you can call destroyCustomVideoTrack to destroy the custom video track. + /// If you only want to use the external video data for local preview and not publish it in the channel, you can call muteLocalVideoStream to cancel sending video stream or call updateChannelMediaOptions to set publishCustomVideoTrack to false. /// /// * [frame] The external raw video frame to be pushed. See ExternalVideoFrame. /// * [videoTrackId] The video track ID returned by calling the createCustomVideoTrack method. The default value is 0. @@ -221,7 +224,6 @@ abstract class MediaEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioFrameObserver(AudioFrameObserver observer); /// Unregisters the video frame observer. diff --git a/lib/src/agora_media_player.dart b/lib/src/agora_media_player.dart index c20e8f6b5..05e4a3673 100644 --- a/lib/src/agora_media_player.dart +++ b/lib/src/agora_media_player.dart @@ -18,7 +18,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future open({required String url, required int startPos}); /// Opens a media file and configures the playback scenarios. @@ -38,28 +37,24 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future play(); /// Pauses the playback. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pause(); /// Stops playing the media track. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stop(); /// Resumes playing the media file. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resume(); /// Seeks to a new playback position. @@ -72,7 +67,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future seek(int newPos); /// Sets the pitch of the current media resource. @@ -83,7 +77,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioPitch(int pitch); /// Gets the duration of the media resource. @@ -96,7 +89,7 @@ abstract class MediaPlayer { /// /// Returns /// Returns the current playback progress (ms) if the call succeeds. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getPlayPosition(); /// Gets the number of the media streams in the media resource. @@ -105,7 +98,7 @@ abstract class MediaPlayer { /// /// Returns /// The number of the media streams in the media resource if the method call succeeds. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getStreamCount(); /// Gets the detailed information of the media stream. @@ -127,7 +120,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLoopCount(int loopCount); /// Sets the channel mode of the current audio file. @@ -141,7 +133,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackSpeed(int speed); /// Selects the audio track used during playback. @@ -152,13 +143,32 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future selectAudioTrack(int index); /// @nodoc + Future selectMultiAudioTrack( + {required int playoutTrackIndex, required int publishTrackIndex}); + + /// Set media player options for providing technical previews or special customization features. + /// + /// The media player supports setting options through key and value. In general, you don't need to know about the option settings. You can use the default option settings of the media player. The difference between this method and setPlayerOptionInString is that the value parameter of this method is of type Int, while the value of setPlayerOptionInString is of type String. These two methods cannot be used together. Ensure that you call this method before open or openWithMediaSource. + /// + /// * [key] The key of the option. + /// * [value] The value of the key. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setPlayerOptionInInt({required String key, required int value}); - /// @nodoc + /// Set media player options for providing technical previews or special customization features. + /// + /// Ensure that you call this method before open or openWithMediaSource. The media player supports setting options through key and value. In general, you don't need to know about the option settings. You can use the default option settings of the media player. The difference between this method and setPlayerOptionInInt is that the value parameter of this method is of type String, while the value of setPlayerOptionInInt is of type String. These two methods cannot be used together. + /// + /// * [key] The key of the option. + /// * [value] The value of the key. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setPlayerOptionInString( {required String key, required String value}); @@ -183,7 +193,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future mute(bool muted); /// Reports whether the media resource is muted. @@ -234,7 +243,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setView(int view); /// Sets the render mode of the media player. @@ -243,7 +251,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRenderMode(RenderModeType renderMode); /// Registers a media player observer. @@ -252,7 +259,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void registerPlayerSourceObserver(MediaPlayerSourceObserver observer); /// Releases a media player observer. @@ -261,7 +267,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterPlayerSourceObserver(MediaPlayerSourceObserver observer); /// Registers an audio frame observer object. @@ -282,7 +287,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioFrameObserver(AudioPcmFrameSink observer); /// Registers a video frame observer object. @@ -293,7 +297,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void registerVideoFrameObserver(MediaPlayerVideoFrameObserver observer); /// Unregisters the video frame observer. @@ -302,7 +305,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterVideoFrameObserver(MediaPlayerVideoFrameObserver observer); /// @nodoc @@ -323,7 +325,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioDualMonoMode(AudioDualMonoMode mode); /// @nodoc @@ -373,7 +374,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future switchSrc({required String src, bool syncPts = true}); /// Preloads a media resource. @@ -385,7 +385,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future preloadSrc({required String src, required int startPos}); /// Plays preloaded media resources. @@ -396,7 +395,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future playPreloadedSrc(String src); /// Unloads media resources that are preloaded. @@ -407,7 +405,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future unloadSrc(String src); /// Enables or disables the spatial audio effect for the media player. @@ -418,7 +415,6 @@ abstract class MediaPlayer { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSpatialAudioParams(SpatialAudioParams params); /// @nodoc @@ -434,7 +430,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future removeAllCaches(); /// Deletes a cached media file that is the least recently used. @@ -443,7 +439,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future removeOldCache(); /// Deletes a cached media file. @@ -454,7 +450,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future removeCacheByUri(String uri); /// Sets the storage path for the media files that you want to cache. @@ -465,7 +461,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future setCacheDir(String path); /// Sets the maximum number of media files that can be cached. @@ -474,7 +470,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future setMaxCacheFileCount(int count); /// Sets the maximum size of the aggregate storage space for cached media files. @@ -483,7 +479,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future setMaxCacheFileSize(int cacheSize); /// Sets whether to delete cached media files automatically. @@ -494,7 +490,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future enableAutoRemoveCache(bool enable); /// Gets the storage path of the cached media files. @@ -505,7 +501,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// The call succeeds, and the SDK returns the storage path of the cached media files. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getCacheDir(int length); /// Gets the maximum number of media files that can be cached. @@ -514,7 +510,7 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// > 0: The call succeeds and returns the maximum number of media files that can be cached. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getMaxCacheFileCount(); /// Gets the maximum size of the aggregate storage space for cached media files. @@ -523,14 +519,14 @@ abstract class MediaPlayerCacheManager { /// /// Returns /// > 0: The call succeeds and returns the maximum size (in bytes) of the aggregate storage space for cached media files. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getMaxCacheFileSize(); /// Gets the number of media files that are cached. /// /// Returns /// ≥ 0: The call succeeds and returns the number of media files that are cached. - /// < 0: Failure. See MediaPlayerError. + /// < 0: Failure. See MediaPlayerReason. Future getCacheFileCount(); } diff --git a/lib/src/agora_media_player_source.dart b/lib/src/agora_media_player_source.dart index c55853102..3042da599 100644 --- a/lib/src/agora_media_player_source.dart +++ b/lib/src/agora_media_player_source.dart @@ -14,6 +14,8 @@ class MediaPlayerSourceObserver { this.onAgoraCDNTokenWillExpire, this.onPlayerSrcInfoChanged, this.onPlayerInfoUpdated, + this.onPlayerCacheStats, + this.onPlayerPlaybackStats, this.onAudioVolumeIndication, }); @@ -22,16 +24,17 @@ class MediaPlayerSourceObserver { /// When the state of the media player changes, the SDK triggers this callback to report the current playback state. /// /// * [state] The playback state. See MediaPlayerState. - /// * [ec] The error code. See MediaPlayerError. - final void Function(MediaPlayerState state, MediaPlayerError ec)? + /// * [reason] The reason for the changes in the media player status. See MediaPlayerReason. + final void Function(MediaPlayerState state, MediaPlayerReason reason)? onPlayerSourceStateChanged; - /// Reports current playback progress. + /// Reports the playback progress of the media file. /// /// When playing media files, the SDK triggers this callback every two second to report current playback progress. /// - /// * [position] The playback position (ms) of media files. - final void Function(int positionMs)? onPositionChanged; + /// * [positionMs] The playback position (ms) of media files. + /// * [timeStampMs] The NTP timestamp (ms) of the current playback progress. + final void Function(int positionMs, int timestampMs)? onPositionChanged; /// Reports the player events. /// @@ -86,6 +89,20 @@ class MediaPlayerSourceObserver { /// * [info] Information related to the media player. See PlayerUpdatedInfo. final void Function(PlayerUpdatedInfo info)? onPlayerInfoUpdated; + /// Reports the statistics of the media file being cached. + /// + /// After you call the openWithMediaSource method and set enableCache as true, the SDK triggers this callback once per second to report the statistics of the media file being cached. + /// + /// * [stats] The statistics of the media file being cached. See CacheStatistics. + final void Function(CacheStatistics stats)? onPlayerCacheStats; + + /// The statistics of the media file being played. + /// + /// The SDK triggers this callback once per second to report the statistics of the media file being played. + /// + /// * [stats] The statistics of the media file. See PlayerPlaybackStats. + final void Function(PlayerPlaybackStats stats)? onPlayerPlaybackStats; + /// Reports the volume of the media player. /// /// The SDK triggers this callback every 200 milliseconds to report the current volume of the media player. diff --git a/lib/src/agora_media_player_types.dart b/lib/src/agora_media_player_types.dart index 4bbf71a9e..7c74ce72b 100644 --- a/lib/src/agora_media_player_types.dart +++ b/lib/src/agora_media_player_types.dart @@ -85,92 +85,92 @@ extension MediaPlayerStateExt on MediaPlayerState { } } -/// Error codes of the media player. +/// Reasons for the changes in the media player status. @JsonEnum(alwaysCreate: true) -enum MediaPlayerError { +enum MediaPlayerReason { /// 0: No error. @JsonValue(0) - playerErrorNone, + playerReasonNone, /// -1: Invalid arguments. @JsonValue(-1) - playerErrorInvalidArguments, + playerReasonInvalidArguments, /// -2: Internal error. @JsonValue(-2) - playerErrorInternal, + playerReasonInternal, /// -3: No resource. @JsonValue(-3) - playerErrorNoResource, + playerReasonNoResource, /// -4: Invalid media resource. @JsonValue(-4) - playerErrorInvalidMediaSource, + playerReasonInvalidMediaSource, /// -5: The media stream type is unknown. @JsonValue(-5) - playerErrorUnknownStreamType, + playerReasonUnknownStreamType, /// -6: The object is not initialized. @JsonValue(-6) - playerErrorObjNotInitialized, + playerReasonObjNotInitialized, /// -7: The codec is not supported. @JsonValue(-7) - playerErrorCodecNotSupported, + playerReasonCodecNotSupported, /// -8: Invalid renderer. @JsonValue(-8) - playerErrorVideoRenderFailed, + playerReasonVideoRenderFailed, /// -9: An error with the internal state of the player occurs. @JsonValue(-9) - playerErrorInvalidState, + playerReasonInvalidState, /// -10: The URL of the media resource cannot be found. @JsonValue(-10) - playerErrorUrlNotFound, + playerReasonUrlNotFound, /// -11: Invalid connection between the player and the Agora Server. @JsonValue(-11) - playerErrorInvalidConnectionState, + playerReasonInvalidConnectionState, /// -12: The playback buffer is insufficient. @JsonValue(-12) - playerErrorSrcBufferUnderflow, + playerReasonSrcBufferUnderflow, /// -13: The playback is interrupted. @JsonValue(-13) - playerErrorInterrupted, + playerReasonInterrupted, /// -14: The SDK does not support the method being called. @JsonValue(-14) - playerErrorNotSupported, + playerReasonNotSupported, /// -15: The authentication information of the media resource is expired. @JsonValue(-15) - playerErrorTokenExpired, + playerReasonTokenExpired, /// @nodoc @JsonValue(-16) - playerErrorIpExpired, + playerReasonIpExpired, /// -17: An unknown error. @JsonValue(-17) - playerErrorUnknown, + playerReasonUnknown, } /// @nodoc -extension MediaPlayerErrorExt on MediaPlayerError { +extension MediaPlayerReasonExt on MediaPlayerReason { /// @nodoc - static MediaPlayerError fromValue(int value) { - return $enumDecode(_$MediaPlayerErrorEnumMap, value); + static MediaPlayerReason fromValue(int value) { + return $enumDecode(_$MediaPlayerReasonEnumMap, value); } /// @nodoc int value() { - return _$MediaPlayerErrorEnumMap[this]!; + return _$MediaPlayerReasonEnumMap[this]!; } } @@ -473,23 +473,80 @@ class CacheStatistics { Map toJson() => _$CacheStatisticsToJson(this); } +/// The information of the media file being played. +@JsonSerializable(explicitToJson: true, includeIfNull: false) +class PlayerPlaybackStats { + /// @nodoc + const PlayerPlaybackStats( + {this.videoFps, + this.videoBitrateInKbps, + this.audioBitrateInKbps, + this.totalBitrateInKbps}); + + /// The frame rate (fps) of the video. + @JsonKey(name: 'videoFps') + final int? videoFps; + + /// The bitrate (kbps) of the video. + @JsonKey(name: 'videoBitrateInKbps') + final int? videoBitrateInKbps; + + /// The bitrate (kbps) of the audio. + @JsonKey(name: 'audioBitrateInKbps') + final int? audioBitrateInKbps; + + /// The total bitrate (kbps) of the media stream. + @JsonKey(name: 'totalBitrateInKbps') + final int? totalBitrateInKbps; + + /// @nodoc + factory PlayerPlaybackStats.fromJson(Map json) => + _$PlayerPlaybackStatsFromJson(json); + + /// @nodoc + Map toJson() => _$PlayerPlaybackStatsToJson(this); +} + /// Information related to the media player. @JsonSerializable(explicitToJson: true, includeIfNull: false) class PlayerUpdatedInfo { /// @nodoc - const PlayerUpdatedInfo({this.playerId, this.deviceId, this.cacheStatistics}); + const PlayerUpdatedInfo( + {this.internalPlayerUuid, + this.deviceId, + this.videoHeight, + this.videoWidth, + this.audioSampleRate, + this.audioChannels, + this.audioBitsPerSample}); - /// The ID of a media player. - @JsonKey(name: 'playerId') - final String? playerId; + /// @nodoc + @JsonKey(name: 'internalPlayerUuid') + final String? internalPlayerUuid; /// The ID of a deivce. @JsonKey(name: 'deviceId') final String? deviceId; - /// The statistics about the media file being cached. If you call the openWithMediaSource method and set enableCache as true, the statistics about the media file being cached is updated every second after the media file is played. See CacheStatistics. - @JsonKey(name: 'cacheStatistics') - final CacheStatistics? cacheStatistics; + /// Height (pixel) of the video. + @JsonKey(name: 'videoHeight') + final int? videoHeight; + + /// Width (pixel) of the video. + @JsonKey(name: 'videoWidth') + final int? videoWidth; + + /// Audio sample rate (Hz). + @JsonKey(name: 'audioSampleRate') + final int? audioSampleRate; + + /// The number of audio channels. + @JsonKey(name: 'audioChannels') + final int? audioChannels; + + /// The number of bits per audio sample point. + @JsonKey(name: 'audioBitsPerSample') + final int? audioBitsPerSample; /// @nodoc factory PlayerUpdatedInfo.fromJson(Map json) => @@ -509,6 +566,7 @@ class MediaSource { this.startPos, this.autoPlay, this.enableCache, + this.enableMultiAudioTrack, this.isAgoraSource, this.isLiveSource}); @@ -535,6 +593,10 @@ class MediaSource { @JsonKey(name: 'enableCache') final bool? enableCache; + /// Whether to allow the selection of different audio tracks when playing this media file: true : Allow to select different audio tracks. false : (Default) Do not allow to select different audio tracks. If you need to set different audio tracks for local playback and publishing to the channel, you need to set this parameter to true, and then call the selectMultiAudioTrack method to select the audio track. + @JsonKey(name: 'enableMultiAudioTrack') + final bool? enableMultiAudioTrack; + /// Whether the media resource to be opened is a live stream or on-demand video distributed through Media Broadcast service: true : The media resource to be played is a live or on-demand video distributed through Media Broadcast service. false : (Default) The media resource is not a live stream or on-demand video distributed through Media Broadcast service. If you need to open a live stream or on-demand video distributed through Broadcast Streaming service, pass in the URL of the media resource to url, and set isAgoraSource as true; otherwise, you don't need to set the isAgoraSource parameter. @JsonKey(name: 'isAgoraSource') final bool? isAgoraSource; diff --git a/lib/src/agora_media_player_types.g.dart b/lib/src/agora_media_player_types.g.dart index 2bbcadf92..5270c3d85 100644 --- a/lib/src/agora_media_player_types.g.dart +++ b/lib/src/agora_media_player_types.g.dart @@ -99,14 +99,39 @@ Map _$CacheStatisticsToJson(CacheStatistics instance) { return val; } +PlayerPlaybackStats _$PlayerPlaybackStatsFromJson(Map json) => + PlayerPlaybackStats( + videoFps: json['videoFps'] as int?, + videoBitrateInKbps: json['videoBitrateInKbps'] as int?, + audioBitrateInKbps: json['audioBitrateInKbps'] as int?, + totalBitrateInKbps: json['totalBitrateInKbps'] as int?, + ); + +Map _$PlayerPlaybackStatsToJson(PlayerPlaybackStats instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('videoFps', instance.videoFps); + writeNotNull('videoBitrateInKbps', instance.videoBitrateInKbps); + writeNotNull('audioBitrateInKbps', instance.audioBitrateInKbps); + writeNotNull('totalBitrateInKbps', instance.totalBitrateInKbps); + return val; +} + PlayerUpdatedInfo _$PlayerUpdatedInfoFromJson(Map json) => PlayerUpdatedInfo( - playerId: json['playerId'] as String?, + internalPlayerUuid: json['internalPlayerUuid'] as String?, deviceId: json['deviceId'] as String?, - cacheStatistics: json['cacheStatistics'] == null - ? null - : CacheStatistics.fromJson( - json['cacheStatistics'] as Map), + videoHeight: json['videoHeight'] as int?, + videoWidth: json['videoWidth'] as int?, + audioSampleRate: json['audioSampleRate'] as int?, + audioChannels: json['audioChannels'] as int?, + audioBitsPerSample: json['audioBitsPerSample'] as int?, ); Map _$PlayerUpdatedInfoToJson(PlayerUpdatedInfo instance) { @@ -118,9 +143,13 @@ Map _$PlayerUpdatedInfoToJson(PlayerUpdatedInfo instance) { } } - writeNotNull('playerId', instance.playerId); + writeNotNull('internalPlayerUuid', instance.internalPlayerUuid); writeNotNull('deviceId', instance.deviceId); - writeNotNull('cacheStatistics', instance.cacheStatistics?.toJson()); + writeNotNull('videoHeight', instance.videoHeight); + writeNotNull('videoWidth', instance.videoWidth); + writeNotNull('audioSampleRate', instance.audioSampleRate); + writeNotNull('audioChannels', instance.audioChannels); + writeNotNull('audioBitsPerSample', instance.audioBitsPerSample); return val; } @@ -130,6 +159,7 @@ MediaSource _$MediaSourceFromJson(Map json) => MediaSource( startPos: json['startPos'] as int?, autoPlay: json['autoPlay'] as bool?, enableCache: json['enableCache'] as bool?, + enableMultiAudioTrack: json['enableMultiAudioTrack'] as bool?, isAgoraSource: json['isAgoraSource'] as bool?, isLiveSource: json['isLiveSource'] as bool?, ); @@ -148,6 +178,7 @@ Map _$MediaSourceToJson(MediaSource instance) { writeNotNull('startPos', instance.startPos); writeNotNull('autoPlay', instance.autoPlay); writeNotNull('enableCache', instance.enableCache); + writeNotNull('enableMultiAudioTrack', instance.enableMultiAudioTrack); writeNotNull('isAgoraSource', instance.isAgoraSource); writeNotNull('isLiveSource', instance.isLiveSource); return val; @@ -172,25 +203,25 @@ const _$MediaPlayerStateEnumMap = { MediaPlayerState.playerStateFailed: 100, }; -const _$MediaPlayerErrorEnumMap = { - MediaPlayerError.playerErrorNone: 0, - MediaPlayerError.playerErrorInvalidArguments: -1, - MediaPlayerError.playerErrorInternal: -2, - MediaPlayerError.playerErrorNoResource: -3, - MediaPlayerError.playerErrorInvalidMediaSource: -4, - MediaPlayerError.playerErrorUnknownStreamType: -5, - MediaPlayerError.playerErrorObjNotInitialized: -6, - MediaPlayerError.playerErrorCodecNotSupported: -7, - MediaPlayerError.playerErrorVideoRenderFailed: -8, - MediaPlayerError.playerErrorInvalidState: -9, - MediaPlayerError.playerErrorUrlNotFound: -10, - MediaPlayerError.playerErrorInvalidConnectionState: -11, - MediaPlayerError.playerErrorSrcBufferUnderflow: -12, - MediaPlayerError.playerErrorInterrupted: -13, - MediaPlayerError.playerErrorNotSupported: -14, - MediaPlayerError.playerErrorTokenExpired: -15, - MediaPlayerError.playerErrorIpExpired: -16, - MediaPlayerError.playerErrorUnknown: -17, +const _$MediaPlayerReasonEnumMap = { + MediaPlayerReason.playerReasonNone: 0, + MediaPlayerReason.playerReasonInvalidArguments: -1, + MediaPlayerReason.playerReasonInternal: -2, + MediaPlayerReason.playerReasonNoResource: -3, + MediaPlayerReason.playerReasonInvalidMediaSource: -4, + MediaPlayerReason.playerReasonUnknownStreamType: -5, + MediaPlayerReason.playerReasonObjNotInitialized: -6, + MediaPlayerReason.playerReasonCodecNotSupported: -7, + MediaPlayerReason.playerReasonVideoRenderFailed: -8, + MediaPlayerReason.playerReasonInvalidState: -9, + MediaPlayerReason.playerReasonUrlNotFound: -10, + MediaPlayerReason.playerReasonInvalidConnectionState: -11, + MediaPlayerReason.playerReasonSrcBufferUnderflow: -12, + MediaPlayerReason.playerReasonInterrupted: -13, + MediaPlayerReason.playerReasonNotSupported: -14, + MediaPlayerReason.playerReasonTokenExpired: -15, + MediaPlayerReason.playerReasonIpExpired: -16, + MediaPlayerReason.playerReasonUnknown: -17, }; const _$MediaPlayerEventEnumMap = { diff --git a/lib/src/agora_music_content_center.dart b/lib/src/agora_music_content_center.dart index 1738a1d8c..522ccb303 100644 --- a/lib/src/agora_music_content_center.dart +++ b/lib/src/agora_music_content_center.dart @@ -3,83 +3,83 @@ part 'agora_music_content_center.g.dart'; /// @nodoc @JsonEnum(alwaysCreate: true) -enum PreloadStatusCode { +enum PreloadState { /// @nodoc @JsonValue(0) - kPreloadStatusCompleted, + kPreloadStateCompleted, /// @nodoc @JsonValue(1) - kPreloadStatusFailed, + kPreloadStateFailed, /// @nodoc @JsonValue(2) - kPreloadStatusPreloading, + kPreloadStatePreloading, /// @nodoc @JsonValue(3) - kPreloadStatusRemoved, + kPreloadStateRemoved, } /// @nodoc -extension PreloadStatusCodeExt on PreloadStatusCode { +extension PreloadStateExt on PreloadState { /// @nodoc - static PreloadStatusCode fromValue(int value) { - return $enumDecode(_$PreloadStatusCodeEnumMap, value); + static PreloadState fromValue(int value) { + return $enumDecode(_$PreloadStateEnumMap, value); } /// @nodoc int value() { - return _$PreloadStatusCodeEnumMap[this]!; + return _$PreloadStateEnumMap[this]!; } } /// @nodoc @JsonEnum(alwaysCreate: true) -enum MusicContentCenterStatusCode { +enum MusicContentCenterStateReason { /// @nodoc @JsonValue(0) - kMusicContentCenterStatusOk, + kMusicContentCenterReasonOk, /// @nodoc @JsonValue(1) - kMusicContentCenterStatusErr, + kMusicContentCenterReasonError, /// @nodoc @JsonValue(2) - kMusicContentCenterStatusErrGateway, + kMusicContentCenterReasonGateway, /// @nodoc @JsonValue(3) - kMusicContentCenterStatusErrPermissionAndResource, + kMusicContentCenterReasonPermissionAndResource, /// @nodoc @JsonValue(4) - kMusicContentCenterStatusErrInternalDataParse, + kMusicContentCenterReasonInternalDataParse, /// @nodoc @JsonValue(5) - kMusicContentCenterStatusErrMusicLoading, + kMusicContentCenterReasonMusicLoading, /// @nodoc @JsonValue(6) - kMusicContentCenterStatusErrMusicDecryption, + kMusicContentCenterReasonMusicDecryption, /// @nodoc @JsonValue(7) - kMusicContentCenterStatusErrHttpInternalError, + kMusicContentCenterReasonHttpInternalError, } /// @nodoc -extension MusicContentCenterStatusCodeExt on MusicContentCenterStatusCode { +extension MusicContentCenterStateReasonExt on MusicContentCenterStateReason { /// @nodoc - static MusicContentCenterStatusCode fromValue(int value) { - return $enumDecode(_$MusicContentCenterStatusCodeEnumMap, value); + static MusicContentCenterStateReason fromValue(int value) { + return $enumDecode(_$MusicContentCenterStateReasonEnumMap, value); } /// @nodoc int value() { - return _$MusicContentCenterStatusCodeEnumMap[this]!; + return _$MusicContentCenterStateReasonEnumMap[this]!; } } @@ -319,19 +319,31 @@ class MusicContentCenterEventHandler { /// @nodoc final void Function(String requestId, List result, - MusicContentCenterStatusCode errorCode)? onMusicChartsResult; + MusicContentCenterStateReason reason)? onMusicChartsResult; /// @nodoc final void Function(String requestId, MusicCollection result, - MusicContentCenterStatusCode errorCode)? onMusicCollectionResult; + MusicContentCenterStateReason reason)? onMusicCollectionResult; /// @nodoc final void Function(String requestId, int songCode, String lyricUrl, - MusicContentCenterStatusCode errorCode)? onLyricResult; - - /// @nodoc + MusicContentCenterStateReason reason)? onLyricResult; + + /// 音乐资源的详细信息回调。 + /// + /// 当你调用 getSongSimpleInfo 获取某一音乐资源的详细信息后,SDK 会触发该回调。 + /// + /// * [reason] 音乐内容中心的请求状态码,详见 MusicContentCenterStateReason 。 + /// * [requestId] The request ID. 本次请求的唯一标识。 + /// * [songCode] The code of the music, which is an unique identifier of the music. + /// * [simpleInfo] 音乐资源的相关信息,包含下列内容: + /// 副歌片段的开始和结束的时间(ms) + /// 副歌片段的歌词下载地址 + /// 副歌片段时长(ms) + /// 歌曲名称 + /// 歌手名 final void Function(String requestId, int songCode, String simpleInfo, - MusicContentCenterStatusCode errorCode)? onSongSimpleInfoResult; + MusicContentCenterStateReason reason)? onSongSimpleInfoResult; /// @nodoc final void Function( @@ -339,8 +351,8 @@ class MusicContentCenterEventHandler { int songCode, int percent, String lyricUrl, - PreloadStatusCode status, - MusicContentCenterStatusCode errorCode)? onPreLoadEvent; + PreloadState state, + MusicContentCenterStateReason reason)? onPreLoadEvent; } /// @nodoc diff --git a/lib/src/agora_music_content_center.g.dart b/lib/src/agora_music_content_center.g.dart index 14f74672c..87c8a6984 100644 --- a/lib/src/agora_music_content_center.g.dart +++ b/lib/src/agora_music_content_center.g.dart @@ -171,21 +171,21 @@ Map _$MusicContentCenterConfigurationToJson( return val; } -const _$PreloadStatusCodeEnumMap = { - PreloadStatusCode.kPreloadStatusCompleted: 0, - PreloadStatusCode.kPreloadStatusFailed: 1, - PreloadStatusCode.kPreloadStatusPreloading: 2, - PreloadStatusCode.kPreloadStatusRemoved: 3, +const _$PreloadStateEnumMap = { + PreloadState.kPreloadStateCompleted: 0, + PreloadState.kPreloadStateFailed: 1, + PreloadState.kPreloadStatePreloading: 2, + PreloadState.kPreloadStateRemoved: 3, }; -const _$MusicContentCenterStatusCodeEnumMap = { - MusicContentCenterStatusCode.kMusicContentCenterStatusOk: 0, - MusicContentCenterStatusCode.kMusicContentCenterStatusErr: 1, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrGateway: 2, - MusicContentCenterStatusCode - .kMusicContentCenterStatusErrPermissionAndResource: 3, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrInternalDataParse: 4, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicLoading: 5, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicDecryption: 6, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrHttpInternalError: 7, +const _$MusicContentCenterStateReasonEnumMap = { + MusicContentCenterStateReason.kMusicContentCenterReasonOk: 0, + MusicContentCenterStateReason.kMusicContentCenterReasonError: 1, + MusicContentCenterStateReason.kMusicContentCenterReasonGateway: 2, + MusicContentCenterStateReason.kMusicContentCenterReasonPermissionAndResource: + 3, + MusicContentCenterStateReason.kMusicContentCenterReasonInternalDataParse: 4, + MusicContentCenterStateReason.kMusicContentCenterReasonMusicLoading: 5, + MusicContentCenterStateReason.kMusicContentCenterReasonMusicDecryption: 6, + MusicContentCenterStateReason.kMusicContentCenterReasonHttpInternalError: 7, }; diff --git a/lib/src/agora_rhythm_player.dart b/lib/src/agora_rhythm_player.dart index 3eed312a5..bf6373d90 100644 --- a/lib/src/agora_rhythm_player.dart +++ b/lib/src/agora_rhythm_player.dart @@ -40,38 +40,38 @@ extension RhythmPlayerStateTypeExt on RhythmPlayerStateType { /// Virtual Metronome error message. @JsonEnum(alwaysCreate: true) -enum RhythmPlayerErrorType { +enum RhythmPlayerReason { /// (0): The beat files are played normally without errors. @JsonValue(0) - rhythmPlayerErrorOk, + rhythmPlayerReasonOk, /// 1: A general error; no specific reason. @JsonValue(1) - rhythmPlayerErrorFailed, + rhythmPlayerReasonFailed, /// 801: There is an error when opening the beat files. @JsonValue(801) - rhythmPlayerErrorCanNotOpen, + rhythmPlayerReasonCanNotOpen, /// 802: There is an error when playing the beat files. @JsonValue(802) - rhythmPlayerErrorCanNotPlay, + rhythmPlayerReasonCanNotPlay, /// (803): The duration of the beat file exceeds the limit. The maximum duration is 1.2 seconds. @JsonValue(803) - rhythmPlayerErrorFileOverDurationLimit, + rhythmPlayerReasonFileOverDurationLimit, } /// @nodoc -extension RhythmPlayerErrorTypeExt on RhythmPlayerErrorType { +extension RhythmPlayerReasonExt on RhythmPlayerReason { /// @nodoc - static RhythmPlayerErrorType fromValue(int value) { - return $enumDecode(_$RhythmPlayerErrorTypeEnumMap, value); + static RhythmPlayerReason fromValue(int value) { + return $enumDecode(_$RhythmPlayerReasonEnumMap, value); } /// @nodoc int value() { - return _$RhythmPlayerErrorTypeEnumMap[this]!; + return _$RhythmPlayerReasonEnumMap[this]!; } } diff --git a/lib/src/agora_rhythm_player.g.dart b/lib/src/agora_rhythm_player.g.dart index fa5bf3a9b..0e607b32d 100644 --- a/lib/src/agora_rhythm_player.g.dart +++ b/lib/src/agora_rhythm_player.g.dart @@ -38,10 +38,10 @@ const _$RhythmPlayerStateTypeEnumMap = { RhythmPlayerStateType.rhythmPlayerStateFailed: 814, }; -const _$RhythmPlayerErrorTypeEnumMap = { - RhythmPlayerErrorType.rhythmPlayerErrorOk: 0, - RhythmPlayerErrorType.rhythmPlayerErrorFailed: 1, - RhythmPlayerErrorType.rhythmPlayerErrorCanNotOpen: 801, - RhythmPlayerErrorType.rhythmPlayerErrorCanNotPlay: 802, - RhythmPlayerErrorType.rhythmPlayerErrorFileOverDurationLimit: 803, +const _$RhythmPlayerReasonEnumMap = { + RhythmPlayerReason.rhythmPlayerReasonOk: 0, + RhythmPlayerReason.rhythmPlayerReasonFailed: 1, + RhythmPlayerReason.rhythmPlayerReasonCanNotOpen: 801, + RhythmPlayerReason.rhythmPlayerReasonCanNotPlay: 802, + RhythmPlayerReason.rhythmPlayerReasonFileOverDurationLimit: 803, }; diff --git a/lib/src/agora_rtc_engine.dart b/lib/src/agora_rtc_engine.dart index 410f2454c..8e87b2432 100644 --- a/lib/src/agora_rtc_engine.dart +++ b/lib/src/agora_rtc_engine.dart @@ -283,18 +283,18 @@ extension AudioReverbTypeExt on AudioReverbType { } } -/// @nodoc +/// Options for handling audio and video stream fallback when network conditions are weak. @JsonEnum(alwaysCreate: true) enum StreamFallbackOptions { - /// @nodoc + /// 0: No fallback processing is performed on audio and video streams, the quality of the audio and video streams cannot be guaranteed. @JsonValue(0) streamFallbackOptionDisabled, - /// @nodoc + /// 1: Only receive low-quality (low resolution, low bitrate) video stream. @JsonValue(1) streamFallbackOptionVideoStreamLow, - /// @nodoc + /// 2: When the network conditions are weak, try to receive the low-quality video stream first. If the video cannot be displayed due to extremely weak network environment, then fall back to receiving audio-only stream. @JsonValue(2) streamFallbackOptionAudioOnly, } @@ -1299,6 +1299,7 @@ class ChannelMediaOptions { this.publishMediaPlayerAudioTrack, this.publishMediaPlayerVideoTrack, this.publishTranscodedVideoTrack, + this.publishMixedAudioTrack, this.autoSubscribeAudio, this.autoSubscribeVideo, this.enableAudioRecordingOrPlayout, @@ -1388,6 +1389,10 @@ class ChannelMediaOptions { @JsonKey(name: 'publishTranscodedVideoTrack') final bool? publishTranscodedVideoTrack; + /// @nodoc + @JsonKey(name: 'publishMixedAudioTrack') + final bool? publishMixedAudioTrack; + /// Whether to automatically subscribe to all remote audio streams when the user joins a channel: true : Subscribe to all remote audio streams. false : Do not automatically subscribe to any remote audio streams. @JsonKey(name: 'autoSubscribeAudio') final bool? autoSubscribeAudio; @@ -1562,6 +1567,10 @@ class LeaveChannelOptions { } /// The SDK uses the RtcEngineEventHandler interface to send event notifications to your app. Your app can get those notifications through methods that inherit this interface. +/// +/// All methods in this interface have default (empty) implementation. You can choose to inherit events related to your app scenario. +/// In the callbacks, avoid implementing time-consuming tasks or calling APIs that may cause thread blocking (such as sendMessage). Otherwise, the SDK may not work properly. +/// The SDK no longer catches exceptions in the code logic that developers implement themselves in RtcEngineEventHandler class. You need to handle this exception yourself, otherwise the app may crash when the exception occurs. class RtcEngineEventHandler { /// @nodoc const RtcEngineEventHandler({ @@ -1598,8 +1607,8 @@ class RtcEngineEventHandler { this.onUserEnableVideo, this.onUserStateChanged, this.onUserEnableLocalVideo, - this.onLocalAudioStats, this.onRemoteAudioStats, + this.onLocalAudioStats, this.onLocalVideoStats, this.onRemoteVideoStats, this.onCameraReady, @@ -1618,8 +1627,8 @@ class RtcEngineEventHandler { this.onTokenPrivilegeWillExpire, this.onLicenseValidationFailure, this.onFirstLocalAudioFramePublished, - this.onFirstRemoteAudioFrame, this.onFirstRemoteAudioDecoded, + this.onFirstRemoteAudioFrame, this.onLocalAudioStateChanged, this.onRemoteAudioStateChanged, this.onActiveSpeaker, @@ -1633,7 +1642,6 @@ class RtcEngineEventHandler { this.onTranscodingUpdated, this.onAudioRoutingChanged, this.onChannelMediaRelayStateChanged, - this.onChannelMediaRelayEvent, this.onLocalPublishFallbackToAudioOnly, this.onRemoteSubscribeFallbackToAudioOnly, this.onRemoteAudioTransportStats, @@ -1646,18 +1654,20 @@ class RtcEngineEventHandler { this.onPermissionError, this.onLocalUserRegistered, this.onUserInfoUpdated, + this.onUserAccountUpdated, + this.onVideoRenderingTracingResult, + this.onLocalVideoTranscoderError, this.onUploadLogResult, this.onAudioSubscribeStateChanged, this.onVideoSubscribeStateChanged, this.onAudioPublishStateChanged, this.onVideoPublishStateChanged, + this.onTranscodedStreamLayoutInfo, this.onExtensionEvent, this.onExtensionStarted, this.onExtensionStopped, this.onExtensionError, - this.onUserAccountUpdated, - this.onLocalVideoTranscoderError, - this.onVideoRenderingTracingResult, + this.onSetRtmFlagResult, }); /// Occurs when a user joins a channel. @@ -1763,7 +1773,6 @@ class RtcEngineEventHandler { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. final void Function(int position)? onAudioMixingPositionChanged; /// Occurs when the playback of the local music file finishes. @@ -1850,7 +1859,6 @@ class RtcEngineEventHandler { /// The remote user stops sending the video stream and re-sends it after 15 seconds. Reasons for such an interruption include: /// The remote user leaves the channel. /// The remote user drops offline. - /// The remote user calls muteLocalVideoStream to stop sending the video stream. /// The remote user calls disableVideo to disable video. /// /// * [connection] The connection information. See RtcConnection. @@ -1874,17 +1882,17 @@ class RtcEngineEventHandler { /// Occurs when the local video stream state changes. /// - /// When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateFailed and error code of localVideoStreamErrorCaptureFailure in the following situations: + /// When the state of the local video stream changes (including the state of the video capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur. The SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateFailed and error code of localVideoStreamReasonCaptureFailure in the following situations: /// The app switches to the background, and the system gets the camera resource. - /// If your app runs in the background on a device running Android 9 or later, you cannot access the camera. - /// If your app runs in the background on a device running Android 6 or later, the camera is occupied by a third-party app. Once the camera is released, the SDK triggers the onLocalVideoStateChanged (localVideoStreamStateCapturing, localVideoStreamErrorOk) callback. - /// The camera starts normally, but does not output video frames for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateCapturing and error code of localVideoStreamErrorCaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment. + /// For Android 9 and later versions, after an app is in the background for a period, the system automatically revokes camera permissions. + /// For Android 6 and later versions, if the camera is held by a third-party app for a certain duration and then released, the SDK triggers this callback and reports the onLocalVideoStateChanged (localVideoStreamStateCapturing, localVideoStreamReasonOk) callback. + /// The camera starts normally, but does not output video frames for four consecutive seconds. When the camera outputs the captured video frames, if the video frames are the same for 15 consecutive frames, the SDK triggers the onLocalVideoStateChanged callback with the state code of localVideoStreamStateCapturing and error code of localVideoStreamReasonCaptureFailure. Note that the video frame duplication detection is only available for video frames with a resolution greater than 200 × 200, a frame rate greater than or equal to 10 fps, and a bitrate less than 20 Kbps. For some device models, the SDK does not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment. /// /// * [source] The type of the video source. See VideoSourceType. /// * [state] The state of the local video, see LocalVideoStreamState. - /// * [error] The detailed error information, see LocalVideoStreamError. + /// * [reason] The reasons for changes in local video state. See LocalVideoStreamReason. final void Function(VideoSourceType source, LocalVideoStreamState state, - LocalVideoStreamError error)? onLocalVideoStateChanged; + LocalVideoStreamReason reason)? onLocalVideoStateChanged; /// Occurs when the remote video stream state changes. /// @@ -1982,15 +1990,6 @@ class RtcEngineEventHandler { final void Function(RtcConnection connection, int remoteUid, bool enabled)? onUserEnableLocalVideo; - /// Reports the statistics of the local audio stream. - /// - /// The SDK triggers this callback once every two seconds. - /// - /// * [connection] The connection information. See RtcConnection. - /// * [stats] Local audio statistics. See LocalAudioStats. - final void Function(RtcConnection connection, LocalAudioStats stats)? - onLocalAudioStats; - /// Reports the transport-layer statistics of each remote audio stream. /// /// The SDK triggers this callback once every two seconds for each remote user who is sending audio streams. If a channel includes multiple remote users, the SDK triggers this callback as many times. @@ -2000,6 +1999,15 @@ class RtcEngineEventHandler { final void Function(RtcConnection connection, RemoteAudioStats stats)? onRemoteAudioStats; + /// Reports the statistics of the local audio stream. + /// + /// The SDK triggers this callback once every two seconds. + /// + /// * [connection] The connection information. See RtcConnection. + /// * [stats] Local audio statistics. See LocalAudioStats. + final void Function(RtcConnection connection, LocalAudioStats stats)? + onLocalAudioStats; + /// Reports the statistics of the local video stream. /// /// The SDK triggers this callback once every two seconds to report the statistics of the local video stream. @@ -2082,9 +2090,8 @@ class RtcEngineEventHandler { /// When the state of the virtual metronome changes, the SDK triggers this callback to report the current state of the virtual metronome. This callback indicates the state of the local audio stream and enables you to troubleshoot issues when audio exceptions occur. This callback is for Android and iOS only. /// /// * [state] For the current virtual metronome status, see RhythmPlayerStateType. - /// * [errorCode] For the error codes and error messages related to virtual metronome errors, see RhythmPlayerErrorType. - final void Function( - RhythmPlayerStateType state, RhythmPlayerErrorType errorCode)? + /// * [errorCode] For the error codes and error messages related to virtual metronome errors, see RhythmPlayerReason. + final void Function(RhythmPlayerStateType state, RhythmPlayerReason reason)? onRhythmPlayerStateChanged; /// Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted. @@ -2130,7 +2137,7 @@ class RtcEngineEventHandler { /// * [connection] The connection information. See RtcConnection. /// * [remoteUid] The ID of the remote user sending the message. /// * [streamId] The stream ID of the received message. - /// * [code] The error code. + /// * [code] ErrorCodeType The error code. /// * [missed] The number of lost messages. /// * [cached] Number of incoming cached messages when the data stream is interrupted. final void Function(RtcConnection connection, int remoteUid, int streamId, @@ -2170,16 +2177,6 @@ class RtcEngineEventHandler { final void Function(RtcConnection connection, int elapsed)? onFirstLocalAudioFramePublished; - /// Occurs when the SDK receives the first audio frame from a specific remote user. - /// - /// Deprecated: Use onRemoteAudioStateChanged instead. - /// - /// * [connection] The connection information. See RtcConnection. - /// * [userId] The user ID of the remote user. - /// * [elapsed] The time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback. - final void Function(RtcConnection connection, int userId, int elapsed)? - onFirstRemoteAudioFrame; - /// Occurs when the SDK decodes the first remote audio frame for playback. /// /// Deprecated: Use onRemoteAudioStateChanged instead. The SDK triggers this callback under one of the following circumstances: @@ -2196,15 +2193,25 @@ class RtcEngineEventHandler { final void Function(RtcConnection connection, int uid, int elapsed)? onFirstRemoteAudioDecoded; + /// Occurs when the SDK receives the first audio frame from a specific remote user. + /// + /// Deprecated: Use onRemoteAudioStateChanged instead. + /// + /// * [connection] The connection information. See RtcConnection. + /// * [userId] The user ID of the remote user. + /// * [elapsed] The time elapsed (ms) from the local user calling joinChannel until the SDK triggers this callback. + final void Function(RtcConnection connection, int userId, int elapsed)? + onFirstRemoteAudioFrame; + /// Occurs when the local audio stream state changes. /// /// When the state of the local audio stream changes (including the state of the audio capture and encoding), the SDK triggers this callback to report the current state. This callback indicates the state of the local audio stream, and allows you to troubleshoot issues when audio exceptions occur. When the state is localAudioStreamStateFailed (3), you can view the error information in the error parameter. /// /// * [connection] The connection information. See RtcConnection. /// * [state] The state of the local audio. See LocalAudioStreamState. - /// * [error] Local audio state error codes. See LocalAudioStreamError. + /// * [reason] Reasons for local audio state changes. See LocalAudioStreamReason. final void Function(RtcConnection connection, LocalAudioStreamState state, - LocalAudioStreamError error)? onLocalAudioStateChanged; + LocalAudioStreamReason reason)? onLocalAudioStateChanged; /// Occurs when the remote audio state changes. /// @@ -2295,9 +2302,9 @@ class RtcEngineEventHandler { /// /// * [url] The URL address where the state of the Media Push changes. /// * [state] The current state of the Media Push. See RtmpStreamPublishState. - /// * [errCode] The detailed error information for the Media Push. See RtmpStreamPublishErrorType. + /// * [reason] Reasons for the changes in the Media Push status. See RtmpStreamPublishReason. final void Function(String url, RtmpStreamPublishState state, - RtmpStreamPublishErrorType errCode)? onRtmpStreamingStateChanged; + RtmpStreamPublishReason reason)? onRtmpStreamingStateChanged; /// Reports events during the Media Push. /// @@ -2308,7 +2315,7 @@ class RtcEngineEventHandler { /// Occurs when the publisher's transcoding is updated. /// - /// When the LiveTranscoding class in the method updates, the SDK triggers the onTranscodingUpdated callback to report the update information. If you call the method to set the LiveTranscoding class for the first time, the SDK does not trigger this callback. + /// When the LiveTranscoding class in the startRtmpStreamWithTranscoding method updates, the SDK triggers the onTranscodingUpdated callback to report the update information. If you call the startRtmpStreamWithTranscoding method to set the LiveTranscoding class for the first time, the SDK does not trigger this callback. final void Function()? onTranscodingUpdated; /// Occurs when the local audio route changes. @@ -2328,18 +2335,18 @@ class RtcEngineEventHandler { ChannelMediaRelayState state, ChannelMediaRelayError code)? onChannelMediaRelayStateChanged; - /// Reports events during the media stream relay. - /// - /// Deprecated: This callback is deprecated. - /// - /// * [code] The event code of channel media relay. See ChannelMediaRelayEvent. - final void Function(ChannelMediaRelayEvent code)? onChannelMediaRelayEvent; - /// @nodoc final void Function(bool isFallbackOrRecover)? onLocalPublishFallbackToAudioOnly; - /// @nodoc + /// Occurs when the remote media stream falls back to the audio-only stream due to poor network conditions or switches back to the video stream after the network conditions improve. + /// + /// If you call setRemoteSubscribeFallbackOption and set option to streamFallbackOptionAudioOnly, the SDK triggers this callback in the following situations: + /// The downstream network condition is poor, and the subscribed video stream is downgraded to audio-only stream. + /// The downstream network condition has improved, and the subscribed stream has been restored to video stream. Once the remote media stream switches to the low-quality video stream due to weak network conditions, you can monitor the stream switch between a high-quality and low-quality stream in the onRemoteVideoStats callback. + /// + /// * [uid] The user ID of the remote user. + /// * [isFallbackOrRecover] true : The subscribed media stream falls back to audio-only due to poor network conditions. false : The subscribed media stream switches back to the video stream after the network conditions improve. final void Function(int uid, bool isFallbackOrRecover)? onRemoteSubscribeFallbackToAudioOnly; @@ -2426,6 +2433,35 @@ class RtcEngineEventHandler { /// * [info] The UserInfo object that contains the user ID and user account of the remote user. See UserInfo for details. final void Function(int uid, UserInfo info)? onUserInfoUpdated; + /// @nodoc + final void Function( + RtcConnection connection, int remoteUid, String remoteUserAccount)? + onUserAccountUpdated; + + /// Video frame rendering event callback. + /// + /// After calling the startMediaRenderingTracing method or joining the channel, the SDK triggers this callback to report the events of video frame rendering and the indicators during the rendering process. Developers can optimize the indicators to improve the efficiency of the first video frame rendering. + /// + /// * [connection] The connection information. See RtcConnection. + /// * [uid] The user ID. + /// * [currentEvent] The current video frame rendering event. See MediaTraceEvent. + /// * [tracingInfo] The indicators during the video frame rendering process. Developers need to reduce the value of indicators as much as possible in order to improve the efficiency of the first video frame rendering. See VideoRenderingTracingInfo. + final void Function( + RtcConnection connection, + int uid, + MediaTraceEvent currentEvent, + VideoRenderingTracingInfo tracingInfo)? onVideoRenderingTracingResult; + + /// Occurs when there's an error during the local video mixing. + /// + /// When you fail to call startLocalVideoTranscoder or updateLocalTranscoderConfiguration, the SDK triggers this callback to report the reason. + /// + /// * [stream] The video streams that cannot be mixed during video mixing. See TranscodingVideoStream. + /// * [error] The reason for local video mixing error. See VideoTranscoderError. + final void Function( + TranscodingVideoStream stream, VideoTranscoderError error)? + onLocalVideoTranscoderError; + /// @nodoc final void Function(RtcConnection connection, String requestId, bool success, UploadErrorReason reason)? onUploadLogResult; @@ -2484,6 +2520,20 @@ class RtcEngineEventHandler { StreamPublishState newState, int elapseSinceLastState)? onVideoPublishStateChanged; + /// Occurs when the local user receives a mixed video stream carrying layout information. + /// + /// When the local user receives a mixed video stream sent by the video mixing server for the first time, or when there is a change in the layout information of the mixed stream, the SDK triggers this callback, reporting the layout information of each sub-video stream within the mixed video stream. This callback is for Android and iOS only. + /// + /// * [connection] The connection information. See RtcConnection. + /// + final void Function( + RtcConnection connection, + int uid, + int width, + int height, + int layoutCount, + List layoutlist)? onTranscodedStreamLayoutInfo; + /// The event callback of the extension. /// /// To listen for events while the extension is running, you need to register this callback. @@ -2525,33 +2575,7 @@ class RtcEngineEventHandler { onExtensionError; /// @nodoc - final void Function( - RtcConnection connection, int remoteUid, String userAccount)? - onUserAccountUpdated; - - /// Occurs when there's an error during the local video mixing. - /// - /// When you fail to call startLocalVideoTranscoder or updateLocalTranscoderConfiguration, the SDK triggers this callback to report the reason. - /// - /// * [stream] The video streams that cannot be mixed during video mixing. See TranscodingVideoStream. - /// * [error] The reason for local video mixing error. See VideoTranscoderError. - final void Function( - TranscodingVideoStream stream, VideoTranscoderError error)? - onLocalVideoTranscoderError; - - /// Video frame rendering event callback. - /// - /// After calling the startMediaRenderingTracing method or joining the channel, the SDK triggers this callback to report the events of video frame rendering and the indicators during the rendering process. Developers can optimize the indicators to improve the efficiency of the first video frame rendering. - /// - /// * [connection] The connection information. See RtcConnection. - /// * [uid] The user ID. - /// * [currentEvent] The current video frame rendering event. See MediaTraceEvent. - /// * [tracingInfo] The indicators during the video frame rendering process. Developers need to reduce the value of indicators as much as possible in order to improve the efficiency of the first video frame rendering. See VideoRenderingTracingInfo. - final void Function( - RtcConnection connection, - int uid, - MediaTraceEvent currentEvent, - VideoRenderingTracingInfo tracingInfo)? onVideoRenderingTracingResult; + final void Function(RtcConnection connection, int code)? onSetRtmFlagResult; } /// Video device management methods. @@ -2574,7 +2598,6 @@ abstract class VideoDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDevice(String deviceIdUTF8); /// Retrieves the current video capture device. @@ -2648,7 +2671,7 @@ class RtcEngineContext { @JsonKey(name: 'license') final String? license; - /// The audio scenarios. See AudioScenarioType. Under different audio scenarios, the device uses different volume types. + /// The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. @JsonKey(name: 'audioScenario') final AudioScenarioType? audioScenario; @@ -2658,7 +2681,7 @@ class RtcEngineContext { /// The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log. /// The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log. - /// The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8. + /// The default size of each SDK log file and API log file is 2,048 KB. These log files are encoded in UTF-8. /// The SDK writes the latest logs in agorasdk.log or agoraapi.log. /// When agorasdk.log is full, the SDK processes the log files in the following order: /// Delete the agorasdk.4.log file (if any). @@ -2793,44 +2816,44 @@ class Metadata { Map toJson() => _$MetadataToJson(this); } -/// The CDN streaming error. +/// Reasons for the changes in CDN streaming status. @JsonEnum(alwaysCreate: true) -enum DirectCdnStreamingError { +enum DirectCdnStreamingReason { /// 0: No error. @JsonValue(0) - directCdnStreamingErrorOk, + directCdnStreamingReasonOk, /// 1: A general error; no specific reason. You can try to push the media stream again. @JsonValue(1) - directCdnStreamingErrorFailed, + directCdnStreamingReasonFailed, /// 2: An error occurs when pushing audio streams. For example, the local audio capture device is not working properly, is occupied by another process, or does not get the permission required. @JsonValue(2) - directCdnStreamingErrorAudioPublication, + directCdnStreamingReasonAudioPublication, /// 3: An error occurs when pushing video streams. For example, the local video capture device is not working properly, is occupied by another process, or does not get the permission required. @JsonValue(3) - directCdnStreamingErrorVideoPublication, + directCdnStreamingReasonVideoPublication, /// 4: Fails to connect to the CDN. @JsonValue(4) - directCdnStreamingErrorNetConnect, + directCdnStreamingReasonNetConnect, /// 5: The URL is already being used. Use a new URL for streaming. @JsonValue(5) - directCdnStreamingErrorBadName, + directCdnStreamingReasonBadName, } /// @nodoc -extension DirectCdnStreamingErrorExt on DirectCdnStreamingError { +extension DirectCdnStreamingReasonExt on DirectCdnStreamingReason { /// @nodoc - static DirectCdnStreamingError fromValue(int value) { - return $enumDecode(_$DirectCdnStreamingErrorEnumMap, value); + static DirectCdnStreamingReason fromValue(int value) { + return $enumDecode(_$DirectCdnStreamingReasonEnumMap, value); } /// @nodoc int value() { - return _$DirectCdnStreamingErrorEnumMap[this]!; + return _$DirectCdnStreamingReasonEnumMap[this]!; } } @@ -2923,11 +2946,11 @@ class DirectCdnStreamingEventHandler { /// When the host directly pushes streams to the CDN, if the streaming state changes, the SDK triggers this callback to report the changed streaming state, error codes, and other information. You can troubleshoot issues by referring to this callback. /// /// * [state] The current CDN streaming state. See DirectCdnStreamingState. - /// * [error] The CDN streaming error. See DirectCdnStreamingError. + /// * [reason] Reasons for changes in the status of CDN streaming. See DirectCdnStreamingReason. /// * [message] The information about the changed streaming state. final void Function( DirectCdnStreamingState state, - DirectCdnStreamingError error, + DirectCdnStreamingReason reason, String message)? onDirectCdnStreamingStateChanged; /// Reports the CDN streaming statistics. @@ -3022,15 +3045,6 @@ class ExtensionInfo { /// /// RtcEngine provides the main methods that your app can call. Before calling other APIs, you must call createAgoraRtcEngine to create an RtcEngine object. abstract class RtcEngine { - /// Releases the RtcEngine instance. - /// - /// This method releases all resources used by the Agora SDK. Use this method for apps in which users occasionally make voice or video calls. When users do not make calls, you can free up resources for other operations. After a successful method call, you can no longer use any method or callback in the SDK anymore. If you want to use the real-time communication functions again, you must call createAgoraRtcEngine and initialize to create a new RtcEngine instance. - /// This method can be called synchronously. You need to wait for the resource of RtcEngine to be released before performing other operations (for example, create a new RtcEngine object). Therefore, Agora recommends calling this method in the child thread to avoid blocking the main thread. - /// Besides, Agora does not recommend you calling release in any callback of the SDK. Otherwise, the SDK cannot release the resources until the callbacks return results, which may result in a deadlock. - /// - /// * [sync] Whether the method is called synchronously: true : Synchronous call. false : Asynchronous call. Currently this method only supports synchronous calls. Do not set this parameter to this value. - Future release({bool sync = false}); - /// Initializes RtcEngine. /// /// All called methods provided by the RtcEngine class are executed asynchronously. Agora recommends calling these methods in the same thread. @@ -3072,6 +3086,13 @@ abstract class RtcEngine { /// If the call timeouts, please modify the call logic and do not invoke the method in the main thread. Future> queryCodecCapability(int size); + /// Queries device score. + /// + /// Returns + /// When the method call succeeds, it returns a value in the range of [0,100], indicating the current device's score. The larger the value, the stronger the device capability. Most devices are rated between 60 and 100. When the method call fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + /// < 0: Failure. + Future queryDeviceScore(); + /// Preloads a channel with token, channelId, and uid. /// /// When audience members need to switch between different channels frequently, calling the method can help shortening the time of joining a channel, thus reducing the time it takes for audience members to hear and see the host. As it may take a while for the SDK to preload a channel, Agora recommends that you call this method as soon as possible after obtaining the channel name and user ID to join a channel. @@ -3146,9 +3167,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. For example, the token is invalid. You need to pass in a valid parameter and join the channel again. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. Future updatePreloadChannelToken(String token); /// Joins a channel with media options. @@ -3191,10 +3209,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. - /// -8: The internal state of the RtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the connectionStateDisconnected (1) or connectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method. Future updateChannelMediaOptions(ChannelMediaOptions options); /// Sets channel options and leaves the channel. @@ -3206,7 +3220,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future leaveChannel({LeaveChannelOptions? options}); /// Renews the token. @@ -3217,9 +3230,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. For example, the token is invalid. You need to fill in a valid parameter. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. Future renewToken(String token); /// Sets the channel profile. @@ -3249,11 +3259,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). - /// -2: The parameter is invalid. - /// -5: The request is rejected. - /// -7: The SDK is not initialized. Future setClientRole( {required ClientRoleType role, ClientRoleOptions? options}); @@ -3275,8 +3280,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -5(ERR_REFUSED): Failed to stop the echo test. The echo test may not be running. Future stopEchoTest(); /// Enables or disables multi-camera capture. @@ -3300,7 +3303,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableMultiCamera( {required bool enabled, required CameraCapturerConfiguration config}); @@ -3313,7 +3315,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableVideo(); /// Disables the video module. @@ -3324,7 +3325,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future disableVideo(); /// Enables the local video preview and specifies the video source for the preview. @@ -3340,10 +3340,21 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startPreview( {VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary}); + /// Enables the local video preview. + /// + /// You can call this method to enable local video preview. Call this method after the following: + /// Call setupLocalVideo to initialize the local preview. + /// Call enableVideo to enable the video module. + /// The local preview enables the mirror mode by default. + /// After the local video preview is enabled, if you call leaveChannel to exit the channel, the local preview remains until you call stopPreview to disable it. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + Future startPreviewWithoutSourceType(); + /// Stops the local video preview. /// /// After calling startPreview to start the preview, if you want to close the local video preview, call this method. Call this method before joining a channel or after leaving a channel. @@ -3358,9 +3369,7 @@ abstract class RtcEngine { /// Starts the last mile network probe test. /// - /// This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT). Once this method is enabled, the SDK returns the following callbacks: onLastmileQuality : The SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience. onLastmileProbeResult : The SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective. This method applies to the following scenarios: - /// Before a user joins a channel, call this method to check the uplink network quality. - /// In a live streaming channel, call this method to check the uplink network quality before an audience member switches to a host. + /// This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT). Once this method is enabled, the SDK returns the following callbacks: onLastmileQuality : The SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience. onLastmileProbeResult : The SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective. This method must be called before joining the channel, and is used to judge and predict whether the current uplink network quality is good enough. /// Do not call other methods before receiving the onLastmileQuality and onLastmileProbeResult callbacks. Otherwise, the callbacks may be interrupted. /// A host should not call this method after joining a channel (when in a call). /// @@ -3368,14 +3377,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startLastmileProbeTest(LastmileProbeConfig config); /// Stops the last mile network probe test. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopLastmileProbeTest(); /// Sets the video encoder configuration. @@ -3386,7 +3393,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVideoEncoderConfiguration(VideoEncoderConfiguration config); /// Sets the image enhancement options. @@ -3404,10 +3410,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -4: The current device does not support this feature. Possible reasons include: - /// The current device capabilities do not meet the requirements for image enhancement. Agora recommends you replace it with a high-performance device. - /// The current device version is lower than Android 5.0 and does not support this feature. Agora recommends you replace the device or upgrade the operating system. Future setBeautyEffectOptions( {required bool enabled, required BeautyOptions options, @@ -3429,7 +3431,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLowlightEnhanceOptions( {required bool enabled, required LowlightEnhanceOptions options, @@ -3451,7 +3452,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVideoDenoiserOptions( {required bool enabled, required VideoDenoiserOptions options, @@ -3473,7 +3473,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setColorEnhanceOptions( {required bool enabled, required ColorEnhanceOptions options, @@ -3508,8 +3507,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -4: The device capabilities do not meet the requirements for the virtual background feature. Agora recommends you try it on devices with higher performance. Future enableVirtualBackground( {required bool enabled, required VirtualBackgroundSource backgroundSource, @@ -3518,7 +3515,7 @@ abstract class RtcEngine { /// Initializes the video view of a remote user. /// - /// This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user. + /// This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees. Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view. You need to specify the ID of the remote user in this method. If the remote user ID is unknown to the application, set it after the app receives the onUserJoined callback. To unbind the remote user from the view, set the view parameter to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user. In the scenarios of custom layout for mixed videos on the mobile end, you can call this method and set a separate view for rendering each sub-video stream of the mixed video stream. /// To update the rendering or mirror mode of the remote video view during a call, use the setRemoteRenderMode method. /// If you use the Agora recording function, the recording client joins the channel as a placeholder client, triggering the onUserJoined callback. Do not bind the placeholder client to the app view because the placeholder client does not send any video streams. If your app does not recognize the placeholder client, bind the remote user to the view when the SDK triggers the onFirstRemoteVideoDecoded callback. /// @@ -3531,7 +3528,7 @@ abstract class RtcEngine { /// Initializes the local video view. /// - /// This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL. + /// This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream. Call this method to bind the local video stream to a video view (view) and to set the rendering and mirror modes of the video view. After initialization, call this method to set the local video and then join the channel. The local video still binds to the view after you leave the channel. To unbind the local video from the view, set the view parameter as NULL. In real-time interactive scenarios, if you need to simultaneously view multiple preview frames in the local video preview, and each frame is at a different observation position along the video link, you can repeatedly call this method to set different view s and set different observation positions for each view. For example, by setting the video source to the camera and then configuring two view s with position setting to positionPostCapturerOrigin and positionPostCapturer, you can simultaneously preview the raw, unprocessed video frame and the video frame that has undergone preprocessing (image enhancement effects, virtual background, watermark) in the local video preview. /// You can call this method either before or after joining a channel. /// To update the rendering or mirror mode of the local video view during a call, use the setLocalRenderMode method. /// @@ -3563,12 +3560,11 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). - /// -4: Video application scenarios are not supported. Possible reasons include that you use the Voice SDK instead of the Video SDK. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. Future setVideoScenario(VideoApplicationScenarioType scenarioType); + /// @nodoc + Future setVideoQoEPreference(VideoQoePreferenceType qoePreference); + /// Enables the audio module. /// /// The audio mode is enabled by default. @@ -3578,43 +3574,41 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableAudio(); /// Disables the audio module. /// /// This method disables the internal engine and can be called anytime after initialization. It is still valid after one leaves channel. - /// This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the audio modules separately: enableLocalAudio : Whether to enable the microphone to create the local audio stream. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams. + /// This method resets the internal engine and takes some time to take effect. Agora recommends using the following API methods to control the audio modules separately: enableLocalAudio : Whether to enable the microphone to create the local audio stream. enableLoopbackRecording : Whether to enable loopback audio capturing. muteLocalAudioStream : Whether to publish the local audio stream. muteRemoteAudioStream : Whether to subscribe and play the remote audio stream. muteAllRemoteAudioStreams : Whether to subscribe to and play all remote audio streams. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future disableAudio(); /// Sets the audio profile and audio scenario. /// /// You can call this method either before or after joining a channel. + /// Due to iOS system restrictions, some audio routes cannot be recognized in call volume mode. Therefore, if you need to use an external sound card, it is recommended to set the audio scenario to audioScenarioGameStreaming (3). In this scenario, the SDK will switch to media volume to avoid this issue. /// In scenarios requiring high-quality audio, such as online music tutoring, Agora recommends you set profile as audioProfileMusicHighQuality (4) and scenario as audioScenarioGameStreaming (3). /// /// * [profile] The audio profile, including the sampling rate, bitrate, encoding mode, and the number of channels. See AudioProfileType. - /// * [scenario] The audio scenarios. See AudioScenarioType. Under different audio scenarios, the device uses different volume types. + /// * [scenario] The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioProfile( {required AudioProfileType profile, AudioScenarioType scenario = AudioScenarioType.audioScenarioDefault}); /// Sets audio scenarios. /// - /// You can call this method either before or after joining a channel. + /// Due to iOS system restrictions, some audio routes cannot be recognized in call volume mode. Therefore, if you need to use an external sound card, it is recommended to set the audio scenario to audioScenarioGameStreaming (3). In this scenario, the SDK will switch to media volume to avoid this issue. + /// You can call this method either before or after joining a channel. /// - /// * [scenario] The audio scenarios. See AudioScenarioType. Under different audio scenarios, the device uses different volume types. + /// * [scenario] The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioScenario(AudioScenarioType scenario); /// Enables or disables the local audio capture. @@ -3627,7 +3621,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLocalAudio(bool enabled); /// Stops or resumes publishing the local audio stream. @@ -3638,7 +3631,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalAudioStream(bool mute); /// Stops or resumes subscribing to the audio streams of all remote users. @@ -3651,7 +3643,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteAudioStreams(bool mute); /// @nodoc @@ -3666,7 +3657,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteRemoteAudioStream({required int uid, required bool mute}); /// Stops or resumes publishing the local video stream. @@ -3679,12 +3669,11 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalVideoStream(bool mute); /// Enables/Disables the local video capture. /// - /// This method disables or re-enables the local video capture, and does not affect receiving the remote video stream. After calling enableVideo, the local video capture is enabled by default. You can call enableLocalVideo (false) to disable the local video capture. If you want to re-enable the local video capture, call enableLocalVideo (true). After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client. + /// This method disables or re-enables the local video capture, and does not affect receiving the remote video stream. After calling enableVideo, the local video capture is enabled by default. If you call enableLocalVideo (false) to disable local video capture within the channel, it also simultaneously stops publishing the video stream within the channel. If you want to restart video catpure, you can call enableLocalVideo (true) and then call updateChannelMediaOptions to set the options parameter to publish the locally captured video stream in the channel. After the local video capturer is successfully disabled or re-enabled, the SDK triggers the onRemoteVideoStateChanged callback on the remote client. /// You can call this method either before or after joining a channel. /// This method enables the internal engine and is valid after leaving the channel. /// @@ -3692,7 +3681,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLocalVideo(bool enabled); /// Stops or resumes subscribing to the video streams of all remote users. @@ -3705,12 +3693,23 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteVideoStreams(bool mute); /// @nodoc Future setDefaultMuteAllRemoteVideoStreams(bool mute); + /// Sets the default video stream type to subscribe to. + /// + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling this method, and the sender will automatically start sending low-quality video stream upon receiving the request. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. Under limited network conditions, if the publisher does not disable the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream, or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, while the low-quality video stream has a lower resolution and bitrate. + /// Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel. + /// If you call both this method and setRemoteVideoStreamType, the setting of setRemoteVideoStreamType takes effect. + /// + /// * [streamType] The default video-stream type. See VideoStreamType. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + Future setRemoteDefaultVideoStreamType(VideoStreamType streamType); + /// Stops or resumes subscribing to the video stream of a specified user. /// /// Call this method after joining a channel. @@ -3723,16 +3722,15 @@ abstract class RtcEngine { /// < 0: Failure. Future muteRemoteVideoStream({required int uid, required bool mute}); - /// Sets the stream type of the remote video. + /// Sets the video stream type to subscribe to. /// - /// Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. By default, the SDK enables the low-quality video stream auto mode on the sending end (it does not actively send the low-quality video stream). The host identity receiver can initiate a low-quality video stream application at the receiving end by calling this method (the call to this method by the audience receiver does not take effect). After receiving the application, the sending end automatically switches to the low-quality video stream mode. You can call this method either before or after joining a channel. If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType, the setting of setRemoteVideoStreamType takes effect. + /// Under limited network conditions, if the publisher does not disable the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream, or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, while the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling this method, and the sender will automatically start sending low-quality video stream upon receiving the request. You can call this method either before or after joining a channel. If you call both setRemoteVideoStreamType and setRemoteDefaultVideoStreamType, the setting of setRemoteVideoStreamType takes effect. /// /// * [uid] The user ID. - /// * [streamType] The video stream type: VideoStreamType. + /// * [streamType] The video stream type, see VideoStreamType. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoStreamType( {required int uid, required VideoStreamType streamType}); @@ -3752,23 +3750,9 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoSubscriptionOptions( {required int uid, required VideoSubscriptionOptions options}); - /// Sets the default stream type of subscrption for remote video streams. - /// - /// By default, the SDK enables the low-quality video stream auto mode on the sending end (it does not actively send the low-quality video stream). The host identity receiver can initiate a low-quality video stream application at the receiving end by calling this method (the call to this method by the audience receiver does not take effect). After receiving the application, the sending end automatically switches to the low-quality video stream mode. Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamMode (false), the receiver can choose to receive either the high-quality video stream or the low-video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. - /// Call this method before joining a channel. The SDK does not support changing the default subscribed video stream type after joining a channel. - /// If you call both this method and setRemoteVideoStreamType, the SDK applies the settings in the setRemoteVideoStreamType method. - /// - /// * [streamType] The default video-stream type. See VideoStreamType. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future setRemoteDefaultVideoStreamType(VideoStreamType streamType); - /// Set the blocklist of subscriptions for audio streams. /// /// You can call this method to specify the audio streams of a user that you do not want to subscribe to. @@ -3782,7 +3766,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioBlocklist( {required List uidList, required int uidNumber}); @@ -3799,7 +3782,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioAllowlist( {required List uidList, required int uidNumber}); @@ -3816,7 +3798,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoBlocklist( {required List uidList, required int uidNumber}); @@ -3833,7 +3814,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoAllowlist( {required List uidList, required int uidNumber}); @@ -3843,7 +3823,7 @@ abstract class RtcEngine { /// /// * [interval] Sets the time interval between two consecutive volume indications: /// ≤ 0: Disables the volume indication. - /// > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50. + /// > 0: Time interval (ms) between two consecutive volume indications. Ensure this parameter is set to a value greater than 10, otherwise you will not receive the onAudioVolumeIndication callback. Agora recommends that this value is set as greater than 100. /// * [smooth] The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator. /// * [reportVad] true : Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user. false : (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user. /// @@ -3863,7 +3843,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startAudioRecording(AudioRecordingConfiguration config); /// Registers an encoded audio observer. @@ -3884,7 +3863,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAudioRecording(); /// Creates a media player instance. @@ -3910,9 +3888,9 @@ abstract class RtcEngine { /// Starts playing the music file. /// /// This method mixes the specified local or online audio file with the audio from the microphone, or replaces the microphone's audio with the specified local or remote audio file. A successful method call triggers the onAudioMixingStateChanged (audioMixingStatePlaying) callback. When the audio mixing file playback finishes, the SDK triggers the onAudioMixingStateChanged (audioMixingStateStopped) callback on the local client. - /// For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. /// You can call this method either before or after joining a channel. If you need to call startAudioMixing multiple times, ensure that the time interval between calling this method is more than 500 ms. /// If the local music file does not exist, the SDK does not support the file format, or the the SDK cannot access the music file URL, the SDK reports 701. + /// For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. /// /// * [filePath] File path: /// Android: The file path, which needs to be accurate to the file name and suffix. Agora supports URL addresses, absolute paths, or file paths that start with /assets/. You might encounter permission issues if you use an absolute path to access a local file, so Agora recommends using a URI address instead. For example : content://com.android.providers.media.documents/document/audio%3A14441 @@ -3926,13 +3904,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). - /// -2: The parameter is invalid. - /// -3: The SDK is not ready. - /// The audio module is disabled. - /// The program is not complete. - /// The initialization of RtcEngine fails. Reinitialize the RtcEngine. Future startAudioMixing( {required String filePath, required bool loopback, @@ -3945,7 +3916,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAudioMixing(); /// Pauses playing and mixing the music file. @@ -3954,7 +3924,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAudioMixing(); /// Resumes playing and mixing the music file. @@ -3963,7 +3932,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resumeAudioMixing(); /// Selects the audio track used during playback. @@ -3976,7 +3944,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future selectAudioTrack(int index); /// Gets the index of audio tracks of the current music file. @@ -3997,7 +3964,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustAudioMixingVolume(int volume); /// Adjusts the volume of audio mixing for publishing. @@ -4008,7 +3974,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustAudioMixingPublishVolume(int volume); /// Retrieves the audio mixing volume for publishing. @@ -4028,7 +3993,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustAudioMixingPlayoutVolume(int volume); /// Retrieves the audio mixing volume for local playback. @@ -4067,7 +4031,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioMixingPosition(int pos); /// Sets the channel mode of the current audio file. @@ -4080,7 +4043,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioMixingDualMonoMode(AudioMixingDualMonoMode mode); /// Sets the pitch of the local music file. @@ -4091,7 +4053,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioMixingPitch(int pitch); /// Retrieves the volume of the audio effects. @@ -4111,14 +4072,11 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEffectsVolume(int volume); /// Preloads a specified audio effect file into the memory. /// - /// To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel. - /// This method does not support online audio effect files. - /// For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. + /// To ensure smooth communication, It is recommended that you limit the size of the audio effect file. You can call this method to preload the audio effect before calling joinChannel. For the audio file formats supported by this method, see What formats of audio files does the Agora RTC SDK support. /// /// * [soundId] The audio effect ID. The ID of each audio effect file is unique. /// * [filePath] File path: @@ -4129,7 +4087,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future preloadEffect( {required int soundId, required String filePath, int startPos = 0}); @@ -4182,7 +4139,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future playAllEffects( {required int loopCount, required double pitch, @@ -4206,7 +4162,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVolumeOfEffect({required int soundId, required int volume}); /// Pauses a specified audio effect file. @@ -4215,14 +4170,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseEffect(int soundId); /// Pauses all audio effects. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAllEffects(); /// Resumes playing a specified audio effect. @@ -4231,14 +4184,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resumeEffect(int soundId); /// Resumes playing all audio effect files. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future resumeAllEffects(); /// Stops playing a specified audio effect. @@ -4247,14 +4198,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopEffect(int soundId); /// Stops playing all audio effects. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAllEffects(); /// Releases a specified preloaded audio effect from the memory. @@ -4263,14 +4212,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future unloadEffect(int soundId); /// Releases a specified preloaded audio effect from the memory. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future unloadAllEffects(); /// Retrieves the duration of the audio effect file. @@ -4296,7 +4243,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEffectPosition({required int soundId, required int pos}); /// Retrieves the playback position of the audio effect file. @@ -4318,7 +4264,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableSoundPositionIndication(bool enabled); /// Sets the 2D position (the position on the horizontal plane) of the remote user's voice. @@ -4337,7 +4282,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVoicePosition( {required int uid, required double pan, required double gain}); @@ -4351,7 +4295,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableSpatialAudio(bool enabled); /// Sets the spatial audio effect parameters of the remote user. @@ -4363,7 +4306,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteUserSpatialAudioParams( {required int uid, required SpatialAudioParams params}); @@ -4380,7 +4322,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVoiceBeautifierPreset(VoiceBeautifierPreset preset); /// Sets an SDK preset audio effect. @@ -4397,7 +4338,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioEffectPreset(AudioEffectPreset preset); /// Sets a preset voice beautifier effect. @@ -4437,7 +4377,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioEffectParameters( {required AudioEffectPreset preset, required int param1, @@ -4457,7 +4396,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVoiceBeautifierParameters( {required VoiceBeautifierPreset preset, required int param1, @@ -4477,7 +4415,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVoicePitch(double pitch); /// Set the formant ratio to change the timbre of human voice. @@ -4488,7 +4425,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVoiceFormant(double formantRatio); /// Sets the local voice equalization effect. @@ -4500,7 +4436,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVoiceEqualization( {required AudioEqualizationBandFrequency bandFrequency, required int bandGain}); @@ -4514,7 +4449,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVoiceReverb( {required AudioReverbType reverbKey, required int value}); @@ -4526,8 +4460,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). Future setHeadphoneEQPreset(HeadphoneEqualizerPreset preset); /// Sets the low- and high-frequency parameters of the headphone equalizer. @@ -4539,8 +4471,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). Future setHeadphoneEQParameters( {required int lowGain, required int highGain}); @@ -4552,7 +4482,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogFile(String filePath); /// Sets the log output level of the SDK. @@ -4563,7 +4492,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogFilter(LogFilterType filter); /// Sets the output log level of the SDK. @@ -4574,7 +4502,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogLevel(LogLevel level); /// Sets the log file size. @@ -4582,7 +4509,7 @@ abstract class RtcEngine { /// Deprecated: Use the logConfig parameter in initialize instead. By default, the SDK generates five SDK log files and five API call log files with the following rules: /// The SDK log files are: agorasdk.log, agorasdk.1.log, agorasdk.2.log, agorasdk.3.log, and agorasdk.4.log. /// The API call log files are: agoraapi.log, agoraapi.1.log, agoraapi.2.log, agoraapi.3.log, and agoraapi.4.log. - /// The default size for each SDK log file is 1,024 KB; the default size for each API call log file is 2,048 KB. These log files are encoded in UTF-8. + /// The default size of each SDK log file and API log file is 2,048 KB. These log files are encoded in UTF-8. /// The SDK writes the latest logs in agorasdk.log or agoraapi.log. /// When agorasdk.log is full, the SDK processes the log files in the following order: /// Delete the agorasdk.4.log file (if any). @@ -4596,7 +4523,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLogFileSize(int fileSizeInKBytes); /// @nodoc @@ -4607,13 +4533,13 @@ abstract class RtcEngine { /// After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream. /// Ensure that you have called the setupLocalVideo method to initialize the local video view before calling this method. /// During a call, you can call this method as many times as necessary to update the display mode of the local video view. + /// This method only takes effect on the primary camera (primaryCameraSource). In scenarios involving custom video capture or the use of alternative video sources, you need to use setupLocalVideo instead of this method. /// /// * [renderMode] The local video display mode. See RenderModeType. /// * [mirrorMode] The mirror mode of the local video view. See VideoMirrorModeType. If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalRenderMode( {required RenderModeType renderMode, VideoMirrorModeType mirrorMode = @@ -4645,10 +4571,9 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLocalVideoMirrorMode(VideoMirrorModeType mirrorMode); - /// Enables or disables the dual-stream mode on the sender and sets the low-quality video stream. + /// Sets the dual-stream mode on the sender side and the low-quality video stream. /// /// Deprecated: This method is deprecated as of v4.2.0. Use setDualStreamMode instead. You can call this method to enable or disable the dual-stream mode on the publisher side. Dual streams are a pairing of a high-quality video stream and a low-quality video stream: /// High-quality video stream: High bitrate, high resolution. @@ -4658,21 +4583,20 @@ abstract class RtcEngine { /// You can call this method either before or after joining a channel. /// /// * [enabled] Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode. - /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. + /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to disableSimulcastStream, setting streamConfig will not take effect. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableDualStreamMode( {required bool enabled, SimulcastStreamConfig? streamConfig}); - /// Sets dual-stream mode configuration on the sender, and sets the low-quality video stream. + /// Sets dual-stream mode configuration on the sender side. /// - /// The SDK enables the low-quality video stream auto mode on the sender side by default (it does not actively sending low-quality video streams). The host identity receiver can initiate a low-quality video stream application at the receiving end by calling setRemoteVideoStreamType. After receiving the application, the sending end automatically switches to the low-quality video stream mode. - /// If you want to modify this behavior, you can call this method and modify the mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling setRemoteVideoStreamType, and the sender then automatically starts sending low-quality video stream upon receiving the request. + /// If you want to modify this behavior, you can call this method and set mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). /// If you want to restore the default behavior after making changes, you can call this method again with mode set to autoSimulcastStream. The difference and connection between this method and enableDualStreamMode is as follows: - /// When calling this method and setting mode to disableSimulcastStream, it has the same effect as calling and setting enabled to false. - /// When calling this method and setting mode to enableSimulcastStream, it has the same effect as calling and setting enabled to true. + /// When calling this method and setting mode to disableSimulcastStream, it has the same effect as calling enableDualStreamMode and setting enabled to false. + /// When calling this method and setting mode to enableSimulcastStream, it has the same effect as calling enableDualStreamMode and setting enabled to true. /// Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence. /// /// * [mode] The mode in which the video stream is sent. See SimulcastStreamMode. @@ -4680,11 +4604,18 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDualStreamMode( {required SimulcastStreamMode mode, SimulcastStreamConfig? streamConfig}); - /// @nodoc + /// Sets whether to enable the local playback of external audio source. + /// + /// Ensure you have called the createCustomAudioTrack method to create a custom audio track before calling this method. After calling this method to enable the local playback of external audio source, if you need to stop local playback, you can call this method again and set enabled to false. You can call adjustCustomAudioPlayoutVolume to adjust the local playback volume of the custom audio track. + /// + /// * [trackId] The audio track ID. Set this parameter to the custom audio track ID returned in createCustomAudioTrack. + /// * [enabled] Whether to play the external audio source: true : Play the external audio source. false : (Default) Do not play the external source. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future enableCustomAudioLocalPlayback( {required int trackId, required bool enabled}); @@ -4740,7 +4671,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setMixedAudioFrameParameters( {required int sampleRate, required int channel, @@ -4775,7 +4705,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackAudioFrameBeforeMixingParameters( {required int sampleRate, required int channel}); @@ -4787,8 +4716,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: Invalid parameters. Future enableAudioSpectrumMonitor({int intervalInMS = 100}); /// Disables audio spectrum monitoring. @@ -4797,7 +4724,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future disableAudioSpectrumMonitor(); /// Register an audio spectrum observer. @@ -4816,7 +4742,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioSpectrumObserver(AudioSpectrumObserver observer); /// Adjusts the capturing signal volume. @@ -4830,7 +4755,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustRecordingSignalVolume(int volume); /// Whether to mute the recording signal. @@ -4839,7 +4763,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteRecordingSignal(bool mute); /// Adjusts the playback signal volume of all remote users. @@ -4854,7 +4777,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustPlaybackSignalVolume(int volume); /// Adjusts the playback signal volume of a specified remote user. @@ -4868,14 +4790,20 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustUserPlaybackSignalVolume( {required int uid, required int volume}); /// @nodoc Future setLocalPublishFallbackOption(StreamFallbackOptions option); - /// @nodoc + /// Sets the fallback option for the subscribed video stream based on the network conditions. + /// + /// An unstable network affects the audio and video quality in a video call or interactive live video streaming. If option is set as streamFallbackOptionVideoStreamLow or streamFallbackOptionAudioOnly, the SDK automatically switches the video from a high-quality stream to a low-quality stream or disables the video when the downlink network conditions cannot support both audio and video to guarantee the quality of the audio. Meanwhile, the SDK continuously monitors network quality and resumes subscribing to audio and video streams when the network quality improves. When the subscribed video stream falls back to an audio-only stream, or recovers from an audio-only stream to an audio-video stream, the SDK triggers the onRemoteSubscribeFallbackToAudioOnly callback. Ensure that you call this method before joining a channel. + /// + /// * [option] Fallback options for the subscribed stream. See StreamFallbackOptions. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setRemoteSubscribeFallbackOption(StreamFallbackOptions option); /// @nodoc @@ -4884,20 +4812,80 @@ abstract class RtcEngine { required int uidNum, required StreamFallbackOptions option}); + /// Enables or disables extensions. + /// + /// To call this method, call it immediately after initializing the RtcEngine object. + /// If you want to enable multiple extensions, you need to call this method multiple times. + /// The data processing order of different extensions in the SDK is determined by the order in which the extensions are enabled. That is, the extension that is enabled first will process the data first. + /// + /// * [provider] The name of the extension provider. + /// * [extension] The name of the extension. + /// * [enable] Whether to enable the extension: true : Enable the extension. false : Disable the extension. + /// * [type] Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: + /// The default value is unknownMediaSource. + /// If you want to use the second camera to capture video, set this parameter to secondaryCameraSource. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + Future enableExtension( + {required String provider, + required String extension, + bool enable = true, + MediaSourceType type = MediaSourceType.unknownMediaSource}); + + /// Sets the properties of the extension. + /// + /// After enabling the extension, you can call this method to set the properties of the extension. + /// + /// * [provider] The name of the extension provider. + /// * [extension] The name of the extension. + /// * [key] The key of the extension. + /// * [value] The value of the extension key. + /// * [type] Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: + /// The default value is unknownMediaSource. + /// If you want to use the second camera to capture video, set this parameter to secondaryCameraSource. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + Future setExtensionProperty( + {required String provider, + required String extension, + required String key, + required String value, + MediaSourceType type = MediaSourceType.unknownMediaSource}); + + /// Gets detailed information on the extensions. + /// + /// * [provider] The name of the extension provider. + /// * [extension] The name of the extension. + /// * [key] The key of the extension. + /// * [bufLen] Maximum length of the JSON string indicating the extension property. The maximum value is 512 bytes. + /// * [type] Source type of the extension. See MediaSourceType. + /// + /// Returns + /// The extension information, if the method call succeeds. + /// An empty string, if the method call fails. + Future getExtensionProperty( + {required String provider, + required String extension, + required String key, + required int bufLen, + MediaSourceType type = MediaSourceType.unknownMediaSource}); + /// Enables loopback audio capturing. /// /// If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end. /// This method applies to the macOS and Windows only. /// macOS does not support loopback audio capture of the default sound card. If you need to use this function, use a virtual sound card and pass its name to the deviceName parameter. Agora recommends using AgoraALD as the virtual sound card for audio capturing. /// You can call this method either before or after joining a channel. + /// If you call the disableAudio method to disable the audio module, audio capturing will be disabled as well. If you need to enable audio capturing, call the enableAudio method to enable the audio module and then call the enableLoopbackRecording method. /// - /// * [enabled] Whether to enable loopback audio capturing. true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing. + /// * [enabled] Sets whether to enable loopback audio capturing. true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing. /// * [deviceName] macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing. /// Windows: The device name of the sound card. The default is set to NULL, which means the SDK uses the sound card of your device for loopback audio capturing. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLoopbackRecording( {required bool enabled, String? deviceName}); @@ -4934,15 +4922,15 @@ abstract class RtcEngine { /// Sets the volume of the in-ear monitor. /// - /// This method applies to Android and iOS only. - /// Users must use wired earphones to hear their own voices. - /// You can call this method either before or after joining a channel. + /// You can call this method either before or after joining a channel. /// - /// * [volume] The volume of the in-ear monitor. The value ranges between 0 and 100. The default value is 100. + /// * [volume] The volume of the in-ear monitor. The value range is [0,400]. + /// 0: Mute. + /// 100: (Default) The original volume. + /// 400: Four times the original volume. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setInEarMonitoringVolume(int volume); /// Adds an extension to the SDK. @@ -4954,7 +4942,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future loadExtensionProvider( {required String path, bool unloadAfterUse = false}); @@ -4968,7 +4955,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setExtensionProviderProperty( {required String provider, required String key, required String value}); @@ -4984,75 +4970,11 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future registerExtension( {required String provider, required String extension, MediaSourceType type = MediaSourceType.unknownMediaSource}); - /// Enables or disables extensions. - /// - /// To call this method, call it immediately after initializing the RtcEngine object. - /// If you want to enable multiple extensions, you need to call this method multiple times. - /// The data processing order of different extensions in the SDK is determined by the order in which the extensions are enabled. That is, the extension that is enabled first will process the data first. - /// - /// * [provider] The name of the extension provider. - /// * [extension] The name of the extension. - /// * [enable] Whether to enable the extension: true : Enable the extension. false : Disable the extension. - /// * [type] Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: - /// The default value is unknownMediaSource. - /// If you want to use the second camera to capture video, set this parameter to secondaryCameraSource. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -3: The extension library is not loaded. Agora recommends that you check the storage location or the name of the dynamic library. - Future enableExtension( - {required String provider, - required String extension, - bool enable = true, - MediaSourceType type = MediaSourceType.unknownMediaSource}); - - /// Sets the properties of the extension. - /// - /// After enabling the extension, you can call this method to set the properties of the extension. - /// - /// * [provider] The name of the extension provider. - /// * [extension] The name of the extension. - /// * [key] The key of the extension. - /// * [value] The value of the extension key. - /// * [type] Type of media source. See MediaSourceType. In this method, this parameter supports only the following two settings: - /// The default value is unknownMediaSource. - /// If you want to use the second camera to capture video, set this parameter to secondaryCameraSource. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future setExtensionProperty( - {required String provider, - required String extension, - required String key, - required String value, - MediaSourceType type = MediaSourceType.unknownMediaSource}); - - /// Gets detailed information on the extensions. - /// - /// * [provider] The name of the extension provider. - /// * [extension] The name of the extension. - /// * [key] The key of the extension. - /// * [bufLen] Maximum length of the JSON string indicating the extension property. The maximum value is 512 bytes. - /// * [type] Source type of the extension. See MediaSourceType. - /// - /// Returns - /// The extension information, if the method call succeeds. - /// An empty string, if the method call fails. - Future getExtensionProperty( - {required String provider, - required String extension, - required String key, - required int bufLen, - MediaSourceType type = MediaSourceType.unknownMediaSource}); - /// Sets the camera capture configuration. /// /// This method is for Android and iOS only. @@ -5066,12 +4988,12 @@ abstract class RtcEngine { Future setCameraCapturerConfiguration( CameraCapturerConfiguration config); - /// Creates a customized video track. + /// Creates a custom video track. /// - /// When you need to publish multiple custom captured videos in the channel, you can refer to the following steps: + /// To publish a custom video source, see the following steps: /// Call this method to create a video track and get the video track ID. - /// In each channel's ChannelMediaOptions, set the customVideoTrackId parameter to the ID of the video track you want to publish, and set publishCustomVideoTrack to true. - /// If you call pushVideoFrame, and specify customVideoTrackId as the videoTrackId set in step 2, you can publish the corresponding custom video source in multiple channels. + /// Call joinChannel to join the channel. In ChannelMediaOptions, set customVideoTrackId to the video track ID that you want to publish, and set publishCustomVideoTrack to true. + /// Call pushVideoFrame and specify videoTrackId as the video track ID set in step 2. You can then publish the corresponding custom video source in the channel. /// /// Returns /// If the method call is successful, the video track ID is returned as the unique identifier of the video track. @@ -5087,7 +5009,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future destroyCustomVideoTrack(int videoTrackId); /// @nodoc @@ -5100,7 +5021,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future switchCamera(); /// Checks whether the device supports camera zoom. @@ -5173,7 +5093,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableFaceDetection(bool enabled); /// Gets the maximum zoom ratio supported by the camera. @@ -5196,7 +5115,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraFocusPositionInPreview( {required double positionX, required double positionY}); @@ -5209,7 +5127,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraTorchOn(bool isOn); /// Enables the camera auto-face focus function. @@ -5222,7 +5139,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraAutoFocusFaceModeEnabled(bool enabled); /// Checks whether the device supports manual exposure. @@ -5245,7 +5161,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraExposurePosition( {required double positionXinView, required double positionYinView}); @@ -5272,7 +5187,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraExposureFactor(double factor); /// Checks whether the device supports auto exposure. @@ -5293,19 +5207,21 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraAutoExposureFaceModeEnabled(bool enabled); /// Sets the default audio playback route. /// /// This method applies to Android and iOS only. - /// Ensure that you call this method before joining a channel. If you need to change the audio route after joining a channel, call setEnableSpeakerphone. Most mobile phones have two audio routes: an earpiece at the top, and a speakerphone at the bottom. The earpiece plays at a lower volume, and the speakerphone at a higher volume. When setting the default audio route, you determine whether audio playback comes through the earpiece or speakerphone when no external audio device is connected. + /// Ensure that you call this method before joining a channel. If you need to change the audio route after joining a channel, call setEnableSpeakerphone. Most mobile phones have two audio routes: an earpiece at the top, and a speakerphone at the bottom. The earpiece plays at a lower volume, and the speakerphone at a higher volume. When setting the default audio route, you determine whether audio playback comes through the earpiece or speakerphone when no external audio device is connected. In different scenarios, the default audio routing of the system is also different. See the following: + /// Voice call: Earpiece. + /// Audio broadcast: Speakerphone. + /// Video call: Speakerphone. + /// Video broadcast: Speakerphone. You can call this method to change the default audio route. After a successful method call, the SDK triggers the onAudioRoutingChanged callback. The system audio route changes when an external audio device, such as a headphone or a Bluetooth audio device, is connected. See Audio Route for detailed change principles. /// /// * [defaultToSpeaker] Whether to set the speakerphone as the default audio route: true : Set the speakerphone as the default audio route. false : Set the earpiece as the default audio route. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDefaultAudioRouteToSpeakerphone(bool defaultToSpeaker); /// Enables/Disables the audio route to the speakerphone. @@ -5319,7 +5235,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEnableSpeakerphone(bool speakerOn); /// Checks whether the speakerphone is enabled. @@ -5376,7 +5291,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAudioSessionOperationRestriction( AudioSessionOperationRestriction restriction); @@ -5392,9 +5306,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future startScreenCaptureByDisplayId( {required int displayId, required Rectangle regionRect, @@ -5412,9 +5323,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future startScreenCaptureByScreenRect( {required Rectangle screenRect, required Rectangle regionRect, @@ -5446,9 +5354,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future startScreenCaptureByWindowId( {required int windowId, required Rectangle regionRect, @@ -5462,9 +5367,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future setScreenCaptureContentHint(VideoContentHint contentHint); /// Updates the screen capturing region. @@ -5475,9 +5377,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future updateScreenCaptureRegion(Rectangle regionRect); /// Updates the screen capturing parameters. @@ -5489,9 +5388,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future updateScreenCaptureParameters( ScreenCaptureParameters captureParams); @@ -5517,13 +5413,11 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is null. Future startScreenCapture(ScreenCaptureParameters2 captureParams); /// Starts screen capture. /// - /// This method, as well as startScreenCapture, startScreenCaptureByDisplayId, and startScreenCaptureByWindowId, all have the capability to start screen capture, with the following differences: startScreenCapture only applies to Android and iOS, whereas this method only applies to Windows and iOS. startScreenCaptureByDisplayId and startScreenCaptureByWindowId only support capturing video from a single screen or window. By calling this method and specifying the sourceType parameter, you can capture multiple video streams used for local video mixing or multi-channel publishing. + /// This method, as well as startScreenCapture, startScreenCaptureByDisplayId, and startScreenCaptureByWindowId, can all be used to start screen capture, with the following differences: startScreenCapture only applies to Android and iOS, whereas this method only applies to Windows and iOS. startScreenCaptureByDisplayId and startScreenCaptureByWindowId only support capturing video from a single screen or window. By calling this method and specifying the sourceType parameter, you can capture multiple video streams used for local video mixing or multi-channel publishing. /// This method applies to the macOS and Windows only. /// If you call this method to start screen capture, Agora recommends that you call stopScreenCaptureBySourceType to stop the capture and avoid using stopScreenCapture. /// @@ -5550,9 +5444,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -8: The screen sharing state is invalid. Probably because you have shared other screens or windows. Try calling stopScreenCapture to stop the current sharing and start sharing the screen again. Future updateScreenCapture(ScreenCaptureParameters2 captureParams); /// Queries the highest frame rate supported by the device during screen sharing. @@ -5570,7 +5461,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setScreenCaptureScenario(ScreenScenarioType screenScenario); /// Stops screen capture. @@ -5579,7 +5469,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopScreenCapture(); /// Stops screen capture. @@ -5592,7 +5481,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopScreenCaptureBySourceType(VideoSourceType sourceType); /// Retrieves the call ID. @@ -5613,9 +5501,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2 (ERR_INVALID_ARGUMENT). - /// -3 (ERR_NOT_READY). Future rate( {required String callId, required int rating, @@ -5630,13 +5515,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// - 3: The SDK is not ready. Possible reasons include the following: - /// The initialization of RtcEngine fails. Reinitialize the RtcEngine. - /// No user has joined the channel when the method is called. Please check your code logic. - /// The user has not left the channel when the rate or complain method is called. Please check your code logic. - /// The audio module is disabled. The program is not complete. Future complain({required String callId, required String description}); /// Starts pushing media streams to a CDN without transcoding. @@ -5649,10 +5527,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithoutTranscoding(String url); /// Starts Media Push and sets the transcoding configuration. @@ -5667,10 +5541,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithTranscoding( {required String url, required LiveTranscoding transcoding}); @@ -5682,20 +5552,8 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateRtmpTranscoding(LiveTranscoding transcoding); - /// Stops pushing media streams to a CDN. - /// - /// Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. - /// - /// * [url] The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future stopRtmpStream(String url); - /// Starts the local video mixing. /// /// After calling this method, you can merge multiple video streams into one video stream locally. For example, you can merge the video streams captured by the camera, screen sharing, media player, remote video, video files, images, etc. into one video stream, and then publish the mixed video stream to the channel. @@ -5713,7 +5571,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startLocalVideoTranscoder(LocalTranscoderConfiguration config); /// Updates the local video mixing configuration. @@ -5724,10 +5581,19 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateLocalTranscoderConfiguration( LocalTranscoderConfiguration config); + /// Stops pushing media streams to a CDN. + /// + /// Agora recommends that you use the server-side Media Push function. You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times. After you call this method, the SDK triggers the onRtmpStreamingStateChanged callback on the local client to report the state of the streaming. + /// + /// * [url] The address of Media Push. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + Future stopRtmpStream(String url); + /// Stops the local video mixing. /// /// After calling startLocalVideoTranscoder, call this method if you want to stop the local video mixing. @@ -5759,7 +5625,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopCameraCapture(VideoSourceType sourceType); /// Sets the rotation angle of the captured video. @@ -5773,7 +5638,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setCameraDeviceOrientation( {required VideoSourceType type, required VideoOrientation orientation}); @@ -5791,14 +5655,12 @@ abstract class RtcEngine { /// Adds event handlers /// - /// The SDK uses the RtcEngineEventHandler class to send callbacks to the app. The app inherits the methods of this class to receive these callbacks. All methods in this class have default (empty) implementations. Therefore, apps only need to inherits callbacks according to the scenarios. In the callbacks, avoid time-consuming tasks or calling APIs that can block the thread, such as the sendStreamMessage method. - /// Otherwise, the SDK may not work properly. + /// The SDK uses the RtcEngineEventHandler class to send callbacks to the app. The app inherits the methods of this class to receive these callbacks. All methods in this class have default (empty) implementations. Therefore, apps only need to inherits callbacks according to the scenarios. In the callbacks, avoid time-consuming tasks or calling APIs that can block the thread, such as the sendStreamMessage method. Otherwise, the SDK may not work properly. /// /// * [eventHandler] Callback events to be added. See RtcEngineEventHandler. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void registerEventHandler(RtcEngineEventHandler eventHandler); /// Removes the specified callback handler. @@ -5830,7 +5692,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEncryptionMode(String encryptionMode); /// Enables built-in encryption with an encryption password before users join a channel. @@ -5843,7 +5704,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setEncryptionSecret(String secret); /// Enables or disables the built-in encryption. @@ -5855,10 +5715,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: An invalid parameter is used. Set the parameter with a valid value. - /// -4: The built-in encryption mode is incorrect or the SDK fails to load the external encryption library. Check the enumeration or reload the external encryption library. - /// -7: The SDK is not initialized. Initialize the RtcEngine instance before calling this method. Future enableEncryption( {required bool enabled, required EncryptionConfig config}); @@ -5878,8 +5734,7 @@ abstract class RtcEngine { /// Sends data stream messages to all users in a channel. The SDK has the following restrictions on this method: /// Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 KB. /// Each client can send up to 6 KB of data per second. - /// Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. - /// A failed method call triggers the onStreamMessageError callback on the remote client. + /// Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client. /// Ensure that you call createDataStream to create a data channel before calling this method. /// In live streaming scenarios, this method only applies to hosts. /// @@ -5889,7 +5744,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future sendStreamMessage( {required int streamId, required Uint8List data, required int length}); @@ -5903,7 +5757,6 @@ abstract class RtcEngine { /// If you only want to add a watermark to the media push, you can call this method or the method. /// This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray. /// If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings. - /// If you have enabled the local video preview by calling the startPreview method, you can use the visibleInPreview member to set whether or not the watermark is visible in the preview. /// If you have enabled the mirror mode for the local video, the watermark on the local video is also mirrored. To avoid mirroring the watermark, Agora recommends that you do not use the mirror and watermark functions for the local video at the same time. You can implement the watermark function in your application layer. /// /// * [watermarkUrl] The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path. @@ -5911,7 +5764,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future addVideoWatermark( {required String watermarkUrl, required WatermarkOptions options}); @@ -5919,7 +5771,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future clearVideoWatermarks(); /// @nodoc @@ -5936,7 +5787,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableWebSdkInteroperability(bool enabled); /// Reports customized messages. @@ -5977,7 +5827,7 @@ abstract class RtcEngine { /// @nodoc Future startAudioFrameDump( {required String channelId, - required int userId, + required int uid, required String location, required String uuid, required String passwd, @@ -5986,9 +5836,7 @@ abstract class RtcEngine { /// @nodoc Future stopAudioFrameDump( - {required String channelId, - required int userId, - required String location}); + {required String channelId, required int uid, required String location}); /// Sets whether to enable the AI ​​noise suppression function and set the noise suppression mode. /// @@ -5998,14 +5846,14 @@ abstract class RtcEngine { /// Machinery, etc. Non-stationary noise refers to noise signal with huge fluctuations of level within the period of observation; common sources of non-stationary noises are: /// Thunder; /// Explosion; - /// Cracking, etc. Agora does not recommend enabling this function on devices running Android 6.0 and below. + /// Cracking, etc. + /// Agora does not recommend enabling this function on devices running Android 6.0 and below. /// /// * [enabled] Whether to enable the AI noise suppression function: true : Enable the AI noise suppression. false : (Default) Disable the AI noise suppression. /// * [mode] The AI noise suppression modes. See AudioAinsMode. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAINSMode( {required bool enabled, required AudioAinsMode mode}); @@ -6028,7 +5876,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future registerLocalUserAccount( {required String appId, required String userAccount}); @@ -6092,7 +5939,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future joinChannelWithUserAccountEx( {required String token, required String channelId, @@ -6143,41 +5989,6 @@ abstract class RtcEngine { Future startOrUpdateChannelMediaRelay( ChannelMediaRelayConfiguration configuration); - /// Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels. - /// - /// Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelay instead. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay. - /// If the onChannelMediaRelayStateChanged callback returns relayStateRunning (2) and relayOk (0), and the onChannelMediaRelayEvent callback returns relayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel. - /// If the onChannelMediaRelayStateChanged callback returns relayStateFailure (3), an exception occurs during the media stream relay. - /// Call this method after joining the channel. - /// This method takes effect only when you are a host in a live streaming channel. - /// After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelay method to quit the current relay. - /// The relaying media streams across channels function needs to be enabled by contacting. - /// Agora does not support string user accounts in this API. - /// - /// * [configuration] The configuration of the media stream relay. See ChannelMediaRelayConfiguration. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). - /// -2: The parameter is invalid. - /// -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not a host. - /// -8: Internal state error. Probably because the user is not a broadcaster. - Future startChannelMediaRelay( - ChannelMediaRelayConfiguration configuration); - - /// Updates the channels for media stream relay. - /// - /// Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelay instead. After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method. After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the relayEventPacketUpdateDestChannel (7) state code. Call the method after successfully calling the startChannelMediaRelay method and receiving onChannelMediaRelayStateChanged (relayStateRunning, relayOk); otherwise, the method call fails. - /// - /// * [configuration] The configuration of the media stream relay. See ChannelMediaRelayConfiguration. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future updateChannelMediaRelay( - ChannelMediaRelayConfiguration configuration); - /// Stops the media stream relay. Once the relay stops, the host quits all the target channels. /// /// After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports relayStateIdle (0) and relayOk (0), the host successfully stops the relay. If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the relayErrorServerNoResponse (2) or relayErrorServerConnectionLost (8) status code. You can call the leaveChannel method to leave the channel, and the media stream relay automatically stops. @@ -6193,7 +6004,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAllChannelMediaRelay(); /// Resumes the media stream relay to all target channels. @@ -6213,7 +6023,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDirectCdnStreamingAudioConfiguration( AudioProfileType profile); @@ -6225,7 +6034,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDirectCdnStreamingVideoConfiguration( VideoEncoderConfiguration config); @@ -6239,7 +6047,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startDirectCdnStreaming( {required DirectCdnStreamingEventHandler eventHandler, required String publishUrl, @@ -6249,7 +6056,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopDirectCdnStreaming(); /// @nodoc @@ -6269,8 +6075,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -22: Cannot find audio effect files. Please set the correct paths for sound1 and sound2. Future startRhythmPlayer( {required String sound1, required String sound2, @@ -6282,7 +6086,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopRhythmPlayer(); /// Configures the virtual metronome. @@ -6295,7 +6098,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future configRhythmPlayer(AgoraRhythmPlayerConfig config); /// Takes a snapshot of a video stream. @@ -6314,7 +6116,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future takeSnapshot({required int uid, required String filePath}); /// Enables or disables video screenshot and upload. @@ -6326,13 +6127,12 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableContentInspect( {required bool enabled, required ContentInspectConfig config}); /// Adjusts the volume of the custom audio track played remotely. /// - /// Ensure you have called the createCustomAudioTrack method to create a custom audio track before calling this method. If you want to change the volume of the audio to be published, you need to call this method again. + /// Ensure you have called the createCustomAudioTrack method to create a custom audio track before calling this method. If you want to change the volume of the audio played remotely, you need to call this method again. /// /// * [trackId] The audio track ID. Set this parameter to the custom audio track ID returned in createCustomAudioTrack. /// * [volume] The volume of the audio source. The value can range from 0 to 100. 0 means mute; 100 means the original volume. @@ -6367,9 +6167,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The parameter is invalid. - /// -7: The SDK is not initialized. Future setCloudProxy(CloudProxyType proxyType); /// @nodoc @@ -6383,7 +6180,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setAdvancedAudioOptions( {required AdvancedAudioOptions options, int sourceType = 0}); @@ -6438,7 +6234,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setParameters(String parameters); /// Enables tracing the video frame rendering process. @@ -6449,8 +6244,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -7: The method is called before RtcEngine is initialized. Future startMediaRenderingTracing(); /// Enables audio and video frame instant rendering. @@ -6461,8 +6254,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -7: The method is called before RtcEngine is initialized. Future enableInstantMediaRendering(); /// Gets the current NTP (Network Time Protocol) time. @@ -6483,6 +6274,15 @@ abstract class RtcEngine { /// true : The current device supports the specified feature. false : The current device does not support the specified feature. Future isFeatureAvailableOnDevice(FeatureType type); + /// Releases the RtcEngine instance. + /// + /// This method releases all resources used by the Agora SDK. Use this method for apps in which users occasionally make voice or video calls. When users do not make calls, you can free up resources for other operations. After a successful method call, you can no longer use any method or callback in the SDK anymore. If you want to use the real-time communication functions again, you must call createAgoraRtcEngine and initialize to create a new RtcEngine instance. + /// This method can be called synchronously. You need to wait for the resource of RtcEngine to be released before performing other operations (for example, create a new RtcEngine object). Therefore, Agora recommends calling this method in the child thread to avoid blocking the main thread. + /// Besides, Agora does not recommend you calling release in any callback of the SDK. Otherwise, the SDK cannot release the resources until the callbacks return results, which may result in a deadlock. + /// + /// * [sync] Whether the method is called synchronously: true : Synchronous call. false : Asynchronous call. Currently this method only supports synchronous calls. Do not set this parameter to this value. + Future release({bool sync = false}); + /// Gets the AudioDeviceManager object to manage audio devices. /// /// Returns @@ -6517,6 +6317,9 @@ abstract class RtcEngine { /// One LocalSpatialAudioEngine object. LocalSpatialAudioEngine getLocalSpatialAudioEngine(); + /// @nodoc + H265Transcoder getH265Transcoder(); + /// Sends media metadata. /// /// If the metadata is sent successfully, the SDK triggers the onMetadataReceived callback on the receiver. @@ -6547,7 +6350,6 @@ abstract class RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. void unregisterAudioEncodedFrameObserver(AudioEncodedFrameObserver observer); /// Gets the C++ handle of the Native SDK. @@ -6587,7 +6389,7 @@ extension QualityReportFormatTypeExt on QualityReportFormatType { /// Media device states. @JsonEnum(alwaysCreate: true) enum MediaDeviceStateType { - /// @nodoc + /// 0: The device is ready for use. @JsonValue(0) mediaDeviceStateIdle, diff --git a/lib/src/agora_rtc_engine.g.dart b/lib/src/agora_rtc_engine.g.dart index 26e9e78cc..ffbf86802 100644 --- a/lib/src/agora_rtc_engine.g.dart +++ b/lib/src/agora_rtc_engine.g.dart @@ -609,6 +609,7 @@ ChannelMediaOptions _$ChannelMediaOptionsFromJson(Map json) => publishMediaPlayerVideoTrack: json['publishMediaPlayerVideoTrack'] as bool?, publishTranscodedVideoTrack: json['publishTranscodedVideoTrack'] as bool?, + publishMixedAudioTrack: json['publishMixedAudioTrack'] as bool?, autoSubscribeAudio: json['autoSubscribeAudio'] as bool?, autoSubscribeVideo: json['autoSubscribeVideo'] as bool?, enableAudioRecordingOrPlayout: @@ -665,6 +666,7 @@ Map _$ChannelMediaOptionsToJson(ChannelMediaOptions instance) { 'publishMediaPlayerVideoTrack', instance.publishMediaPlayerVideoTrack); writeNotNull( 'publishTranscodedVideoTrack', instance.publishTranscodedVideoTrack); + writeNotNull('publishMixedAudioTrack', instance.publishMixedAudioTrack); writeNotNull('autoSubscribeAudio', instance.autoSubscribeAudio); writeNotNull('autoSubscribeVideo', instance.autoSubscribeVideo); writeNotNull( @@ -1089,13 +1091,13 @@ const _$MaxMetadataSizeTypeEnumMap = { MaxMetadataSizeType.maxMetadataSizeInByte: 1024, }; -const _$DirectCdnStreamingErrorEnumMap = { - DirectCdnStreamingError.directCdnStreamingErrorOk: 0, - DirectCdnStreamingError.directCdnStreamingErrorFailed: 1, - DirectCdnStreamingError.directCdnStreamingErrorAudioPublication: 2, - DirectCdnStreamingError.directCdnStreamingErrorVideoPublication: 3, - DirectCdnStreamingError.directCdnStreamingErrorNetConnect: 4, - DirectCdnStreamingError.directCdnStreamingErrorBadName: 5, +const _$DirectCdnStreamingReasonEnumMap = { + DirectCdnStreamingReason.directCdnStreamingReasonOk: 0, + DirectCdnStreamingReason.directCdnStreamingReasonFailed: 1, + DirectCdnStreamingReason.directCdnStreamingReasonAudioPublication: 2, + DirectCdnStreamingReason.directCdnStreamingReasonVideoPublication: 3, + DirectCdnStreamingReason.directCdnStreamingReasonNetConnect: 4, + DirectCdnStreamingReason.directCdnStreamingReasonBadName: 5, }; const _$DirectCdnStreamingStateEnumMap = { diff --git a/lib/src/agora_rtc_engine_ex.dart b/lib/src/agora_rtc_engine_ex.dart index 085c556d7..739f8d2ef 100644 --- a/lib/src/agora_rtc_engine_ex.dart +++ b/lib/src/agora_rtc_engine_ex.dart @@ -64,7 +64,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future leaveChannelEx( {required RtcConnection connection, LeaveChannelOptions? options}); @@ -75,10 +74,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The value of a member in the ChannelMediaOptions structure is invalid. For example, the token or the user ID is invalid. You need to fill in a valid parameter. - /// -7: The RtcEngine object has not been initialized. You need to initialize the RtcEngine object before calling this method. - /// -8: The internal state of the RtcEngine object is wrong. The possible reason is that the user is not in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. If you receive the connectionStateDisconnected (1) or connectionStateFailed (5) state, the user is not in the channel. You need to call joinChannel to join a channel before calling this method. Future updateChannelMediaOptionsEx( {required ChannelMediaOptions options, required RtcConnection connection}); @@ -92,7 +87,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setVideoEncoderConfigurationEx( {required VideoEncoderConfiguration config, required RtcConnection connection}); @@ -118,7 +112,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteRemoteAudioStreamEx( {required int uid, required bool mute, @@ -140,17 +133,16 @@ abstract class RtcEngineEx implements RtcEngine { required bool mute, required RtcConnection connection}); - /// Sets the stream type of the remote video. + /// Sets the video stream type to subscribe to. /// - /// Under limited network conditions, if the publisher has not disabled the dual-stream mode using enableDualStreamModeEx (false), the receiver can choose to receive either the high-quality video stream or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, and the low-quality video stream has a lower resolution and bitrate. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources. The aspect ratio of the low-quality video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-quality video stream. The SDK enables the low-quality video stream auto mode on the sender by default (not actively sending low-quality video streams). The host at the receiving end can call this method to initiate a low-quality video stream stream request on the receiving end, and the sender automatically switches to the low-quality video stream mode after receiving the request. + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling this method, and the sender will automatically start sending low-quality video stream upon receiving the request. By default, users receive the high-quality video stream. Call this method if you want to switch to the low-quality video stream. The SDK will dynamically adjust the size of the corresponding video stream based on the size of the video window to save bandwidth and computing resources. The default aspect ratio of the low-quality video stream is the same as that of the high-quality video stream. According to the current aspect ratio of the high-quality video stream, the system will automatically allocate the resolution, frame rate, and bitrate of the low-quality video stream. Under limited network conditions, if the publisher does not disable the dual-stream mode using enableDualStreamModeEx (false), the receiver can choose to receive either the high-quality video stream, or the low-quality video stream. The high-quality video stream has a higher resolution and bitrate, while the low-quality video stream has a lower resolution and bitrate. /// /// * [uid] The user ID. - /// * [streamType] The video stream type: VideoStreamType. + /// * [streamType] The video stream type, see VideoStreamType. /// * [connection] The connection information. See RtcConnection. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoStreamTypeEx( {required int uid, required VideoStreamType streamType, @@ -165,7 +157,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalAudioStreamEx( {required bool mute, required RtcConnection connection}); @@ -179,7 +170,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteLocalVideoStreamEx( {required bool mute, required RtcConnection connection}); @@ -194,7 +184,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteAudioStreamsEx( {required bool mute, required RtcConnection connection}); @@ -207,7 +196,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future muteAllRemoteVideoStreamsEx( {required bool mute, required RtcConnection connection}); @@ -225,7 +213,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioBlocklistEx( {required List uidList, required int uidNumber, @@ -245,7 +232,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeAudioAllowlistEx( {required List uidList, required int uidNumber, @@ -265,7 +251,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoBlocklistEx( {required List uidList, required int uidNumber, @@ -285,7 +270,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setSubscribeVideoAllowlistEx( {required List uidList, required int uidNumber, @@ -301,7 +285,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVideoSubscriptionOptionsEx( {required int uid, required VideoSubscriptionOptions options, @@ -323,7 +306,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteVoicePositionEx( {required int uid, required double pan, @@ -370,7 +352,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableLoopbackRecordingEx( {required RtcConnection connection, required bool enabled, @@ -396,7 +377,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future adjustUserPlaybackSignalVolumeEx( {required int uid, required int volume, @@ -436,8 +416,7 @@ abstract class RtcEngineEx implements RtcEngine { /// After calling createDataStreamEx, you can call this method to send data stream messages to all users in the channel. The SDK has the following restrictions on this method: /// Up to 60 packets can be sent per second in a channel with each packet having a maximum size of 1 KB. /// Each client can send up to 30 KB of data per second. - /// Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. - /// A failed method call triggers the onStreamMessageError callback on the remote client. + /// Each user can have up to five data streams simultaneously. A successful method call triggers the onStreamMessage callback on the remote client, from which the remote user gets the stream message. A failed method call triggers the onStreamMessageError callback on the remote client. /// Ensure that you call createDataStreamEx to create a data channel before calling this method. /// This method applies only to the COMMUNICATION profile or to the hosts in the LIVE_BROADCASTING profile. If an audience in the LIVE_BROADCASTING profile calls this method, the audience may be switched to a host. /// @@ -448,7 +427,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future sendStreamMessageEx( {required int streamId, required Uint8List data, @@ -473,7 +451,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future addVideoWatermarkEx( {required String watermarkUrl, required WatermarkOptions options, @@ -485,7 +462,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future clearVideoWatermarkEx(RtcConnection connection); /// Agora supports reporting and analyzing customized messages. @@ -505,7 +481,7 @@ abstract class RtcEngineEx implements RtcEngine { /// /// * [interval] Sets the time interval between two consecutive volume indications: /// ≤ 0: Disables the volume indication. - /// > 0: Time interval (ms) between two consecutive volume indications. The lowest value is 50. + /// > 0: Time interval (ms) between two consecutive volume indications. Ensure this parameter is set to a value greater than 10, otherwise you will not receive the onAudioVolumeIndication callback. Agora recommends that this value is set as greater than 100. /// * [smooth] The smoothing factor that sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The recommended value is 3. The greater the value, the more sensitive the indicator. /// * [reportVad] true : Enables the voice activity detection of the local user. Once it is enabled, the vad parameter of the onAudioVolumeIndication callback reports the voice activity status of the local user. false : (Default) Disables the voice activity detection of the local user. Once it is disabled, the vad parameter of the onAudioVolumeIndication callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user. /// * [connection] The connection information. See RtcConnection. @@ -530,10 +506,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithoutTranscodingEx( {required String url, required RtcConnection connection}); @@ -551,10 +523,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -2: The URL is null or the string length is 0. - /// -7: The SDK is not initialized before calling this method. - /// -19: The Media Push URL is already in use, use another URL instead. Future startRtmpStreamWithTranscodingEx( {required String url, required LiveTranscoding transcoding, @@ -569,7 +537,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateRtmpTranscodingEx( {required LiveTranscoding transcoding, required RtcConnection connection}); @@ -582,7 +549,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopRtmpStreamEx( {required String url, required RtcConnection connection}); @@ -610,45 +576,6 @@ abstract class RtcEngineEx implements RtcEngine { {required ChannelMediaRelayConfiguration configuration, required RtcConnection connection}); - /// Starts relaying media streams across channels. This method can be used to implement scenarios such as co-host across channels. - /// - /// Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead. After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay. - /// If the onChannelMediaRelayStateChanged callback returns relayStateRunning (2) and relayOk (0), and the onChannelMediaRelayEvent callback returns relayEventPacketSentToDestChannel (4), it means that the SDK starts relaying media streams between the source channel and the target channel. - /// If the onChannelMediaRelayStateChanged callback returns relayStateFailure (3), an exception occurs during the media stream relay. - /// Call this method after joining the channel. - /// This method takes effect only when you are a host in a live streaming channel. - /// After a successful method call, if you want to call this method again, ensure that you call the stopChannelMediaRelayEx method to quit the current relay. - /// The relaying media streams across channels function needs to be enabled by contacting. - /// Agora does not support string user accounts in this API. - /// - /// * [configuration] The configuration of the media stream relay. See ChannelMediaRelayConfiguration. - /// * [connection] The connection information. See RtcConnection. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - /// -1: A general error occurs (no specified reason). - /// -2: The parameter is invalid. - /// -7: The method call was rejected. It may be because the SDK has not been initialized successfully, or the user role is not a host. - /// -8: Internal state error. Probably because the user is not a broadcaster. - Future startChannelMediaRelayEx( - {required ChannelMediaRelayConfiguration configuration, - required RtcConnection connection}); - - /// Updates the channels for media stream relay. - /// - /// Deprecated: This method is deprecated. Use startOrUpdateChannelMediaRelayEx instead. After the media relay starts, if you want to relay the media stream to more channels, or leave the current relay channel, you can call this method. After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the relayEventPacketUpdateDestChannel (7) state code. Call the method after successfully calling the startChannelMediaRelayEx method and receiving onChannelMediaRelayStateChanged (relayStateRunning, relayOk); otherwise, the method call fails. - /// - /// * [configuration] The configuration of the media stream relay. See ChannelMediaRelayConfiguration. - /// * [connection] The connection information. See RtcConnection. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future updateChannelMediaRelayEx( - {required ChannelMediaRelayConfiguration configuration, - required RtcConnection connection}); - /// Stops the media stream relay. Once the relay stops, the host quits all the target channels. /// /// After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback reports relayStateIdle (0) and relayOk (0), the host successfully stops the relay. If the method call fails, the SDK triggers the onChannelMediaRelayStateChanged callback with the relayErrorServerNoResponse (2) or relayErrorServerConnectionLost (8) status code. You can call the leaveChannel method to leave the channel, and the media stream relay automatically stops. @@ -668,7 +595,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future pauseAllChannelMediaRelayEx(RtcConnection connection); /// Resumes the media stream relay to all target channels. @@ -697,12 +623,11 @@ abstract class RtcEngineEx implements RtcEngine { /// Low-quality video stream: Low bitrate, low resolution. This method is applicable to all types of streams from the sender, including but not limited to video streams collected from cameras, screen sharing streams, and custom-collected video streams. /// /// * [enabled] Whether to enable dual-stream mode: true : Enable dual-stream mode. false : (Default) Disable dual-stream mode. - /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. + /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to disableSimulcastStream, setting streamConfig will not take effect. /// * [connection] The connection information. See RtcConnection. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableDualStreamModeEx( {required bool enabled, required SimulcastStreamConfig streamConfig, @@ -710,18 +635,19 @@ abstract class RtcEngineEx implements RtcEngine { /// Sets the dual-stream mode on the sender side. /// - /// The SDK enables the low-quality video stream auto mode on the sender by default, which is equivalent to calling this method and setting the mode to autoSimulcastStream. If you want to modify this behavior, you can call this method and modify the mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). The difference and connection between this method and enableDualStreamModeEx is as follows: + /// The SDK defaults to enabling low-quality video stream adaptive mode (autoSimulcastStream) on the sender side, which means the sender does not actively send low-quality video stream. The receiver can initiate a low-quality video stream request by calling setRemoteVideoStreamTypeEx, and the sender will automatically start sending low-quality video stream upon receiving the request. + /// If you want to modify this behavior, you can call this method and set mode to disableSimulcastStream (never send low-quality video streams) or enableSimulcastStream (always send low-quality video streams). + /// If you want to restore the default behavior after making changes, you can call this method again with mode set to autoSimulcastStream. The difference and connection between this method and enableDualStreamModeEx is as follows: /// When calling this method and setting mode to disableSimulcastStream, it has the same effect as enableDualStreamModeEx (false). /// When calling this method and setting mode to enableSimulcastStream, it has the same effect as enableDualStreamModeEx (true). /// Both methods can be called before and after joining a channel. If both methods are used, the settings in the method called later takes precedence. /// /// * [mode] The mode in which the video stream is sent. See SimulcastStreamMode. - /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. + /// * [streamConfig] The configuration of the low-quality video stream. See SimulcastStreamConfig. When setting mode to disableSimulcastStream, setting streamConfig will not take effect. /// * [connection] The connection information. See RtcConnection. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setDualStreamModeEx( {required SimulcastStreamMode mode, required SimulcastStreamConfig streamConfig, @@ -751,7 +677,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future takeSnapshotEx( {required RtcConnection connection, required int uid, @@ -767,7 +692,6 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future enableContentInspectEx( {required bool enabled, required ContentInspectConfig config, @@ -782,6 +706,9 @@ abstract class RtcEngineEx implements RtcEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startMediaRenderingTracingEx(RtcConnection connection); + + /// @nodoc + Future setParametersEx( + {required RtcConnection connection, required String parameters}); } diff --git a/lib/src/agora_rtc_engine_ext.dart b/lib/src/agora_rtc_engine_ext.dart index 72f90c5fb..35943ad45 100644 --- a/lib/src/agora_rtc_engine_ext.dart +++ b/lib/src/agora_rtc_engine_ext.dart @@ -40,8 +40,8 @@ class AgoraRtcException implements Exception { /// /// Returns /// One RtcEngine object. -RtcEngine createAgoraRtcEngine() { - return impl.RtcEngineImpl.create(); +RtcEngine createAgoraRtcEngine({Object? sharedNativeHandle}) { + return impl.RtcEngineImpl.create(sharedNativeHandle: sharedNativeHandle); } /// Creates one RtcEngineEx object. @@ -50,8 +50,8 @@ RtcEngine createAgoraRtcEngine() { /// /// Returns /// One RtcEngineEx object. -RtcEngineEx createAgoraRtcEngineEx() { - return impl.RtcEngineImpl.create(); +RtcEngineEx createAgoraRtcEngineEx({Object? sharedNativeHandle}) { + return impl.RtcEngineImpl.create(sharedNativeHandle: sharedNativeHandle); } /// Gets one MediaPlayerCacheManager instance. diff --git a/lib/src/agora_spatial_audio.dart b/lib/src/agora_spatial_audio.dart index d680db82e..97c63bf22 100644 --- a/lib/src/agora_spatial_audio.dart +++ b/lib/src/agora_spatial_audio.dart @@ -7,11 +7,11 @@ class RemoteVoicePositionInfo { /// @nodoc const RemoteVoicePositionInfo({this.position, this.forward}); - /// The coordinates in the world coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. + /// @nodoc @JsonKey(name: 'position') final List? position; - /// The unit vector of the x axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. + /// @nodoc @JsonKey(name: 'forward') final List? forward; @@ -86,172 +86,13 @@ class SpatialAudioZone { Map toJson() => _$SpatialAudioZoneToJson(this); } -/// This class contains some of the APIs in the LocalSpatialAudioEngine class. -/// -/// The LocalSpatialAudioEngine class inherits from BaseSpatialAudioEngine. -abstract class BaseSpatialAudioEngine { - /// Destroys BaseSpatialAudioEngine. - /// - /// This method releases all resources under BaseSpatialAudioEngine. When the user does not need to use the spatial audio effect, you can call this method to release resources for other operations. After calling this method, you can no longer use any of the APIs under BaseSpatialAudioEngine. Call this method before the release method under RtcEngine. - Future release(); - - /// Sets the maximum number of streams that a user can receive in a specified audio reception range. - /// - /// If the number of receivable streams exceeds the set value, the local user receives the maxCount streams that are closest to the local user. - /// - /// * [maxCount] The maximum number of streams that a user can receive within a specified audio reception range. The value of this parameter should be ≤ 16, and the default value is 10. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future setMaxAudioRecvCount(int maxCount); - - /// Sets the audio reception range of the local user. - /// - /// After the setting is successful, the local user can only hear the remote users within the setting range or belonging to the same team. You can call this method at any time to update the audio reception range. - /// - /// * [range] The maximum audio reception range. The unit is meters. The value of this parameter must be greater than 0, and the default value is 20. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future setAudioRecvRange(double range); - - /// Sets the length (in meters) of the game engine distance per unit. - /// - /// In a game engine, the unit of distance is customized, while in the Agora spatial audio algorithm, distance is measured in meters. By default, the SDK converts the game engine distance per unit to one meter. You can call this method to convert the game engine distance per unit to a specified number of meters. - /// - /// * [unit] The number of meters that the game engine distance per unit is equal to. The value of this parameter must be greater than 0.00, and the default value is 1.00. For example, setting unit as 2.00 means the game engine distance per unit equals 2 meters. The larger the value is, the faster the sound heard by the local user attenuates when the remote user moves far away from the local user. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future setDistanceUnit(double unit); - - /// Updates the spatial position of the local user. - /// - /// Under the LocalSpatialAudioEngine class, this method needs to be used with updateRemotePosition. The SDK calculates the relative position between the local and remote users according to this method and the parameter settings in updateRemotePosition, and then calculates the user's spatial audio effect parameters. - /// - /// * [position] The coordinates in the world coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. - /// * [axisForward] The unit vector of the x axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. - /// * [axisRight] The unit vector of the y axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. - /// * [axisUp] The unit vector of the z axis in the coordinate system. This parameter is an array of length 3, and the three values represent the front, right, and top coordinates in turn. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future updateSelfPosition( - {required List position, - required List axisForward, - required List axisRight, - required List axisUp}); - - /// @nodoc - Future updateSelfPositionEx( - {required List position, - required List axisForward, - required List axisRight, - required List axisUp, - required RtcConnection connection}); - - /// Updates the spatial position of the media player. - /// - /// After a successful update, the local user can hear the change in the spatial position of the media player. - /// - /// * [playerId] The ID of the media player. - /// * [positionInfo] The spatial position of the media player. See RemoteVoicePositionInfo. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future updatePlayerPositionInfo( - {required int playerId, required RemoteVoicePositionInfo positionInfo}); - - /// @nodoc - Future setParameters(String params); - - /// Stops or resumes publishing the local audio stream. - /// - /// This method does not affect any ongoing audio recording, because it does not disable the audio capture device. - /// Call this method after joinChannel. - /// When using the spatial audio effect, if you need to set whether to stop subscribing to the audio stream of a specified user, Agora recommends calling this method instead of the muteLocalAudioStream method in RtcEngine. - /// A successful call of this method triggers the onUserMuteAudio and onRemoteAudioStateChanged callbacks on the remote client. - /// - /// * [mute] Whether to stop publishing the local audio stream: true : Stop publishing the local audio stream. false : Publish the local audio stream. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future muteLocalAudioStream(bool mute); - - /// Stops or resumes subscribing to the audio streams of all remote users. - /// - /// After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users. - /// Call this method after joinChannel. - /// When using the spatial audio effect, if you need to set whether to stop subscribing to the audio streams of all remote users, Agora recommends calling this method instead of the muteAllRemoteAudioStreams method in RtcEngine. - /// After calling this method, you need to call updateSelfPosition and updateRemotePosition to update the spatial location of the local user and the remote user; otherwise, the settings in this method do not take effect. - /// - /// * [mute] Whether to stop subscribing to the audio streams of all remote users: true : Stop subscribing to the audio streams of all remote users. false : Subscribe to the audio streams of all remote users. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future muteAllRemoteAudioStreams(bool mute); - - /// Sets the sound insulation area. - /// - /// In virtual interactive scenarios, you can use this method to set the sound insulation area and sound attenuation coefficient. When the sound source (which can be the user or the media player) and the listener belong to the inside and outside of the sound insulation area, they can experience the attenuation effect of sound similar to the real environment when it encounters a building partition. - /// When the sound source and the listener belong to the inside and outside of the sound insulation area, the sound attenuation effect is determined by the sound attenuation coefficient in SpatialAudioZone. - /// If the user or media player is in the same sound insulation area, it is not affected by SpatialAudioZone, and the sound attenuation effect is determined by the attenuation parameter in setPlayerAttenuation or setRemoteAudioAttenuation. If you do not call setPlayerAttenuation or setRemoteAudioAttenuation, the default sound attenuation coefficient of the SDK is 0.5, which simulates the attenuation of the sound in the real environment. - /// If the sound source and the receiver belong to two sound insulation areas, the receiver cannot hear the sound source. If this method is called multiple times, the last sound insulation area set takes effect. - /// - /// * [zones] Sound insulation area settings. See SpatialAudioZone. On the Windows platform, it is necessary to ensure that the number of members in the zones array is equal to the value of zoneCount; otherwise, it may cause a crash. - /// * [zoneCount] The number of sound insulation areas. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future setZones( - {required List zones, required int zoneCount}); - - /// Sets the sound attenuation properties of the media player. - /// - /// * [playerId] The ID of the media player. - /// * [attenuation] The sound attenuation coefficient of the remote user or media player. The value range is [0,1]. The values are as follows: - /// 0: Broadcast mode, where the volume and timbre are not attenuated with distance, and the volume and timbre heard by local users do not change regardless of distance. - /// (0,0.5): Weak attenuation mode, that is, the volume and timbre are only weakly attenuated during the propagation process, and the sound can travel farther than the real environment. - /// 0.5: (Default) simulates the attenuation of the volume in the real environment; the effect is equivalent to not setting the speaker_attenuation parameter. - /// (0.5,1]: Strong attenuation mode, that is, the volume and timbre attenuate rapidly during the propagation process. - /// * [forceSet] Whether to force the sound attenuation effect of the media player: true : Force attenuation to set the attenuation of the media player. At this time, the attenuation coefficient of the sound insulation are set in the audioAttenuation in the SpatialAudioZone does not take effect for the media player. false : Do not force attenuation to set the sound attenuation effect of the media player, as shown in the following two cases. - /// If the sound source and listener are inside and outside the sound isolation area, the sound attenuation effect is determined by the audioAttenuation in SpatialAudioZone. - /// If the sound source and the listener are in the same sound insulation area or outside the same sound insulation area, the sound attenuation effect is determined by attenuation in this method. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future setPlayerAttenuation( - {required int playerId, - required double attenuation, - required bool forceSet}); - - /// Stops or resumes subscribing to the audio stream of a specified user. - /// - /// Call this method after joinChannel. - /// When using the spatial audio effect, if you need to set whether to stop subscribing to the audio stream of a specified user, Agora recommends calling this method instead of the muteRemoteAudioStream method in RtcEngine. - /// - /// * [uid] The user ID. This parameter must be the same as the user ID passed in when the user joined the channel. - /// * [mute] Whether to subscribe to the specified remote user's audio stream. true : Stop subscribing to the audio stream of the specified user. false : (Default) Subscribe to the audio stream of the specified user. The SDK decides whether to subscribe according to the distance between the local user and the remote user. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future muteRemoteAudioStream({required int uid, required bool mute}); -} - /// This class calculates user positions through the SDK to implement the spatial audio effect. /// /// This class inherits from BaseSpatialAudioEngine. Before calling other APIs in this class, you need to call the initialize method to initialize this class. -abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { +abstract class LocalSpatialAudioEngine { + /// @nodoc + Future release(); + /// Initializes LocalSpatialAudioEngine. /// /// Before calling other methods of the LocalSpatialAudioEngine class, you need to call this method to initialize LocalSpatialAudioEngine. @@ -259,7 +100,6 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future initialize(); /// Updates the spatial position of the specified remote user. @@ -271,7 +111,6 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future updateRemotePosition( {required int uid, required RemoteVoicePositionInfo posInfo}); @@ -289,25 +128,55 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future removeRemotePosition(int uid); /// @nodoc Future removeRemotePositionEx( {required int uid, required RtcConnection connection}); - /// Removes the spatial positions of all remote users. - /// - /// After successfully calling this method, the local user no longer hears any remote users. After leaving the channel, to avoid wasting resources, you can also call this method to delete the spatial positions of all remote users. - /// - /// Returns - /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. - Future clearRemotePositions(); - /// @nodoc Future clearRemotePositionsEx(RtcConnection connection); + /// @nodoc + Future updateSelfPositionEx( + {required List position, + required List axisForward, + required List axisRight, + required List axisUp, + required RtcConnection connection}); + + /// @nodoc + Future setMaxAudioRecvCount(int maxCount); + + /// @nodoc + Future setAudioRecvRange(double range); + + /// @nodoc + Future setDistanceUnit(double unit); + + /// @nodoc + Future updateSelfPosition( + {required List position, + required List axisForward, + required List axisRight, + required List axisUp}); + + /// @nodoc + Future updatePlayerPositionInfo( + {required int playerId, required RemoteVoicePositionInfo positionInfo}); + + /// @nodoc + Future setParameters(String params); + + /// @nodoc + Future muteLocalAudioStream(bool mute); + + /// @nodoc + Future muteAllRemoteAudioStreams(bool mute); + + /// @nodoc + Future muteRemoteAudioStream({required int uid, required bool mute}); + /// Sets the sound attenuation effect for the specified user. /// /// * [uid] The user ID. This parameter must be the same as the user ID passed in when the user joined the channel. @@ -322,7 +191,24 @@ abstract class LocalSpatialAudioEngine implements BaseSpatialAudioEngine { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRemoteAudioAttenuation( {required int uid, required double attenuation, required bool forceSet}); + + /// @nodoc + Future setZones( + {required List zones, required int zoneCount}); + + /// @nodoc + Future setPlayerAttenuation( + {required int playerId, + required double attenuation, + required bool forceSet}); + + /// Removes the spatial positions of all remote users. + /// + /// After successfully calling this method, the local user no longer hears any remote users. After leaving the channel, to avoid wasting resources, you can also call this method to delete the spatial positions of all remote users. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. + Future clearRemotePositions(); } diff --git a/lib/src/audio_device_manager.dart b/lib/src/audio_device_manager.dart index 47319d9a8..423fddf31 100644 --- a/lib/src/audio_device_manager.dart +++ b/lib/src/audio_device_manager.dart @@ -50,7 +50,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackDevice(String deviceId); /// Retrieves the audio playback device associated with the device ID. @@ -69,10 +68,20 @@ abstract class AudioDeviceManager { /// An AudioDeviceInfo object, which contains the ID and device name of the audio devices. Future getPlaybackDeviceInfo(); - /// @nodoc + /// Sets the volume of the audio playback device. + /// + /// This method applies to Windows only. + /// + /// * [volume] The volume of the audio playback device. The value range is [0,255]. + /// + /// Returns + /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. Future setPlaybackDeviceVolume(int volume); - /// @nodoc + /// Retrieves the volume of the audio playback device. + /// + /// Returns + /// The volume of the audio playback device. The value range is [0,255]. Future getPlaybackDeviceVolume(); /// Sets the audio capture device. @@ -83,7 +92,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRecordingDevice(String deviceId); /// Gets the current audio recording device. @@ -110,10 +118,14 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setRecordingDeviceVolume(int volume); - /// @nodoc + /// Retrieves the volume of the audio recording device. + /// + /// This method applies to Windows only. + /// + /// Returns + /// The volume of the audio recording device. The value range is [0,255]. Future getRecordingDeviceVolume(); /// Sets the loopback device. @@ -127,7 +139,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setLoopbackDevice(String deviceId); /// Gets the current loopback device. @@ -144,7 +155,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future setPlaybackDeviceMute(bool mute); /// Retrieves whether the audio playback device is muted. @@ -161,9 +171,7 @@ abstract class AudioDeviceManager { /// Starts the audio playback device test. /// - /// This method tests whether the audio playback device works properly. Once a user starts the test, the SDK plays an audio file specified by the user. If the user can hear the audio, the playback device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback every 100 ms, reporting uid = 1 and the volume information of the playback device. - /// Ensure that you call this method before joining a channel. - /// This method is for Windows and macOS only. + /// This method tests whether the audio device for local playback works properly. Once a user starts the test, the SDK plays an audio file specified by the user. If the user can hear the audio, the playback device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback every 100 ms, reporting uid = 1 and the volume information of the playback device. The difference between this method and the startEchoTest method is that the former checks if the local audio playback device is working properly, while the latter can check the audio and video devices and network conditions. Ensure that you call this method before joining a channel. After the test is completed, call stopPlaybackDeviceTest to stop the test before joining a channel. /// /// * [testAudioFilePath] The path of the audio file. The data format is string in UTF-8. /// Supported file formats: wav, mp3, m4a, and aac. @@ -171,42 +179,34 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startPlaybackDeviceTest(String testAudioFilePath); /// Stops the audio playback device test. /// - /// This method stops the audio playback device test. You must call this method to stop the test after calling the startPlaybackDeviceTest method. - /// This method is for Windows and macOS only. - /// Ensure that you call this method before joining a channel. + /// This method stops the audio playback device test. You must call this method to stop the test after calling the startPlaybackDeviceTest method. Ensure that you call this method before joining a channel. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopPlaybackDeviceTest(); - /// Starts the audio capture device test. + /// Starts the audio capturing device test. /// - /// This method tests whether the audio capture device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method, which reports uid = 0 and the volume information of the capturing device. - /// This method is for Windows and macOS only. - /// Ensure that you call this method before joining a channel. + /// This method tests whether the audio capturing device works properly. After calling this method, the SDK triggers the onAudioVolumeIndication callback at the time interval set in this method, which reports uid = 0 and the volume information of the capturing device. The difference between this method and the startEchoTest method is that the former checks if the local audio capturing device is working properly, while the latter can check the audio and video devices and network conditions. Ensure that you call this method before joining a channel. After the test is completed, call stopRecordingDeviceTest to stop the test before joining a channel. /// - /// * [indicationInterval] The time interval (ms) at which the SDK triggers the onAudioVolumeIndication callback. Agora recommends setting a value greater than 200 ms. This value must not be less than 10 ms; otherwise, you can not receive the onAudioVolumeIndication callback. + /// * [indicationInterval] The interval (ms) for triggering the onAudioVolumeIndication callback. This value should be set to greater than 10, otherwise, you will not receive the onAudioVolumeIndication callback and the SDK returns the error code -2. Agora recommends that you set this value to 100. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. /// < 0: Failure. + /// -2: Invalid parameters. Check your parameter settings. Future startRecordingDeviceTest(int indicationInterval); - /// Stops the audio capture device test. + /// Stops the audio capturing device test. /// - /// This method stops the audio capture device test. You must call this method to stop the test after calling the startRecordingDeviceTest method. - /// This method is for Windows and macOS only. - /// Ensure that you call this method before joining a channel. + /// This method stops the audio capturing device test. You must call this method to stop the test after calling the startRecordingDeviceTest method. Ensure that you call this method before joining a channel. /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopRecordingDeviceTest(); /// Starts an audio device loopback test. @@ -222,7 +222,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future startAudioDeviceLoopbackTest(int indicationInterval); /// Stops the audio device loopback test. @@ -234,7 +233,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future stopAudioDeviceLoopbackTest(); /// Sets the audio playback device used by the SDK to follow the system default audio playback device. @@ -245,7 +243,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future followSystemPlaybackDevice(bool enable); /// Sets the audio recording device used by the SDK to follow the system default audio recording device. @@ -256,7 +253,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future followSystemRecordingDevice(bool enable); /// Sets whether the loopback device follows the system default playback device. @@ -267,7 +263,6 @@ abstract class AudioDeviceManager { /// /// Returns /// When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown; and you need to catch the exception and handle it accordingly. - /// < 0: Failure. Future followSystemLoopbackDevice(bool enable); /// Releases all the resources occupied by the AudioDeviceManager object. diff --git a/lib/src/binding/agora_base_event_impl.dart b/lib/src/binding/agora_base_event_impl.dart index d0cdb7478..38afa757c 100644 --- a/lib/src/binding/agora_base_event_impl.dart +++ b/lib/src/binding/agora_base_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -23,7 +23,7 @@ class AudioEncodedFrameObserverWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onRecordAudioEncodedFrame': + case 'onRecordAudioEncodedFrame_d930ddc': if (audioEncodedFrameObserver.onRecordAudioEncodedFrame == null) { return true; } @@ -46,7 +46,7 @@ class AudioEncodedFrameObserverWrapper implements EventLoopEventHandler { frameBuffer, length, audioEncodedFrameInfo); return true; - case 'onPlaybackAudioEncodedFrame': + case 'onPlaybackAudioEncodedFrame_d930ddc': if (audioEncodedFrameObserver.onPlaybackAudioEncodedFrame == null) { return true; } @@ -69,7 +69,7 @@ class AudioEncodedFrameObserverWrapper implements EventLoopEventHandler { frameBuffer, length, audioEncodedFrameInfo); return true; - case 'onMixedAudioEncodedFrame': + case 'onMixedAudioEncodedFrame_d930ddc': if (audioEncodedFrameObserver.onMixedAudioEncodedFrame == null) { return true; } diff --git a/lib/src/binding/agora_h265_transcoder_event_impl.dart b/lib/src/binding/agora_h265_transcoder_event_impl.dart new file mode 100644 index 000000000..e092e36f5 --- /dev/null +++ b/lib/src/binding/agora_h265_transcoder_event_impl.dart @@ -0,0 +1,90 @@ +/// GENERATED BY terra, DO NOT MODIFY BY HAND. + +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import +import 'package:agora_rtc_engine/src/binding_forward_export.dart'; +import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; + +class H265TranscoderObserverWrapper implements EventLoopEventHandler { + const H265TranscoderObserverWrapper(this.h265TranscoderObserver); + final H265TranscoderObserver h265TranscoderObserver; + @override + bool operator ==(Object other) { + if (other.runtimeType != runtimeType) { + return false; + } + return other is H265TranscoderObserverWrapper && + other.h265TranscoderObserver == h265TranscoderObserver; + } + + @override + int get hashCode => h265TranscoderObserver.hashCode; + @override + bool handleEventInternal( + String eventName, String eventData, List buffers) { + switch (eventName) { + case 'onEnableTranscode_6ba6646': + if (h265TranscoderObserver.onEnableTranscode == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + H265TranscoderObserverOnEnableTranscodeJson paramJson = + H265TranscoderObserverOnEnableTranscodeJson.fromJson(jsonMap); + paramJson = paramJson.fillBuffers(buffers); + H265TranscodeResult? result = paramJson.result; + if (result == null) { + return true; + } + h265TranscoderObserver.onEnableTranscode!(result); + return true; + + case 'onQueryChannel_31ba3df': + if (h265TranscoderObserver.onQueryChannel == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + H265TranscoderObserverOnQueryChannelJson paramJson = + H265TranscoderObserverOnQueryChannelJson.fromJson(jsonMap); + paramJson = paramJson.fillBuffers(buffers); + H265TranscodeResult? result = paramJson.result; + String? originChannel = paramJson.originChannel; + String? transcodeChannel = paramJson.transcodeChannel; + if (result == null || + originChannel == null || + transcodeChannel == null) { + return true; + } + h265TranscoderObserver.onQueryChannel!( + result, originChannel, transcodeChannel); + return true; + + case 'onTriggerTranscode_6ba6646': + if (h265TranscoderObserver.onTriggerTranscode == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + H265TranscoderObserverOnTriggerTranscodeJson paramJson = + H265TranscoderObserverOnTriggerTranscodeJson.fromJson(jsonMap); + paramJson = paramJson.fillBuffers(buffers); + H265TranscodeResult? result = paramJson.result; + if (result == null) { + return true; + } + h265TranscoderObserver.onTriggerTranscode!(result); + return true; + } + return false; + } + + @override + bool handleEvent( + String eventName, String eventData, List buffers) { + if (!eventName.startsWith('H265TranscoderObserver')) return false; + final newEvent = eventName.replaceFirst('H265TranscoderObserver_', ''); + if (handleEventInternal(newEvent, eventData, buffers)) { + return true; + } + + return false; + } +} diff --git a/lib/src/binding/agora_h265_transcoder_impl.dart b/lib/src/binding/agora_h265_transcoder_impl.dart new file mode 100644 index 000000000..629aba66b --- /dev/null +++ b/lib/src/binding/agora_h265_transcoder_impl.dart @@ -0,0 +1,119 @@ +/// GENERATED BY terra, DO NOT MODIFY BY HAND. + +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides +import 'package:agora_rtc_engine/src/binding_forward_export.dart'; +import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; + +class H265TranscoderImpl implements H265Transcoder { + H265TranscoderImpl(this.irisMethodChannel); + + @protected + final IrisMethodChannel irisMethodChannel; + + @protected + Map createParams(Map param) { + return param; + } + + @protected + bool get isOverrideClassName => false; + + @protected + String get className => 'H265Transcoder'; + + @override + Future enableTranscode( + {required String token, + required String channel, + required int uid}) async { + final apiType = + '${isOverrideClassName ? className : 'H265Transcoder'}_enableTranscode_a0779eb'; + final param = + createParams({'token': token, 'channel': channel, 'uid': uid}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } + + @override + Future queryChannel( + {required String token, + required String channel, + required int uid}) async { + final apiType = + '${isOverrideClassName ? className : 'H265Transcoder'}_queryChannel_a0779eb'; + final param = + createParams({'token': token, 'channel': channel, 'uid': uid}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + return result as int; + } + + @override + Future triggerTranscode( + {required String token, + required String channel, + required int uid}) async { + final apiType = + '${isOverrideClassName ? className : 'H265Transcoder'}_triggerTranscode_a0779eb'; + final param = + createParams({'token': token, 'channel': channel, 'uid': uid}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } + + @override + void registerTranscoderObserver(H265TranscoderObserver observer) { +// Implementation template +// final apiType = '${isOverrideClassName ? className : 'H265Transcoder'}_registerTranscoderObserver_e1ee996'; +// final param = createParams({// 'observer':observer// }); +// final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); +// if (callApiResult.irisReturnCode < 0) { +// throw AgoraRtcException(code: callApiResult.irisReturnCode); +// } +// final rm = callApiResult.data; +// final result = rm['result']; +// if (result < 0) { +// throw AgoraRtcException(code: result); +// } + throw UnimplementedError('Unimplement for registerTranscoderObserver'); + } + + @override + void unregisterTranscoderObserver(H265TranscoderObserver observer) { +// Implementation template +// final apiType = '${isOverrideClassName ? className : 'H265Transcoder'}_unregisterTranscoderObserver_e1ee996'; +// final param = createParams({// 'observer':observer// }); +// final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); +// if (callApiResult.irisReturnCode < 0) { +// throw AgoraRtcException(code: callApiResult.irisReturnCode); +// } +// final rm = callApiResult.data; +// final result = rm['result']; +// if (result < 0) { +// throw AgoraRtcException(code: result); +// } + throw UnimplementedError('Unimplement for unregisterTranscoderObserver'); + } +} diff --git a/lib/src/binding/agora_media_base_event_impl.dart b/lib/src/binding/agora_media_base_event_impl.dart index c98cf6a29..29e6d9af9 100644 --- a/lib/src/binding/agora_media_base_event_impl.dart +++ b/lib/src/binding/agora_media_base_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -23,7 +23,7 @@ class AudioPcmFrameSinkWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onFrame': + case 'onFrame_95f515a': if (audioPcmFrameSink.onFrame == null) { return true; } @@ -73,7 +73,7 @@ class AudioFrameObserverBaseWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onRecordAudioFrame': + case 'onRecordAudioFrame_4c8de15': if (audioFrameObserverBase.onRecordAudioFrame == null) { return true; } @@ -90,7 +90,7 @@ class AudioFrameObserverBaseWrapper implements EventLoopEventHandler { audioFrameObserverBase.onRecordAudioFrame!(channelId, audioFrame); return true; - case 'onPlaybackAudioFrame': + case 'onPlaybackAudioFrame_4c8de15': if (audioFrameObserverBase.onPlaybackAudioFrame == null) { return true; } @@ -107,7 +107,7 @@ class AudioFrameObserverBaseWrapper implements EventLoopEventHandler { audioFrameObserverBase.onPlaybackAudioFrame!(channelId, audioFrame); return true; - case 'onMixedAudioFrame': + case 'onMixedAudioFrame_4c8de15': if (audioFrameObserverBase.onMixedAudioFrame == null) { return true; } @@ -124,7 +124,7 @@ class AudioFrameObserverBaseWrapper implements EventLoopEventHandler { audioFrameObserverBase.onMixedAudioFrame!(channelId, audioFrame); return true; - case 'onEarMonitoringAudioFrame': + case 'onEarMonitoringAudioFrame_5405a47': if (audioFrameObserverBase.onEarMonitoringAudioFrame == null) { return true; } @@ -176,7 +176,7 @@ class AudioFrameObserverWrapper extends AudioFrameObserverBaseWrapper { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onPlaybackAudioFrameBeforeMixing': + case 'onPlaybackAudioFrameBeforeMixing_85ec0fc': if (audioFrameObserver.onPlaybackAudioFrameBeforeMixing == null) { return true; } @@ -230,7 +230,7 @@ class AudioSpectrumObserverWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onLocalAudioSpectrum': + case 'onLocalAudioSpectrum_5822fed': if (audioSpectrumObserver.onLocalAudioSpectrum == null) { return true; } @@ -246,7 +246,7 @@ class AudioSpectrumObserverWrapper implements EventLoopEventHandler { audioSpectrumObserver.onLocalAudioSpectrum!(data); return true; - case 'onRemoteAudioSpectrum': + case 'onRemoteAudioSpectrum_8ea2cde': if (audioSpectrumObserver.onRemoteAudioSpectrum == null) { return true; } @@ -297,7 +297,7 @@ class VideoEncodedFrameObserverWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onEncodedVideoFrameReceived': + case 'onEncodedVideoFrameReceived_6922697': if (videoEncodedFrameObserver.onEncodedVideoFrameReceived == null) { return true; } @@ -356,7 +356,7 @@ class VideoFrameObserverWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onCaptureVideoFrame': + case 'onCaptureVideoFrame_1673590': if (videoFrameObserver.onCaptureVideoFrame == null) { return true; } @@ -373,7 +373,7 @@ class VideoFrameObserverWrapper implements EventLoopEventHandler { videoFrameObserver.onCaptureVideoFrame!(sourceType, videoFrame); return true; - case 'onPreEncodeVideoFrame': + case 'onPreEncodeVideoFrame_1673590': if (videoFrameObserver.onPreEncodeVideoFrame == null) { return true; } @@ -390,7 +390,7 @@ class VideoFrameObserverWrapper implements EventLoopEventHandler { videoFrameObserver.onPreEncodeVideoFrame!(sourceType, videoFrame); return true; - case 'onMediaPlayerVideoFrame': + case 'onMediaPlayerVideoFrame_e648e2c': if (videoFrameObserver.onMediaPlayerVideoFrame == null) { return true; } @@ -407,7 +407,7 @@ class VideoFrameObserverWrapper implements EventLoopEventHandler { videoFrameObserver.onMediaPlayerVideoFrame!(videoFrame, mediaPlayerId); return true; - case 'onRenderVideoFrame': + case 'onRenderVideoFrame_43dcf82': if (videoFrameObserver.onRenderVideoFrame == null) { return true; } @@ -426,7 +426,7 @@ class VideoFrameObserverWrapper implements EventLoopEventHandler { channelId, remoteUid, videoFrame); return true; - case 'onTranscodedVideoFrame': + case 'onTranscodedVideoFrame_27754d8': if (videoFrameObserver.onTranscodedVideoFrame == null) { return true; } @@ -476,7 +476,7 @@ class MediaRecorderObserverWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onRecorderStateChanged': + case 'onRecorderStateChanged_c38849f': if (mediaRecorderObserver.onRecorderStateChanged == null) { return true; } @@ -487,18 +487,18 @@ class MediaRecorderObserverWrapper implements EventLoopEventHandler { String? channelId = paramJson.channelId; int? uid = paramJson.uid; RecorderState? state = paramJson.state; - RecorderErrorCode? error = paramJson.error; + RecorderReasonCode? reason = paramJson.reason; if (channelId == null || uid == null || state == null || - error == null) { + reason == null) { return true; } mediaRecorderObserver.onRecorderStateChanged!( - channelId, uid, state, error); + channelId, uid, state, reason); return true; - case 'onRecorderInfoUpdated': + case 'onRecorderInfoUpdated_64fa74a': if (mediaRecorderObserver.onRecorderInfoUpdated == null) { return true; } diff --git a/lib/src/binding/agora_media_base_impl.dart b/lib/src/binding/agora_media_base_impl.dart new file mode 100644 index 000000000..2754bb347 --- /dev/null +++ b/lib/src/binding/agora_media_base_impl.dart @@ -0,0 +1,39 @@ +/// GENERATED BY terra, DO NOT MODIFY BY HAND. + +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides +import 'package:agora_rtc_engine/src/binding_forward_export.dart'; +import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; + +class VideoFrameMetaInfoImpl implements VideoFrameMetaInfo { + VideoFrameMetaInfoImpl(this.irisMethodChannel); + + @protected + final IrisMethodChannel irisMethodChannel; + + @protected + Map createParams(Map param) { + return param; + } + + @protected + bool get isOverrideClassName => false; + + @protected + String get className => 'VideoFrameMetaInfo'; + + @override + Future getMetaInfoStr(MetaInfoKey key) async { + final apiType = + '${isOverrideClassName ? className : 'VideoFrameMetaInfo'}_getMetaInfoStr_c81192f'; + final param = createParams({'key': key}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + return result as String; + } +} diff --git a/lib/src/binding/agora_media_engine_impl.dart b/lib/src/binding/agora_media_engine_impl.dart index 2051b23d4..02f079a8c 100644 --- a/lib/src/binding/agora_media_engine_impl.dart +++ b/lib/src/binding/agora_media_engine_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -25,7 +25,7 @@ class MediaEngineImpl implements MediaEngine { @override void registerAudioFrameObserver(AudioFrameObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaEngine'}_registerAudioFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaEngine'}_registerAudioFrameObserver_d873a64'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -42,7 +42,7 @@ class MediaEngineImpl implements MediaEngine { @override void registerVideoFrameObserver(VideoFrameObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaEngine'}_registerVideoFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaEngine'}_registerVideoFrameObserver_2cc0ef1'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -59,7 +59,7 @@ class MediaEngineImpl implements MediaEngine { @override void registerVideoEncodedFrameObserver(VideoEncodedFrameObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaEngine'}_registerVideoEncodedFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaEngine'}_registerVideoEncodedFrameObserver_d45d579'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -78,7 +78,7 @@ class MediaEngineImpl implements MediaEngine { Future pushAudioFrame( {required AudioFrame frame, int trackId = 0}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_pushAudioFrame'; + '${isOverrideClassName ? className : 'MediaEngine'}_pushAudioFrame_c71f4ab'; final param = createParams({'frame': frame.toJson(), 'trackId': trackId}); final List buffers = []; buffers.addAll(frame.collectBufferList()); @@ -97,7 +97,7 @@ class MediaEngineImpl implements MediaEngine { @override Future pullAudioFrame(AudioFrame frame) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_pullAudioFrame'; + '${isOverrideClassName ? className : 'MediaEngine'}_pullAudioFrame_2c74a9c'; final param = createParams({'frame': frame.toJson()}); final List buffers = []; buffers.addAll(frame.collectBufferList()); @@ -120,7 +120,7 @@ class MediaEngineImpl implements MediaEngine { ExternalVideoSourceType sourceType = ExternalVideoSourceType.videoFrame, SenderOptions encodedVideoOption = const SenderOptions()}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_setExternalVideoSource'; + '${isOverrideClassName ? className : 'MediaEngine'}_setExternalVideoSource_fff99b6'; final param = createParams({ 'enabled': enabled, 'useTexture': useTexture, @@ -149,7 +149,7 @@ class MediaEngineImpl implements MediaEngine { bool localPlayback = false, bool publish = true}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_setExternalAudioSource'; + '${isOverrideClassName ? className : 'MediaEngine'}_setExternalAudioSource_e6538be'; final param = createParams({ 'enabled': enabled, 'sampleRate': sampleRate, @@ -174,7 +174,7 @@ class MediaEngineImpl implements MediaEngine { {required AudioTrackType trackType, required AudioTrackConfig config}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_createCustomAudioTrack'; + '${isOverrideClassName ? className : 'MediaEngine'}_createCustomAudioTrack_5a0bf1a'; final param = createParams( {'trackType': trackType.value(), 'config': config.toJson()}); final List buffers = []; @@ -192,7 +192,7 @@ class MediaEngineImpl implements MediaEngine { @override Future destroyCustomAudioTrack(int trackId) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_destroyCustomAudioTrack'; + '${isOverrideClassName ? className : 'MediaEngine'}_destroyCustomAudioTrack_6178b5d'; final param = createParams({'trackId': trackId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -212,7 +212,7 @@ class MediaEngineImpl implements MediaEngine { required int sampleRate, required int channels}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_setExternalAudioSink'; + '${isOverrideClassName ? className : 'MediaEngine'}_setExternalAudioSink_d275ce0'; final param = createParams( {'enabled': enabled, 'sampleRate': sampleRate, 'channels': channels}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -231,7 +231,7 @@ class MediaEngineImpl implements MediaEngine { Future enableCustomAudioLocalPlayback( {required int trackId, required bool enabled}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_enableCustomAudioLocalPlayback'; + '${isOverrideClassName ? className : 'MediaEngine'}_enableCustomAudioLocalPlayback_5f38e8a'; final param = createParams({'trackId': trackId, 'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -249,7 +249,7 @@ class MediaEngineImpl implements MediaEngine { Future pushVideoFrame( {required ExternalVideoFrame frame, int videoTrackId = 0}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_pushVideoFrame'; + '${isOverrideClassName ? className : 'MediaEngine'}_pushVideoFrame_4e544e2'; final param = createParams({'frame': frame.toJson(), 'videoTrackId': videoTrackId}); final List buffers = []; @@ -273,7 +273,7 @@ class MediaEngineImpl implements MediaEngine { required EncodedVideoFrameInfo videoEncodedFrameInfo, int videoTrackId = 0}) async { final apiType = - '${isOverrideClassName ? className : 'MediaEngine'}_pushEncodedVideoImage'; + '${isOverrideClassName ? className : 'MediaEngine'}_pushEncodedVideoImage_e71452b'; final param = createParams({ 'length': length, 'videoEncodedFrameInfo': videoEncodedFrameInfo.toJson(), diff --git a/lib/src/binding/agora_media_player_event_impl.dart b/lib/src/binding/agora_media_player_event_impl.dart index 4a5b33ec0..c893b600c 100644 --- a/lib/src/binding/agora_media_player_event_impl.dart +++ b/lib/src/binding/agora_media_player_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; diff --git a/lib/src/binding/agora_media_player_impl.dart b/lib/src/binding/agora_media_player_impl.dart index 28a21abd2..b895ae2f7 100644 --- a/lib/src/binding/agora_media_player_impl.dart +++ b/lib/src/binding/agora_media_player_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -39,7 +39,8 @@ class MediaPlayerImpl implements MediaPlayer { @override Future open({required String url, required int startPos}) async { - final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_open'; + final apiType = + '${isOverrideClassName ? className : 'MediaPlayer'}_open_e43f201'; final param = createParams({'url': url, 'startPos': startPos}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -56,7 +57,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future openWithMediaSource(MediaSource source) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_openWithMediaSource'; + '${isOverrideClassName ? className : 'MediaPlayer'}_openWithMediaSource_3c11499'; final param = createParams({'source': source.toJson()}); final List buffers = []; buffers.addAll(source.collectBufferList()); @@ -138,7 +139,8 @@ class MediaPlayerImpl implements MediaPlayer { @override Future seek(int newPos) async { - final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_seek'; + final apiType = + '${isOverrideClassName ? className : 'MediaPlayer'}_seek_f631116'; final param = createParams({'newPos': newPos}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -155,7 +157,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setAudioPitch(int pitch) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setAudioPitch'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setAudioPitch_46f8ab7'; final param = createParams({'pitch': pitch}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -172,7 +174,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future getDuration() async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_getDuration'; + '${isOverrideClassName ? className : 'MediaPlayer'}_getDuration_b12f121'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -191,7 +193,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future getPlayPosition() async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_getPlayPosition'; + '${isOverrideClassName ? className : 'MediaPlayer'}_getPlayPosition_b12f121'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -210,7 +212,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future getStreamCount() async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_getStreamCount'; + '${isOverrideClassName ? className : 'MediaPlayer'}_getStreamCount_b12f121'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -229,7 +231,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future getStreamInfo(int index) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_getStreamInfo'; + '${isOverrideClassName ? className : 'MediaPlayer'}_getStreamInfo_0fa63fa'; final param = createParams({'index': index}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -248,7 +250,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setLoopCount(int loopCount) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setLoopCount'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setLoopCount_46f8ab7'; final param = createParams({'loopCount': loopCount}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -265,7 +267,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setPlaybackSpeed(int speed) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setPlaybackSpeed'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setPlaybackSpeed_46f8ab7'; final param = createParams({'speed': speed}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -282,7 +284,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future selectAudioTrack(int index) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_selectAudioTrack'; + '${isOverrideClassName ? className : 'MediaPlayer'}_selectAudioTrack_46f8ab7'; final param = createParams({'index': index}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -296,11 +298,32 @@ class MediaPlayerImpl implements MediaPlayer { } } + @override + Future selectMultiAudioTrack( + {required int playoutTrackIndex, required int publishTrackIndex}) async { + final apiType = + '${isOverrideClassName ? className : 'MediaPlayer'}_selectMultiAudioTrack_4e92b3c'; + final param = createParams({ + 'playoutTrackIndex': playoutTrackIndex, + 'publishTrackIndex': publishTrackIndex + }); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } + @override Future setPlayerOptionInInt( {required String key, required int value}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setPlayerOptionInInt'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setPlayerOption_4d05d29'; final param = createParams({'key': key, 'value': value}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -315,7 +338,7 @@ class MediaPlayerImpl implements MediaPlayer { Future setPlayerOptionInString( {required String key, required String value}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setPlayerOptionInString'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setPlayerOption_ccad422'; final param = createParams({'key': key, 'value': value}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -329,7 +352,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future takeScreenshot(String filename) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_takeScreenshot'; + '${isOverrideClassName ? className : 'MediaPlayer'}_takeScreenshot_3a2037f'; final param = createParams({'filename': filename}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -346,7 +369,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future selectInternalSubtitle(int index) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_selectInternalSubtitle'; + '${isOverrideClassName ? className : 'MediaPlayer'}_selectInternalSubtitle_46f8ab7'; final param = createParams({'index': index}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -363,7 +386,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setExternalSubtitle(String url) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setExternalSubtitle'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setExternalSubtitle_3a2037f'; final param = createParams({'url': url}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -394,7 +417,8 @@ class MediaPlayerImpl implements MediaPlayer { @override Future mute(bool muted) async { - final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_mute'; + final apiType = + '${isOverrideClassName ? className : 'MediaPlayer'}_mute_5039d15'; final param = createParams({'muted': muted}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -411,7 +435,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future getMute() async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_getMute'; + '${isOverrideClassName ? className : 'MediaPlayer'}_getMute_c93e9d4'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -430,7 +454,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future adjustPlayoutVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_adjustPlayoutVolume'; + '${isOverrideClassName ? className : 'MediaPlayer'}_adjustPlayoutVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -447,7 +471,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future getPlayoutVolume() async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_getPlayoutVolume'; + '${isOverrideClassName ? className : 'MediaPlayer'}_getPlayoutVolume_9cfaa7e'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -466,7 +490,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future adjustPublishSignalVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_adjustPublishSignalVolume'; + '${isOverrideClassName ? className : 'MediaPlayer'}_adjustPublishSignalVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -483,7 +507,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future getPublishSignalVolume() async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_getPublishSignalVolume'; + '${isOverrideClassName ? className : 'MediaPlayer'}_getPublishSignalVolume_9cfaa7e'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -503,7 +527,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setView(int view) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setView'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setView_cb1a81f'; final param = createParams({'view': view}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -520,7 +544,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setRenderMode(RenderModeType renderMode) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setRenderMode'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setRenderMode_bedb5ae'; final param = createParams({'renderMode': renderMode.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -537,7 +561,7 @@ class MediaPlayerImpl implements MediaPlayer { @override void registerPlayerSourceObserver(MediaPlayerSourceObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerPlayerSourceObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerPlayerSourceObserver_15621d7'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -554,7 +578,7 @@ class MediaPlayerImpl implements MediaPlayer { @override void unregisterPlayerSourceObserver(MediaPlayerSourceObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterPlayerSourceObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterPlayerSourceObserver_15621d7'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -574,7 +598,7 @@ class MediaPlayerImpl implements MediaPlayer { RawAudioFrameOpModeType mode = RawAudioFrameOpModeType.rawAudioFrameOpModeReadOnly}) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerAudioFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerAudioFrameObserver_a5b510b'; // final param = createParams({// 'observer':observer, 'mode':mode.value()// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -588,7 +612,7 @@ class MediaPlayerImpl implements MediaPlayer { @override void unregisterAudioFrameObserver(AudioPcmFrameSink observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterAudioFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterAudioFrameObserver_89ab9b5'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -605,7 +629,7 @@ class MediaPlayerImpl implements MediaPlayer { @override void registerVideoFrameObserver(MediaPlayerVideoFrameObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerVideoFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerVideoFrameObserver_833bd8d'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -619,7 +643,7 @@ class MediaPlayerImpl implements MediaPlayer { @override void unregisterVideoFrameObserver(MediaPlayerVideoFrameObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterVideoFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterVideoFrameObserver_5165d4c'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -634,7 +658,7 @@ class MediaPlayerImpl implements MediaPlayer { void registerMediaPlayerAudioSpectrumObserver( {required AudioSpectrumObserver observer, required int intervalInMS}) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerMediaPlayerAudioSpectrumObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_registerMediaPlayerAudioSpectrumObserver_226bb48'; // final param = createParams({// 'observer':observer, 'intervalInMS':intervalInMS// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -653,7 +677,7 @@ class MediaPlayerImpl implements MediaPlayer { void unregisterMediaPlayerAudioSpectrumObserver( AudioSpectrumObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterMediaPlayerAudioSpectrumObserver'; +// final apiType = '${isOverrideClassName ? className : 'MediaPlayer'}_unregisterMediaPlayerAudioSpectrumObserver_09064ce'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -671,7 +695,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setAudioDualMonoMode(AudioDualMonoMode mode) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setAudioDualMonoMode'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setAudioDualMonoMode_30c9672'; final param = createParams({'mode': mode.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -719,7 +743,7 @@ class MediaPlayerImpl implements MediaPlayer { Future openWithAgoraCDNSrc( {required String src, required int startPos}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_openWithAgoraCDNSrc'; + '${isOverrideClassName ? className : 'MediaPlayer'}_openWithAgoraCDNSrc_e43f201'; final param = createParams({'src': src, 'startPos': startPos}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -751,7 +775,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future switchAgoraCDNLineByIndex(int index) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_switchAgoraCDNLineByIndex'; + '${isOverrideClassName ? className : 'MediaPlayer'}_switchAgoraCDNLineByIndex_46f8ab7'; final param = createParams({'index': index}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -783,7 +807,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future enableAutoSwitchAgoraCDN(bool enable) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_enableAutoSwitchAgoraCDN'; + '${isOverrideClassName ? className : 'MediaPlayer'}_enableAutoSwitchAgoraCDN_5039d15'; final param = createParams({'enable': enable}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -801,7 +825,7 @@ class MediaPlayerImpl implements MediaPlayer { Future renewAgoraCDNSrcToken( {required String token, required int ts}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_renewAgoraCDNSrcToken'; + '${isOverrideClassName ? className : 'MediaPlayer'}_renewAgoraCDNSrcToken_e43f201'; final param = createParams({'token': token, 'ts': ts}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -819,7 +843,7 @@ class MediaPlayerImpl implements MediaPlayer { Future switchAgoraCDNSrc( {required String src, bool syncPts = false}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_switchAgoraCDNSrc'; + '${isOverrideClassName ? className : 'MediaPlayer'}_switchAgoraCDNSrc_7a174df'; final param = createParams({'src': src, 'syncPts': syncPts}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -836,7 +860,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future switchSrc({required String src, bool syncPts = true}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_switchSrc'; + '${isOverrideClassName ? className : 'MediaPlayer'}_switchSrc_7a174df'; final param = createParams({'src': src, 'syncPts': syncPts}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -853,7 +877,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future preloadSrc({required String src, required int startPos}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_preloadSrc'; + '${isOverrideClassName ? className : 'MediaPlayer'}_preloadSrc_e43f201'; final param = createParams({'src': src, 'startPos': startPos}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -870,7 +894,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future playPreloadedSrc(String src) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_playPreloadedSrc'; + '${isOverrideClassName ? className : 'MediaPlayer'}_playPreloadedSrc_3a2037f'; final param = createParams({'src': src}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -887,7 +911,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future unloadSrc(String src) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_unloadSrc'; + '${isOverrideClassName ? className : 'MediaPlayer'}_unloadSrc_3a2037f'; final param = createParams({'src': src}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -904,7 +928,7 @@ class MediaPlayerImpl implements MediaPlayer { @override Future setSpatialAudioParams(SpatialAudioParams params) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setSpatialAudioParams'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setSpatialAudioParams_5035667'; final param = createParams({'params': params.toJson()}); final List buffers = []; buffers.addAll(params.collectBufferList()); @@ -924,7 +948,7 @@ class MediaPlayerImpl implements MediaPlayer { Future setSoundPositionParams( {required double pan, required double gain}) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayer'}_setSoundPositionParams'; + '${isOverrideClassName ? className : 'MediaPlayer'}_setSoundPositionParams_f282d50'; final param = createParams({'pan': pan, 'gain': gain}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -993,7 +1017,7 @@ class MediaPlayerCacheManagerImpl implements MediaPlayerCacheManager { @override Future removeCacheByUri(String uri) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_removeCacheByUri'; + '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_removeCacheByUri_3a2037f'; final param = createParams({'uri': uri}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1010,7 +1034,7 @@ class MediaPlayerCacheManagerImpl implements MediaPlayerCacheManager { @override Future setCacheDir(String path) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_setCacheDir'; + '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_setCacheDir_3a2037f'; final param = createParams({'path': path}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1027,7 +1051,7 @@ class MediaPlayerCacheManagerImpl implements MediaPlayerCacheManager { @override Future setMaxCacheFileCount(int count) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_setMaxCacheFileCount'; + '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_setMaxCacheFileCount_46f8ab7'; final param = createParams({'count': count}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1044,7 +1068,7 @@ class MediaPlayerCacheManagerImpl implements MediaPlayerCacheManager { @override Future setMaxCacheFileSize(int cacheSize) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_setMaxCacheFileSize'; + '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_setMaxCacheFileSize_f631116'; final param = createParams({'cacheSize': cacheSize}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1061,7 +1085,7 @@ class MediaPlayerCacheManagerImpl implements MediaPlayerCacheManager { @override Future enableAutoRemoveCache(bool enable) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_enableAutoRemoveCache'; + '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_enableAutoRemoveCache_5039d15'; final param = createParams({'enable': enable}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1078,7 +1102,7 @@ class MediaPlayerCacheManagerImpl implements MediaPlayerCacheManager { @override Future getCacheDir(int length) async { final apiType = - '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_getCacheDir'; + '${isOverrideClassName ? className : 'MediaPlayerCacheManager'}_getCacheDir_c9551e8'; final param = createParams({'length': length}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); diff --git a/lib/src/binding/agora_media_player_source_event_impl.dart b/lib/src/binding/agora_media_player_source_event_impl.dart index 34a0b36c3..c08d479ca 100644 --- a/lib/src/binding/agora_media_player_source_event_impl.dart +++ b/lib/src/binding/agora_media_player_source_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -23,7 +23,7 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onPlayerSourceStateChanged': + case 'onPlayerSourceStateChanged_7fb38f1': if (mediaPlayerSourceObserver.onPlayerSourceStateChanged == null) { return true; } @@ -33,14 +33,14 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { jsonMap); paramJson = paramJson.fillBuffers(buffers); MediaPlayerState? state = paramJson.state; - MediaPlayerError? ec = paramJson.ec; - if (state == null || ec == null) { + MediaPlayerReason? reason = paramJson.reason; + if (state == null || reason == null) { return true; } - mediaPlayerSourceObserver.onPlayerSourceStateChanged!(state, ec); + mediaPlayerSourceObserver.onPlayerSourceStateChanged!(state, reason); return true; - case 'onPositionChanged': + case 'onPositionChanged_303b92e': if (mediaPlayerSourceObserver.onPositionChanged == null) { return true; } @@ -49,13 +49,14 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { MediaPlayerSourceObserverOnPositionChangedJson.fromJson(jsonMap); paramJson = paramJson.fillBuffers(buffers); int? positionMs = paramJson.positionMs; - if (positionMs == null) { + int? timestampMs = paramJson.timestampMs; + if (positionMs == null || timestampMs == null) { return true; } - mediaPlayerSourceObserver.onPositionChanged!(positionMs); + mediaPlayerSourceObserver.onPositionChanged!(positionMs, timestampMs); return true; - case 'onPlayerEvent': + case 'onPlayerEvent_50f16fa': if (mediaPlayerSourceObserver.onPlayerEvent == null) { return true; } @@ -73,7 +74,7 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { eventCode, elapsedTime, message); return true; - case 'onMetaData': + case 'onMetaData_469a01b': if (mediaPlayerSourceObserver.onMetaData == null) { return true; } @@ -89,7 +90,7 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { mediaPlayerSourceObserver.onMetaData!(data, length); return true; - case 'onPlayBufferUpdated': + case 'onPlayBufferUpdated_f631116': if (mediaPlayerSourceObserver.onPlayBufferUpdated == null) { return true; } @@ -104,7 +105,7 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { mediaPlayerSourceObserver.onPlayBufferUpdated!(playCachedBuffer); return true; - case 'onPreloadEvent': + case 'onPreloadEvent_a1e3596': if (mediaPlayerSourceObserver.onPreloadEvent == null) { return true; } @@ -143,7 +144,7 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { mediaPlayerSourceObserver.onAgoraCDNTokenWillExpire!(); return true; - case 'onPlayerSrcInfoChanged': + case 'onPlayerSrcInfoChanged_54f3e5a': if (mediaPlayerSourceObserver.onPlayerSrcInfoChanged == null) { return true; } @@ -162,7 +163,7 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { mediaPlayerSourceObserver.onPlayerSrcInfoChanged!(from, to); return true; - case 'onPlayerInfoUpdated': + case 'onPlayerInfoUpdated_0e902a8': if (mediaPlayerSourceObserver.onPlayerInfoUpdated == null) { return true; } @@ -178,7 +179,40 @@ class MediaPlayerSourceObserverWrapper implements EventLoopEventHandler { mediaPlayerSourceObserver.onPlayerInfoUpdated!(info); return true; - case 'onAudioVolumeIndication': + case 'onPlayerCacheStats_0145940': + if (mediaPlayerSourceObserver.onPlayerCacheStats == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + MediaPlayerSourceObserverOnPlayerCacheStatsJson paramJson = + MediaPlayerSourceObserverOnPlayerCacheStatsJson.fromJson(jsonMap); + paramJson = paramJson.fillBuffers(buffers); + CacheStatistics? stats = paramJson.stats; + if (stats == null) { + return true; + } + stats = stats.fillBuffers(buffers); + mediaPlayerSourceObserver.onPlayerCacheStats!(stats); + return true; + + case 'onPlayerPlaybackStats_ffa466f': + if (mediaPlayerSourceObserver.onPlayerPlaybackStats == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + MediaPlayerSourceObserverOnPlayerPlaybackStatsJson paramJson = + MediaPlayerSourceObserverOnPlayerPlaybackStatsJson.fromJson( + jsonMap); + paramJson = paramJson.fillBuffers(buffers); + PlayerPlaybackStats? stats = paramJson.stats; + if (stats == null) { + return true; + } + stats = stats.fillBuffers(buffers); + mediaPlayerSourceObserver.onPlayerPlaybackStats!(stats); + return true; + + case 'onAudioVolumeIndication_46f8ab7': if (mediaPlayerSourceObserver.onAudioVolumeIndication == null) { return true; } diff --git a/lib/src/binding/agora_media_recorder_impl.dart b/lib/src/binding/agora_media_recorder_impl.dart index 53d90b4c0..57bcc34cf 100644 --- a/lib/src/binding/agora_media_recorder_impl.dart +++ b/lib/src/binding/agora_media_recorder_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -25,7 +25,7 @@ class MediaRecorderImpl implements MediaRecorder { @override Future setMediaRecorderObserver(MediaRecorderObserver callback) async { final apiType = - '${isOverrideClassName ? className : 'MediaRecorder'}_setMediaRecorderObserver'; + '${isOverrideClassName ? className : 'MediaRecorder'}_setMediaRecorderObserver_e1f7340'; final param = createParams({'callback': callback}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -42,7 +42,7 @@ class MediaRecorderImpl implements MediaRecorder { @override Future startRecording(MediaRecorderConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'MediaRecorder'}_startRecording'; + '${isOverrideClassName ? className : 'MediaRecorder'}_startRecording_94480b3'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); diff --git a/lib/src/binding/agora_music_content_center_event_impl.dart b/lib/src/binding/agora_music_content_center_event_impl.dart index 0a34dc9cd..5b013a936 100644 --- a/lib/src/binding/agora_music_content_center_event_impl.dart +++ b/lib/src/binding/agora_music_content_center_event_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -24,7 +24,7 @@ class MusicContentCenterEventHandlerWrapper implements EventLoopEventHandler { bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onMusicChartsResult': + case 'onMusicChartsResult_fb18135': if (musicContentCenterEventHandler.onMusicChartsResult == null) { return true; } @@ -35,16 +35,16 @@ class MusicContentCenterEventHandlerWrapper implements EventLoopEventHandler { paramJson = paramJson.fillBuffers(buffers); String? requestId = paramJson.requestId; List? result = paramJson.result; - MusicContentCenterStatusCode? errorCode = paramJson.errorCode; - if (requestId == null || result == null || errorCode == null) { + MusicContentCenterStateReason? reason = paramJson.reason; + if (requestId == null || result == null || reason == null) { return true; } result = result.map((e) => e.fillBuffers(buffers)).toList(); musicContentCenterEventHandler.onMusicChartsResult!( - requestId, result, errorCode); + requestId, result, reason); return true; - case 'onMusicCollectionResult': + case 'onMusicCollectionResult_c30c2e6': if (musicContentCenterEventHandler.onMusicCollectionResult == null) { return true; } @@ -55,15 +55,15 @@ class MusicContentCenterEventHandlerWrapper implements EventLoopEventHandler { paramJson = paramJson.fillBuffers(buffers); String? requestId = paramJson.requestId; MusicCollection? result = paramJson.result; - MusicContentCenterStatusCode? errorCode = paramJson.errorCode; - if (requestId == null || result == null || errorCode == null) { + MusicContentCenterStateReason? reason = paramJson.reason; + if (requestId == null || result == null || reason == null) { return true; } musicContentCenterEventHandler.onMusicCollectionResult!( - requestId, result, errorCode); + requestId, result, reason); return true; - case 'onLyricResult': + case 'onLyricResult_9ad9c90': if (musicContentCenterEventHandler.onLyricResult == null) { return true; } @@ -74,18 +74,18 @@ class MusicContentCenterEventHandlerWrapper implements EventLoopEventHandler { String? requestId = paramJson.requestId; int? songCode = paramJson.songCode; String? lyricUrl = paramJson.lyricUrl; - MusicContentCenterStatusCode? errorCode = paramJson.errorCode; + MusicContentCenterStateReason? reason = paramJson.reason; if (requestId == null || songCode == null || lyricUrl == null || - errorCode == null) { + reason == null) { return true; } musicContentCenterEventHandler.onLyricResult!( - requestId, songCode, lyricUrl, errorCode); + requestId, songCode, lyricUrl, reason); return true; - case 'onSongSimpleInfoResult': + case 'onSongSimpleInfoResult_9ad9c90': if (musicContentCenterEventHandler.onSongSimpleInfoResult == null) { return true; } @@ -97,18 +97,18 @@ class MusicContentCenterEventHandlerWrapper implements EventLoopEventHandler { String? requestId = paramJson.requestId; int? songCode = paramJson.songCode; String? simpleInfo = paramJson.simpleInfo; - MusicContentCenterStatusCode? errorCode = paramJson.errorCode; + MusicContentCenterStateReason? reason = paramJson.reason; if (requestId == null || songCode == null || simpleInfo == null || - errorCode == null) { + reason == null) { return true; } musicContentCenterEventHandler.onSongSimpleInfoResult!( - requestId, songCode, simpleInfo, errorCode); + requestId, songCode, simpleInfo, reason); return true; - case 'onPreLoadEvent': + case 'onPreLoadEvent_20170bc': if (musicContentCenterEventHandler.onPreLoadEvent == null) { return true; } @@ -120,18 +120,18 @@ class MusicContentCenterEventHandlerWrapper implements EventLoopEventHandler { int? songCode = paramJson.songCode; int? percent = paramJson.percent; String? lyricUrl = paramJson.lyricUrl; - PreloadStatusCode? status = paramJson.status; - MusicContentCenterStatusCode? errorCode = paramJson.errorCode; + PreloadState? state = paramJson.state; + MusicContentCenterStateReason? reason = paramJson.reason; if (requestId == null || songCode == null || percent == null || lyricUrl == null || - status == null || - errorCode == null) { + state == null || + reason == null) { return true; } musicContentCenterEventHandler.onPreLoadEvent!( - requestId, songCode, percent, lyricUrl, status, errorCode); + requestId, songCode, percent, lyricUrl, state, reason); return true; } return false; diff --git a/lib/src/binding/agora_music_content_center_impl.dart b/lib/src/binding/agora_music_content_center_impl.dart index 64fae29b4..a0846f702 100644 --- a/lib/src/binding/agora_music_content_center_impl.dart +++ b/lib/src/binding/agora_music_content_center_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -24,7 +24,8 @@ class MusicChartCollectionImpl implements MusicChartCollection { @override Future getCount() async { - final apiType = ''; + final apiType = + '${isOverrideClassName ? className : 'MusicChartCollection'}_getCount'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -38,7 +39,8 @@ class MusicChartCollectionImpl implements MusicChartCollection { @override Future get(int index) async { - final apiType = ''; + final apiType = + '${isOverrideClassName ? className : 'MusicChartCollection'}_get_46f8ab7'; final param = createParams({'index': index}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -71,7 +73,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getCount() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getCount'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -86,7 +88,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getTotal() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getTotal'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -101,7 +103,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getPage() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getPage'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -116,7 +118,7 @@ class MusicCollectionImpl implements MusicCollection { @override int getPageSize() { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getPageSize'; // final param = createParams({// // }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -131,7 +133,7 @@ class MusicCollectionImpl implements MusicCollection { @override Music getMusic(int index) { // Implementation template -// final apiType = ''; +// final apiType = '${isOverrideClassName ? className : 'MusicCollection'}_getMusic_8fcdcef'; // final param = createParams({// 'index':index// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -166,7 +168,7 @@ class MusicPlayerImpl extends MediaPlayerImpl implements MusicPlayer { Future openWithSongCode( {required int songCode, int startPos = 0}) async { final apiType = - '${isOverrideClassName ? className : 'MusicPlayer'}_openWithSongCode'; + '${isOverrideClassName ? className : 'MusicPlayer'}_open_303b92e'; final param = createParams({'songCode': songCode, 'startPos': startPos}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -198,7 +200,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future initialize(MusicContentCenterConfiguration configuration) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_initialize'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_initialize_df70304'; final param = createParams({'configuration': configuration.toJson()}); final List buffers = []; buffers.addAll(configuration.collectBufferList()); @@ -217,7 +219,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future renewToken(String token) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_renewToken'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_renewToken_3a2037f'; final param = createParams({'token': token}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -251,7 +253,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override void registerEventHandler(MusicContentCenterEventHandler eventHandler) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'MusicContentCenter'}_registerEventHandler'; +// final apiType = '${isOverrideClassName ? className : 'MusicContentCenter'}_registerEventHandler_ae49451'; // final param = createParams({// 'eventHandler':eventHandler// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -300,7 +302,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future getMusicCharts() async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_getMusicCharts'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_getMusicCharts_66d4ecd'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -324,12 +326,12 @@ class MusicContentCenterImpl implements MusicContentCenter { required int pageSize, String? jsonOption}) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_getMusicCollectionByMusicChartId'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_getMusicCollectionByMusicChartId_8cd0b4d'; final param = createParams({ 'musicChartId': musicChartId, 'page': page, 'pageSize': pageSize, - 'jsonOption': jsonOption + if (jsonOption != null) 'jsonOption': jsonOption }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -353,12 +355,12 @@ class MusicContentCenterImpl implements MusicContentCenter { required int pageSize, String? jsonOption}) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_searchMusic'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_searchMusic_3f8cf09'; final param = createParams({ 'keyWord': keyWord, 'page': page, 'pageSize': pageSize, - 'jsonOption': jsonOption + if (jsonOption != null) 'jsonOption': jsonOption }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -377,7 +379,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future preload(int songCode) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_preload'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_preload_d3baeab'; final param = createParams({'songCode': songCode}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -396,7 +398,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future removeCache(int songCode) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_removeCache'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_removeCache_f631116'; final param = createParams({'songCode': songCode}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -413,7 +415,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future> getCaches(int cacheInfoSize) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_getCaches'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_getCaches_c4f9978'; final param = createParams({'cacheInfoSize': cacheInfoSize}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -432,7 +434,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future isPreloaded(int songCode) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_isPreloaded'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_isPreloaded_f631116'; final param = createParams({'songCode': songCode}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -447,7 +449,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future getLyric({required int songCode, int lyricType = 0}) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_getLyric'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_getLyric_5ab5efd'; final param = createParams({'songCode': songCode, 'LyricType': lyricType}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -466,7 +468,7 @@ class MusicContentCenterImpl implements MusicContentCenter { @override Future getSongSimpleInfo(int songCode) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_getSongSimpleInfo'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_getSongSimpleInfo_d3baeab'; final param = createParams({'songCode': songCode}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -487,7 +489,7 @@ class MusicContentCenterImpl implements MusicContentCenter { Future getInternalSongCode( {required int songCode, required String jsonOption}) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_getInternalSongCode'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_getInternalSongCode_3a3d1e7'; final param = createParams({'songCode': songCode, 'jsonOption': jsonOption}); final callApiResult = await irisMethodChannel.invokeMethod( diff --git a/lib/src/binding/agora_rtc_engine_event_impl.dart b/lib/src/binding/agora_rtc_engine_event_impl.dart index 7d80f2f80..9ccb56ee2 100644 --- a/lib/src/binding/agora_rtc_engine_event_impl.dart +++ b/lib/src/binding/agora_rtc_engine_event_impl.dart @@ -1,13 +1,16 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import + import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { const RtcEngineEventHandlerWrapper(this.rtcEngineEventHandler); + final RtcEngineEventHandler rtcEngineEventHandler; + @override bool operator ==(Object other) { if (other.runtimeType != runtimeType) { @@ -19,11 +22,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { @override int get hashCode => rtcEngineEventHandler.hashCode; + @override bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onJoinChannelSuccessEx': + case 'onJoinChannelSuccess_263e4cd': if (rtcEngineEventHandler.onJoinChannelSuccess == null) { return true; } @@ -37,10 +41,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onJoinChannelSuccess!(connection, elapsed); return true; - case 'onRejoinChannelSuccessEx': + case 'onRejoinChannelSuccess_263e4cd': if (rtcEngineEventHandler.onRejoinChannelSuccess == null) { return true; } @@ -54,10 +59,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onRejoinChannelSuccess!(connection, elapsed); return true; - case 'onProxyConnected': + case 'onProxyConnected_9f89fd0': if (rtcEngineEventHandler.onProxyConnected == null) { return true; } @@ -77,11 +83,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { elapsed == null) { return true; } + rtcEngineEventHandler.onProxyConnected!( channel, uid, proxyType, localProxyIp, elapsed); return true; - case 'onError': + case 'onError_d26c0fd': if (rtcEngineEventHandler.onError == null) { return true; } @@ -94,10 +101,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (err == null || msg == null) { return true; } + rtcEngineEventHandler.onError!(err, msg); return true; - case 'onAudioQualityEx': + case 'onAudioQuality_5c7294b': if (rtcEngineEventHandler.onAudioQuality == null) { return true; } @@ -118,11 +126,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onAudioQuality!( connection, remoteUid, quality, delay, lost); return true; - case 'onLastmileProbeResult': + case 'onLastmileProbeResult_42b5843': if (rtcEngineEventHandler.onLastmileProbeResult == null) { return true; } @@ -138,7 +147,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onLastmileProbeResult!(result); return true; - case 'onAudioVolumeIndicationEx': + case 'onAudioVolumeIndication_781482a': if (rtcEngineEventHandler.onAudioVolumeIndication == null) { return true; } @@ -158,11 +167,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { } connection = connection.fillBuffers(buffers); speakers = speakers.map((e) => e.fillBuffers(buffers)).toList(); + rtcEngineEventHandler.onAudioVolumeIndication!( connection, speakers, speakerNumber, totalVolume); return true; - case 'onLeaveChannelEx': + case 'onLeaveChannel_c8e730d': if (rtcEngineEventHandler.onLeaveChannel == null) { return true; } @@ -180,7 +190,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onLeaveChannel!(connection, stats); return true; - case 'onRtcStatsEx': + case 'onRtcStats_c8e730d': if (rtcEngineEventHandler.onRtcStats == null) { return true; } @@ -198,7 +208,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onRtcStats!(connection, stats); return true; - case 'onAudioDeviceStateChanged': + case 'onAudioDeviceStateChanged_976d8c3': if (rtcEngineEventHandler.onAudioDeviceStateChanged == null) { return true; } @@ -213,11 +223,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (deviceId == null || deviceType == null || deviceState == null) { return true; } + rtcEngineEventHandler.onAudioDeviceStateChanged!( deviceId, deviceType, deviceState); return true; - case 'onAudioMixingPositionChanged': + case 'onAudioMixingPositionChanged_f631116': if (rtcEngineEventHandler.onAudioMixingPositionChanged == null) { return true; } @@ -230,6 +241,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (position == null) { return true; } + rtcEngineEventHandler.onAudioMixingPositionChanged!(position); return true; @@ -244,7 +256,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onAudioMixingFinished!(); return true; - case 'onAudioEffectFinished': + case 'onAudioEffectFinished_46f8ab7': if (rtcEngineEventHandler.onAudioEffectFinished == null) { return true; } @@ -256,10 +268,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (soundId == null) { return true; } + rtcEngineEventHandler.onAudioEffectFinished!(soundId); return true; - case 'onVideoDeviceStateChanged': + case 'onVideoDeviceStateChanged_976d8c3': if (rtcEngineEventHandler.onVideoDeviceStateChanged == null) { return true; } @@ -274,11 +287,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (deviceId == null || deviceType == null || deviceState == null) { return true; } + rtcEngineEventHandler.onVideoDeviceStateChanged!( deviceId, deviceType, deviceState); return true; - case 'onNetworkQualityEx': + case 'onNetworkQuality_34d8b3c': if (rtcEngineEventHandler.onNetworkQuality == null) { return true; } @@ -297,11 +311,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onNetworkQuality!( connection, remoteUid, txQuality, rxQuality); return true; - case 'onIntraRequestReceivedEx': + case 'onIntraRequestReceived_c81e1a4': if (rtcEngineEventHandler.onIntraRequestReceived == null) { return true; } @@ -317,7 +332,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onIntraRequestReceived!(connection); return true; - case 'onUplinkNetworkInfoUpdated': + case 'onUplinkNetworkInfoUpdated_cbb1856': if (rtcEngineEventHandler.onUplinkNetworkInfoUpdated == null) { return true; } @@ -334,7 +349,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onUplinkNetworkInfoUpdated!(info); return true; - case 'onDownlinkNetworkInfoUpdated': + case 'onDownlinkNetworkInfoUpdated_e9d5bd9': if (rtcEngineEventHandler.onDownlinkNetworkInfoUpdated == null) { return true; } @@ -351,7 +366,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onDownlinkNetworkInfoUpdated!(info); return true; - case 'onLastmileQuality': + case 'onLastmileQuality_46f8ab7': if (rtcEngineEventHandler.onLastmileQuality == null) { return true; } @@ -363,10 +378,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (quality == null) { return true; } + rtcEngineEventHandler.onLastmileQuality!(quality); return true; - case 'onFirstLocalVideoFrame': + case 'onFirstLocalVideoFrame_ebdfd19': if (rtcEngineEventHandler.onFirstLocalVideoFrame == null) { return true; } @@ -384,11 +400,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { elapsed == null) { return true; } + rtcEngineEventHandler.onFirstLocalVideoFrame!( source, width, height, elapsed); return true; - case 'onFirstLocalVideoFramePublished': + case 'onFirstLocalVideoFramePublished_2ad83d8': if (rtcEngineEventHandler.onFirstLocalVideoFramePublished == null) { return true; } @@ -402,10 +419,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (source == null || elapsed == null) { return true; } + rtcEngineEventHandler.onFirstLocalVideoFramePublished!(source, elapsed); return true; - case 'onFirstRemoteVideoDecodedEx': + case 'onFirstRemoteVideoDecoded_a68170a': if (rtcEngineEventHandler.onFirstRemoteVideoDecoded == null) { return true; } @@ -427,11 +445,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onFirstRemoteVideoDecoded!( connection, remoteUid, width, height, elapsed); return true; - case 'onVideoSizeChangedEx': + case 'onVideoSizeChanged_99bf45c': if (rtcEngineEventHandler.onVideoSizeChanged == null) { return true; } @@ -454,11 +473,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onVideoSizeChanged!( connection, sourceType, uid, width, height, rotation); return true; - case 'onLocalVideoStateChanged': + case 'onLocalVideoStateChanged_a44228a': if (rtcEngineEventHandler.onLocalVideoStateChanged == null) { return true; } @@ -468,14 +488,15 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { paramJson = paramJson.fillBuffers(buffers); VideoSourceType? source = paramJson.source; LocalVideoStreamState? state = paramJson.state; - LocalVideoStreamError? error = paramJson.error; - if (source == null || state == null || error == null) { + LocalVideoStreamReason? reason = paramJson.reason; + if (source == null || state == null || reason == null) { return true; } - rtcEngineEventHandler.onLocalVideoStateChanged!(source, state, error); + + rtcEngineEventHandler.onLocalVideoStateChanged!(source, state, reason); return true; - case 'onRemoteVideoStateChangedEx': + case 'onRemoteVideoStateChanged_a14e9d1': if (rtcEngineEventHandler.onRemoteVideoStateChanged == null) { return true; } @@ -497,11 +518,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onRemoteVideoStateChanged!( connection, remoteUid, state, reason, elapsed); return true; - case 'onFirstRemoteVideoFrameEx': + case 'onFirstRemoteVideoFrame_a68170a': if (rtcEngineEventHandler.onFirstRemoteVideoFrame == null) { return true; } @@ -522,11 +544,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onFirstRemoteVideoFrame!( connection, remoteUid, width, height, elapsed); return true; - case 'onUserJoinedEx': + case 'onUserJoined_c5499bd': if (rtcEngineEventHandler.onUserJoined == null) { return true; } @@ -541,10 +564,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUserJoined!(connection, remoteUid, elapsed); return true; - case 'onUserOfflineEx': + case 'onUserOffline_0a32aac': if (rtcEngineEventHandler.onUserOffline == null) { return true; } @@ -559,10 +583,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUserOffline!(connection, remoteUid, reason); return true; - case 'onUserMuteAudioEx': + case 'onUserMuteAudio_0aac2fe': if (rtcEngineEventHandler.onUserMuteAudio == null) { return true; } @@ -577,10 +602,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUserMuteAudio!(connection, remoteUid, muted); return true; - case 'onUserMuteVideoEx': + case 'onUserMuteVideo_0aac2fe': if (rtcEngineEventHandler.onUserMuteVideo == null) { return true; } @@ -595,10 +621,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUserMuteVideo!(connection, remoteUid, muted); return true; - case 'onUserEnableVideoEx': + case 'onUserEnableVideo_0aac2fe': if (rtcEngineEventHandler.onUserEnableVideo == null) { return true; } @@ -613,11 +640,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUserEnableVideo!( connection, remoteUid, enabled); return true; - case 'onUserStateChangedEx': + case 'onUserStateChanged_65f95a7': if (rtcEngineEventHandler.onUserStateChanged == null) { return true; } @@ -632,10 +660,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUserStateChanged!(connection, remoteUid, state); return true; - case 'onUserEnableLocalVideoEx': + case 'onUserEnableLocalVideo_0aac2fe': if (rtcEngineEventHandler.onUserEnableLocalVideo == null) { return true; } @@ -650,47 +679,48 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUserEnableLocalVideo!( connection, remoteUid, enabled); return true; - case 'onLocalAudioStatsEx': - if (rtcEngineEventHandler.onLocalAudioStats == null) { + case 'onRemoteAudioStats_ffbde06': + if (rtcEngineEventHandler.onRemoteAudioStats == null) { return true; } final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnLocalAudioStatsJson paramJson = - RtcEngineEventHandlerOnLocalAudioStatsJson.fromJson(jsonMap); + RtcEngineEventHandlerOnRemoteAudioStatsJson paramJson = + RtcEngineEventHandlerOnRemoteAudioStatsJson.fromJson(jsonMap); paramJson = paramJson.fillBuffers(buffers); RtcConnection? connection = paramJson.connection; - LocalAudioStats? stats = paramJson.stats; + RemoteAudioStats? stats = paramJson.stats; if (connection == null || stats == null) { return true; } connection = connection.fillBuffers(buffers); stats = stats.fillBuffers(buffers); - rtcEngineEventHandler.onLocalAudioStats!(connection, stats); + rtcEngineEventHandler.onRemoteAudioStats!(connection, stats); return true; - case 'onRemoteAudioStatsEx': - if (rtcEngineEventHandler.onRemoteAudioStats == null) { + case 'onLocalAudioStats_5657f05': + if (rtcEngineEventHandler.onLocalAudioStats == null) { return true; } final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnRemoteAudioStatsJson paramJson = - RtcEngineEventHandlerOnRemoteAudioStatsJson.fromJson(jsonMap); + RtcEngineEventHandlerOnLocalAudioStatsJson paramJson = + RtcEngineEventHandlerOnLocalAudioStatsJson.fromJson(jsonMap); paramJson = paramJson.fillBuffers(buffers); RtcConnection? connection = paramJson.connection; - RemoteAudioStats? stats = paramJson.stats; + LocalAudioStats? stats = paramJson.stats; if (connection == null || stats == null) { return true; } connection = connection.fillBuffers(buffers); stats = stats.fillBuffers(buffers); - rtcEngineEventHandler.onRemoteAudioStats!(connection, stats); + rtcEngineEventHandler.onLocalAudioStats!(connection, stats); return true; - case 'onLocalVideoStats': + case 'onLocalVideoStats_baa96c8': if (rtcEngineEventHandler.onLocalVideoStats == null) { return true; } @@ -703,11 +733,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (source == null || stats == null) { return true; } + stats = stats.fillBuffers(buffers); rtcEngineEventHandler.onLocalVideoStats!(source, stats); return true; - case 'onRemoteVideoStatsEx': + case 'onRemoteVideoStats_2f43a70': if (rtcEngineEventHandler.onRemoteVideoStats == null) { return true; } @@ -736,7 +767,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onCameraReady!(); return true; - case 'onCameraFocusAreaChanged': + case 'onCameraFocusAreaChanged_41c5354': if (rtcEngineEventHandler.onCameraFocusAreaChanged == null) { return true; } @@ -751,10 +782,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (x == null || y == null || width == null || height == null) { return true; } + rtcEngineEventHandler.onCameraFocusAreaChanged!(x, y, width, height); return true; - case 'onCameraExposureAreaChanged': + case 'onCameraExposureAreaChanged_41c5354': if (rtcEngineEventHandler.onCameraExposureAreaChanged == null) { return true; } @@ -770,10 +802,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (x == null || y == null || width == null || height == null) { return true; } + rtcEngineEventHandler.onCameraExposureAreaChanged!(x, y, width, height); return true; - case 'onFacePositionChanged': + case 'onFacePositionChanged_197b4a7': if (rtcEngineEventHandler.onFacePositionChanged == null) { return true; } @@ -793,7 +826,9 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { numFaces == null) { return true; } + vecRectangle = vecRectangle.map((e) => e.fillBuffers(buffers)).toList(); + rtcEngineEventHandler.onFacePositionChanged!( imageWidth, imageHeight, vecRectangle, vecDistance, numFaces); return true; @@ -809,7 +844,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onVideoStopped!(); return true; - case 'onAudioMixingStateChanged': + case 'onAudioMixingStateChanged_fd2c0a6': if (rtcEngineEventHandler.onAudioMixingStateChanged == null) { return true; } @@ -823,10 +858,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (state == null || reason == null) { return true; } + rtcEngineEventHandler.onAudioMixingStateChanged!(state, reason); return true; - case 'onRhythmPlayerStateChanged': + case 'onRhythmPlayerStateChanged_09360d2': if (rtcEngineEventHandler.onRhythmPlayerStateChanged == null) { return true; } @@ -836,14 +872,15 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { jsonMap); paramJson = paramJson.fillBuffers(buffers); RhythmPlayerStateType? state = paramJson.state; - RhythmPlayerErrorType? errorCode = paramJson.errorCode; - if (state == null || errorCode == null) { + RhythmPlayerReason? reason = paramJson.reason; + if (state == null || reason == null) { return true; } - rtcEngineEventHandler.onRhythmPlayerStateChanged!(state, errorCode); + + rtcEngineEventHandler.onRhythmPlayerStateChanged!(state, reason); return true; - case 'onConnectionLostEx': + case 'onConnectionLost_c81e1a4': if (rtcEngineEventHandler.onConnectionLost == null) { return true; } @@ -859,7 +896,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onConnectionLost!(connection); return true; - case 'onConnectionInterruptedEx': + case 'onConnectionInterrupted_c81e1a4': if (rtcEngineEventHandler.onConnectionInterrupted == null) { return true; } @@ -875,7 +912,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onConnectionInterrupted!(connection); return true; - case 'onConnectionBannedEx': + case 'onConnectionBanned_c81e1a4': if (rtcEngineEventHandler.onConnectionBanned == null) { return true; } @@ -891,7 +928,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onConnectionBanned!(connection); return true; - case 'onStreamMessageEx': + case 'onStreamMessage_99898cb': if (rtcEngineEventHandler.onStreamMessage == null) { return true; } @@ -914,11 +951,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onStreamMessage!( connection, remoteUid, streamId, data, length, sentTs); return true; - case 'onStreamMessageErrorEx': + case 'onStreamMessageError_fe302fc': if (rtcEngineEventHandler.onStreamMessageError == null) { return true; } @@ -941,11 +979,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onStreamMessageError!( connection, remoteUid, streamId, code, missed, cached); return true; - case 'onRequestTokenEx': + case 'onRequestToken_c81e1a4': if (rtcEngineEventHandler.onRequestToken == null) { return true; } @@ -961,7 +1000,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onRequestToken!(connection); return true; - case 'onTokenPrivilegeWillExpireEx': + case 'onTokenPrivilegeWillExpire_8225ea3': if (rtcEngineEventHandler.onTokenPrivilegeWillExpire == null) { return true; } @@ -976,10 +1015,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onTokenPrivilegeWillExpire!(connection, token); return true; - case 'onLicenseValidationFailureEx': + case 'onLicenseValidationFailure_5dfd95e': if (rtcEngineEventHandler.onLicenseValidationFailure == null) { return true; } @@ -994,10 +1034,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onLicenseValidationFailure!(connection, reason); return true; - case 'onFirstLocalAudioFramePublishedEx': + case 'onFirstLocalAudioFramePublished_263e4cd': if (rtcEngineEventHandler.onFirstLocalAudioFramePublished == null) { return true; } @@ -1012,50 +1053,53 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onFirstLocalAudioFramePublished!( connection, elapsed); return true; - case 'onFirstRemoteAudioFrameEx': - if (rtcEngineEventHandler.onFirstRemoteAudioFrame == null) { + case 'onFirstRemoteAudioDecoded_c5499bd': + if (rtcEngineEventHandler.onFirstRemoteAudioDecoded == null) { return true; } final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson paramJson = - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson.fromJson(jsonMap); + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson paramJson = + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson.fromJson( + jsonMap); paramJson = paramJson.fillBuffers(buffers); RtcConnection? connection = paramJson.connection; - int? userId = paramJson.userId; + int? uid = paramJson.uid; int? elapsed = paramJson.elapsed; - if (connection == null || userId == null || elapsed == null) { + if (connection == null || uid == null || elapsed == null) { return true; } connection = connection.fillBuffers(buffers); - rtcEngineEventHandler.onFirstRemoteAudioFrame!( - connection, userId, elapsed); + + rtcEngineEventHandler.onFirstRemoteAudioDecoded!( + connection, uid, elapsed); return true; - case 'onFirstRemoteAudioDecodedEx': - if (rtcEngineEventHandler.onFirstRemoteAudioDecoded == null) { + case 'onFirstRemoteAudioFrame_c5499bd': + if (rtcEngineEventHandler.onFirstRemoteAudioFrame == null) { return true; } final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson paramJson = - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson.fromJson( - jsonMap); + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson paramJson = + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson.fromJson(jsonMap); paramJson = paramJson.fillBuffers(buffers); RtcConnection? connection = paramJson.connection; - int? uid = paramJson.uid; + int? userId = paramJson.userId; int? elapsed = paramJson.elapsed; - if (connection == null || uid == null || elapsed == null) { + if (connection == null || userId == null || elapsed == null) { return true; } connection = connection.fillBuffers(buffers); - rtcEngineEventHandler.onFirstRemoteAudioDecoded!( - connection, uid, elapsed); + + rtcEngineEventHandler.onFirstRemoteAudioFrame!( + connection, userId, elapsed); return true; - case 'onLocalAudioStateChangedEx': + case 'onLocalAudioStateChanged_13b6c02': if (rtcEngineEventHandler.onLocalAudioStateChanged == null) { return true; } @@ -1065,16 +1109,17 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { paramJson = paramJson.fillBuffers(buffers); RtcConnection? connection = paramJson.connection; LocalAudioStreamState? state = paramJson.state; - LocalAudioStreamError? error = paramJson.error; - if (connection == null || state == null || error == null) { + LocalAudioStreamReason? reason = paramJson.reason; + if (connection == null || state == null || reason == null) { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onLocalAudioStateChanged!( - connection, state, error); + connection, state, reason); return true; - case 'onRemoteAudioStateChangedEx': + case 'onRemoteAudioStateChanged_056772e': if (rtcEngineEventHandler.onRemoteAudioStateChanged == null) { return true; } @@ -1096,11 +1141,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onRemoteAudioStateChanged!( connection, remoteUid, state, reason, elapsed); return true; - case 'onActiveSpeakerEx': + case 'onActiveSpeaker_dd67adc': if (rtcEngineEventHandler.onActiveSpeaker == null) { return true; } @@ -1114,10 +1160,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onActiveSpeaker!(connection, uid); return true; - case 'onContentInspectResult': + case 'onContentInspectResult_ba185c8': if (rtcEngineEventHandler.onContentInspectResult == null) { return true; } @@ -1129,10 +1176,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (result == null) { return true; } + rtcEngineEventHandler.onContentInspectResult!(result); return true; - case 'onSnapshotTakenEx': + case 'onSnapshotTaken_5a6a693': if (rtcEngineEventHandler.onSnapshotTaken == null) { return true; } @@ -1155,11 +1203,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onSnapshotTaken!( connection, uid, filePath, width, height, errCode); return true; - case 'onClientRoleChangedEx': + case 'onClientRoleChanged_2acaf10': if (rtcEngineEventHandler.onClientRoleChanged == null) { return true; } @@ -1178,12 +1227,13 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + newRoleOptions = newRoleOptions.fillBuffers(buffers); rtcEngineEventHandler.onClientRoleChanged!( connection, oldRole, newRole, newRoleOptions); return true; - case 'onClientRoleChangeFailedEx': + case 'onClientRoleChangeFailed_5a3af5b': if (rtcEngineEventHandler.onClientRoleChangeFailed == null) { return true; } @@ -1198,11 +1248,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onClientRoleChangeFailed!( connection, reason, currentRole); return true; - case 'onAudioDeviceVolumeChanged': + case 'onAudioDeviceVolumeChanged_55ab726': if (rtcEngineEventHandler.onAudioDeviceVolumeChanged == null) { return true; } @@ -1217,11 +1268,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (deviceType == null || volume == null || muted == null) { return true; } + rtcEngineEventHandler.onAudioDeviceVolumeChanged!( deviceType, volume, muted); return true; - case 'onRtmpStreamingStateChanged': + case 'onRtmpStreamingStateChanged_1f07503': if (rtcEngineEventHandler.onRtmpStreamingStateChanged == null) { return true; } @@ -1232,14 +1284,15 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { paramJson = paramJson.fillBuffers(buffers); String? url = paramJson.url; RtmpStreamPublishState? state = paramJson.state; - RtmpStreamPublishErrorType? errCode = paramJson.errCode; - if (url == null || state == null || errCode == null) { + RtmpStreamPublishReason? reason = paramJson.reason; + if (url == null || state == null || reason == null) { return true; } - rtcEngineEventHandler.onRtmpStreamingStateChanged!(url, state, errCode); + + rtcEngineEventHandler.onRtmpStreamingStateChanged!(url, state, reason); return true; - case 'onRtmpStreamingEvent': + case 'onRtmpStreamingEvent_2e48ef5': if (rtcEngineEventHandler.onRtmpStreamingEvent == null) { return true; } @@ -1252,6 +1305,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (url == null || eventCode == null) { return true; } + rtcEngineEventHandler.onRtmpStreamingEvent!(url, eventCode); return true; @@ -1266,7 +1320,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { rtcEngineEventHandler.onTranscodingUpdated!(); return true; - case 'onAudioRoutingChanged': + case 'onAudioRoutingChanged_46f8ab7': if (rtcEngineEventHandler.onAudioRoutingChanged == null) { return true; } @@ -1278,10 +1332,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (routing == null) { return true; } + rtcEngineEventHandler.onAudioRoutingChanged!(routing); return true; - case 'onChannelMediaRelayStateChanged': + case 'onChannelMediaRelayStateChanged_4e92b3c': if (rtcEngineEventHandler.onChannelMediaRelayStateChanged == null) { return true; } @@ -1295,25 +1350,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (state == null || code == null) { return true; } - rtcEngineEventHandler.onChannelMediaRelayStateChanged!(state, code); - return true; - case 'onChannelMediaRelayEvent': - if (rtcEngineEventHandler.onChannelMediaRelayEvent == null) { - return true; - } - final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnChannelMediaRelayEventJson paramJson = - RtcEngineEventHandlerOnChannelMediaRelayEventJson.fromJson(jsonMap); - paramJson = paramJson.fillBuffers(buffers); - ChannelMediaRelayEvent? code = paramJson.code; - if (code == null) { - return true; - } - rtcEngineEventHandler.onChannelMediaRelayEvent!(code); + rtcEngineEventHandler.onChannelMediaRelayStateChanged!(state, code); return true; - case 'onLocalPublishFallbackToAudioOnly': + case 'onLocalPublishFallbackToAudioOnly_5039d15': if (rtcEngineEventHandler.onLocalPublishFallbackToAudioOnly == null) { return true; } @@ -1326,11 +1367,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (isFallbackOrRecover == null) { return true; } + rtcEngineEventHandler .onLocalPublishFallbackToAudioOnly!(isFallbackOrRecover); return true; - case 'onRemoteSubscribeFallbackToAudioOnly': + case 'onRemoteSubscribeFallbackToAudioOnly_dbdc15a': if (rtcEngineEventHandler.onRemoteSubscribeFallbackToAudioOnly == null) { return true; @@ -1346,11 +1388,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (uid == null || isFallbackOrRecover == null) { return true; } + rtcEngineEventHandler.onRemoteSubscribeFallbackToAudioOnly!( uid, isFallbackOrRecover); return true; - case 'onRemoteAudioTransportStatsEx': + case 'onRemoteAudioTransportStats_527a345': if (rtcEngineEventHandler.onRemoteAudioTransportStats == null) { return true; } @@ -1372,11 +1415,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onRemoteAudioTransportStats!( connection, remoteUid, delay, lost, rxKBitRate); return true; - case 'onRemoteVideoTransportStatsEx': + case 'onRemoteVideoTransportStats_527a345': if (rtcEngineEventHandler.onRemoteVideoTransportStats == null) { return true; } @@ -1398,11 +1442,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onRemoteVideoTransportStats!( connection, remoteUid, delay, lost, rxKBitRate); return true; - case 'onConnectionStateChangedEx': + case 'onConnectionStateChanged_4075a9c': if (rtcEngineEventHandler.onConnectionStateChanged == null) { return true; } @@ -1417,11 +1462,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onConnectionStateChanged!( connection, state, reason); return true; - case 'onWlAccMessageEx': + case 'onWlAccMessage_2b9068e': if (rtcEngineEventHandler.onWlAccMessage == null) { return true; } @@ -1440,11 +1486,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onWlAccMessage!( connection, reason, action, wlAccMsg); return true; - case 'onWlAccStatsEx': + case 'onWlAccStats_b162607': if (rtcEngineEventHandler.onWlAccStats == null) { return true; } @@ -1467,7 +1514,7 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { connection, currentStats, averageStats); return true; - case 'onNetworkTypeChangedEx': + case 'onNetworkTypeChanged_388fd6f': if (rtcEngineEventHandler.onNetworkTypeChanged == null) { return true; } @@ -1481,10 +1528,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onNetworkTypeChanged!(connection, type); return true; - case 'onEncryptionErrorEx': + case 'onEncryptionError_e7a65fe': if (rtcEngineEventHandler.onEncryptionError == null) { return true; } @@ -1498,10 +1546,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onEncryptionError!(connection, errorType); return true; - case 'onPermissionError': + case 'onPermissionError_f37c62b': if (rtcEngineEventHandler.onPermissionError == null) { return true; } @@ -1513,10 +1562,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (permissionType == null) { return true; } + rtcEngineEventHandler.onPermissionError!(permissionType); return true; - case 'onLocalUserRegistered': + case 'onLocalUserRegistered_1922dd1': if (rtcEngineEventHandler.onLocalUserRegistered == null) { return true; } @@ -1529,10 +1579,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (uid == null || userAccount == null) { return true; } + rtcEngineEventHandler.onLocalUserRegistered!(uid, userAccount); return true; - case 'onUserInfoUpdated': + case 'onUserInfoUpdated_2120245': if (rtcEngineEventHandler.onUserInfoUpdated == null) { return true; } @@ -1545,11 +1596,79 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (uid == null || info == null) { return true; } + info = info.fillBuffers(buffers); rtcEngineEventHandler.onUserInfoUpdated!(uid, info); return true; - case 'onUploadLogResultEx': + case 'onUserAccountUpdated_de1c015': + if (rtcEngineEventHandler.onUserAccountUpdated == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + RtcEngineEventHandlerOnUserAccountUpdatedJson paramJson = + RtcEngineEventHandlerOnUserAccountUpdatedJson.fromJson(jsonMap); + paramJson = paramJson.fillBuffers(buffers); + RtcConnection? connection = paramJson.connection; + int? remoteUid = paramJson.remoteUid; + String? remoteUserAccount = paramJson.remoteUserAccount; + if (connection == null || + remoteUid == null || + remoteUserAccount == null) { + return true; + } + connection = connection.fillBuffers(buffers); + + rtcEngineEventHandler.onUserAccountUpdated!( + connection, remoteUid, remoteUserAccount); + return true; + + case 'onVideoRenderingTracingResult_813c0f4': + if (rtcEngineEventHandler.onVideoRenderingTracingResult == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + RtcEngineEventHandlerOnVideoRenderingTracingResultJson paramJson = + RtcEngineEventHandlerOnVideoRenderingTracingResultJson.fromJson( + jsonMap); + paramJson = paramJson.fillBuffers(buffers); + RtcConnection? connection = paramJson.connection; + int? uid = paramJson.uid; + MediaTraceEvent? currentEvent = paramJson.currentEvent; + VideoRenderingTracingInfo? tracingInfo = paramJson.tracingInfo; + if (connection == null || + uid == null || + currentEvent == null || + tracingInfo == null) { + return true; + } + connection = connection.fillBuffers(buffers); + + tracingInfo = tracingInfo.fillBuffers(buffers); + rtcEngineEventHandler.onVideoRenderingTracingResult!( + connection, uid, currentEvent, tracingInfo); + return true; + + case 'onLocalVideoTranscoderError_83e3a9c': + if (rtcEngineEventHandler.onLocalVideoTranscoderError == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson paramJson = + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson.fromJson( + jsonMap); + paramJson = paramJson.fillBuffers(buffers); + TranscodingVideoStream? stream = paramJson.stream; + VideoTranscoderError? error = paramJson.error; + if (stream == null || error == null) { + return true; + } + stream = stream.fillBuffers(buffers); + + rtcEngineEventHandler.onLocalVideoTranscoderError!(stream, error); + return true; + + case 'onUploadLogResult_3115804': if (rtcEngineEventHandler.onUploadLogResult == null) { return true; } @@ -1568,11 +1687,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { return true; } connection = connection.fillBuffers(buffers); + rtcEngineEventHandler.onUploadLogResult!( connection, requestId, success, reason); return true; - case 'onAudioSubscribeStateChanged': + case 'onAudioSubscribeStateChanged_e0ec28e': if (rtcEngineEventHandler.onAudioSubscribeStateChanged == null) { return true; } @@ -1593,11 +1713,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { elapseSinceLastState == null) { return true; } + rtcEngineEventHandler.onAudioSubscribeStateChanged!( channel, uid, oldState, newState, elapseSinceLastState); return true; - case 'onVideoSubscribeStateChanged': + case 'onVideoSubscribeStateChanged_e0ec28e': if (rtcEngineEventHandler.onVideoSubscribeStateChanged == null) { return true; } @@ -1618,11 +1739,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { elapseSinceLastState == null) { return true; } + rtcEngineEventHandler.onVideoSubscribeStateChanged!( channel, uid, oldState, newState, elapseSinceLastState); return true; - case 'onAudioPublishStateChanged': + case 'onAudioPublishStateChanged_2c13a28': if (rtcEngineEventHandler.onAudioPublishStateChanged == null) { return true; } @@ -1641,11 +1763,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { elapseSinceLastState == null) { return true; } + rtcEngineEventHandler.onAudioPublishStateChanged!( channel, oldState, newState, elapseSinceLastState); return true; - case 'onVideoPublishStateChanged': + case 'onVideoPublishStateChanged_5b45b6e': if (rtcEngineEventHandler.onVideoPublishStateChanged == null) { return true; } @@ -1666,11 +1789,42 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { elapseSinceLastState == null) { return true; } + rtcEngineEventHandler.onVideoPublishStateChanged!( source, channel, oldState, newState, elapseSinceLastState); return true; - case 'onExtensionEvent': + case 'onTranscodedStreamLayoutInfo_48f6419': + if (rtcEngineEventHandler.onTranscodedStreamLayoutInfo == null) { + return true; + } + final jsonMap = jsonDecode(eventData); + RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson paramJson = + RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson.fromJson( + jsonMap); + paramJson = paramJson.fillBuffers(buffers); + RtcConnection? connection = paramJson.connection; + int? uid = paramJson.uid; + int? width = paramJson.width; + int? height = paramJson.height; + int? layoutCount = paramJson.layoutCount; + List? layoutlist = paramJson.layoutlist; + if (connection == null || + uid == null || + width == null || + height == null || + layoutCount == null || + layoutlist == null) { + return true; + } + connection = connection.fillBuffers(buffers); + + layoutlist = layoutlist.map((e) => e.fillBuffers(buffers)).toList(); + rtcEngineEventHandler.onTranscodedStreamLayoutInfo!( + connection, uid, width, height, layoutCount, layoutlist); + return true; + + case 'onExtensionEvent_062d13c': if (rtcEngineEventHandler.onExtensionEvent == null) { return true; } @@ -1688,11 +1842,12 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { value == null) { return true; } + rtcEngineEventHandler.onExtensionEvent!( provider, extension, key, value); return true; - case 'onExtensionStarted': + case 'onExtensionStarted_ccad422': if (rtcEngineEventHandler.onExtensionStarted == null) { return true; } @@ -1705,10 +1860,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (provider == null || extension == null) { return true; } + rtcEngineEventHandler.onExtensionStarted!(provider, extension); return true; - case 'onExtensionStopped': + case 'onExtensionStopped_ccad422': if (rtcEngineEventHandler.onExtensionStopped == null) { return true; } @@ -1721,10 +1877,11 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (provider == null || extension == null) { return true; } + rtcEngineEventHandler.onExtensionStopped!(provider, extension); return true; - case 'onExtensionError': + case 'onExtensionError_bd3489b': if (rtcEngineEventHandler.onExtensionError == null) { return true; } @@ -1742,70 +1899,27 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { message == null) { return true; } + rtcEngineEventHandler.onExtensionError!( provider, extension, error, message); return true; - case 'onUserAccountUpdatedEx': - if (rtcEngineEventHandler.onUserAccountUpdated == null) { + case 'onSetRtmFlagResult_263e4cd': + if (rtcEngineEventHandler.onSetRtmFlagResult == null) { return true; } final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnUserAccountUpdatedJson paramJson = - RtcEngineEventHandlerOnUserAccountUpdatedJson.fromJson(jsonMap); + RtcEngineEventHandlerOnSetRtmFlagResultJson paramJson = + RtcEngineEventHandlerOnSetRtmFlagResultJson.fromJson(jsonMap); paramJson = paramJson.fillBuffers(buffers); RtcConnection? connection = paramJson.connection; - int? remoteUid = paramJson.remoteUid; - String? userAccount = paramJson.userAccount; - if (connection == null || remoteUid == null || userAccount == null) { + int? code = paramJson.code; + if (connection == null || code == null) { return true; } connection = connection.fillBuffers(buffers); - rtcEngineEventHandler.onUserAccountUpdated!( - connection, remoteUid, userAccount); - return true; - - case 'onLocalVideoTranscoderError': - if (rtcEngineEventHandler.onLocalVideoTranscoderError == null) { - return true; - } - final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson paramJson = - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson.fromJson( - jsonMap); - paramJson = paramJson.fillBuffers(buffers); - TranscodingVideoStream? stream = paramJson.stream; - VideoTranscoderError? error = paramJson.error; - if (stream == null || error == null) { - return true; - } - stream = stream.fillBuffers(buffers); - rtcEngineEventHandler.onLocalVideoTranscoderError!(stream, error); - return true; - case 'onVideoRenderingTracingResultEx': - if (rtcEngineEventHandler.onVideoRenderingTracingResult == null) { - return true; - } - final jsonMap = jsonDecode(eventData); - RtcEngineEventHandlerOnVideoRenderingTracingResultJson paramJson = - RtcEngineEventHandlerOnVideoRenderingTracingResultJson.fromJson( - jsonMap); - paramJson = paramJson.fillBuffers(buffers); - RtcConnection? connection = paramJson.connection; - int? uid = paramJson.uid; - MediaTraceEvent? currentEvent = paramJson.currentEvent; - VideoRenderingTracingInfo? tracingInfo = paramJson.tracingInfo; - if (connection == null || - uid == null || - currentEvent == null || - tracingInfo == null) { - return true; - } - connection = connection.fillBuffers(buffers); - tracingInfo = tracingInfo.fillBuffers(buffers); - rtcEngineEventHandler.onVideoRenderingTracingResult!( - connection, uid, currentEvent, tracingInfo); + rtcEngineEventHandler.onSetRtmFlagResult!(connection, code); return true; } return false; @@ -1819,14 +1933,15 @@ class RtcEngineEventHandlerWrapper implements EventLoopEventHandler { if (handleEventInternal(newEvent, eventData, buffers)) { return true; } - return false; } } class MetadataObserverWrapper implements EventLoopEventHandler { const MetadataObserverWrapper(this.metadataObserver); + final MetadataObserver metadataObserver; + @override bool operator ==(Object other) { if (other.runtimeType != runtimeType) { @@ -1838,11 +1953,12 @@ class MetadataObserverWrapper implements EventLoopEventHandler { @override int get hashCode => metadataObserver.hashCode; + @override bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onMetadataReceived': + case 'onMetadataReceived_cb7661d': if (metadataObserver.onMetadataReceived == null) { return true; } @@ -1869,7 +1985,6 @@ class MetadataObserverWrapper implements EventLoopEventHandler { if (handleEventInternal(newEvent, eventData, buffers)) { return true; } - return false; } } @@ -1877,7 +1992,9 @@ class MetadataObserverWrapper implements EventLoopEventHandler { class DirectCdnStreamingEventHandlerWrapper implements EventLoopEventHandler { const DirectCdnStreamingEventHandlerWrapper( this.directCdnStreamingEventHandler); + final DirectCdnStreamingEventHandler directCdnStreamingEventHandler; + @override bool operator ==(Object other) { if (other.runtimeType != runtimeType) { @@ -1889,11 +2006,12 @@ class DirectCdnStreamingEventHandlerWrapper implements EventLoopEventHandler { @override int get hashCode => directCdnStreamingEventHandler.hashCode; + @override bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onDirectCdnStreamingStateChanged': + case 'onDirectCdnStreamingStateChanged_40f1fa3': if (directCdnStreamingEventHandler.onDirectCdnStreamingStateChanged == null) { return true; @@ -1905,16 +2023,17 @@ class DirectCdnStreamingEventHandlerWrapper implements EventLoopEventHandler { .fromJson(jsonMap); paramJson = paramJson.fillBuffers(buffers); DirectCdnStreamingState? state = paramJson.state; - DirectCdnStreamingError? error = paramJson.error; + DirectCdnStreamingReason? reason = paramJson.reason; String? message = paramJson.message; - if (state == null || error == null || message == null) { + if (state == null || reason == null || message == null) { return true; } + directCdnStreamingEventHandler.onDirectCdnStreamingStateChanged!( - state, error, message); + state, reason, message); return true; - case 'onDirectCdnStreamingStats': + case 'onDirectCdnStreamingStats_d50595f': if (directCdnStreamingEventHandler.onDirectCdnStreamingStats == null) { return true; } @@ -1943,7 +2062,6 @@ class DirectCdnStreamingEventHandlerWrapper implements EventLoopEventHandler { if (handleEventInternal(newEvent, eventData, buffers)) { return true; } - return false; } } diff --git a/lib/src/binding/agora_rtc_engine_ex_impl.dart b/lib/src/binding/agora_rtc_engine_ex_impl.dart index 566cdf53b..5568209b9 100644 --- a/lib/src/binding/agora_rtc_engine_ex_impl.dart +++ b/lib/src/binding/agora_rtc_engine_ex_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -29,7 +29,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required RtcConnection connection, required ChannelMediaOptions options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_joinChannelEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_joinChannelEx_a3cd08c'; final param = createParams({ 'token': token, 'connection': connection.toJson(), @@ -54,7 +54,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future leaveChannelEx( {required RtcConnection connection, LeaveChannelOptions? options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_leaveChannelEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_leaveChannelEx_b03ee9a'; final param = createParams( {'connection': connection.toJson(), 'options': options?.toJson()}); final List buffers = []; @@ -76,7 +76,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { {required ChannelMediaOptions options, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_updateChannelMediaOptionsEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_updateChannelMediaOptionsEx_457bb35'; final param = createParams( {'options': options.toJson(), 'connection': connection.toJson()}); final List buffers = []; @@ -99,7 +99,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { {required VideoEncoderConfiguration config, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setVideoEncoderConfigurationEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setVideoEncoderConfigurationEx_4670c1e'; final param = createParams( {'config': config.toJson(), 'connection': connection.toJson()}); final List buffers = []; @@ -121,7 +121,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future setupRemoteVideoEx( {required VideoCanvas canvas, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setupRemoteVideoEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setupRemoteVideoEx_522a409'; final param = createParams( {'canvas': canvas.toJson(), 'connection': connection.toJson()}); final List buffers = []; @@ -145,7 +145,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required bool mute, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_muteRemoteAudioStreamEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_muteRemoteAudioStreamEx_6d93082'; final param = createParams( {'uid': uid, 'mute': mute, 'connection': connection.toJson()}); final List buffers = []; @@ -168,7 +168,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required bool mute, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_muteRemoteVideoStreamEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_muteRemoteVideoStreamEx_6d93082'; final param = createParams( {'uid': uid, 'mute': mute, 'connection': connection.toJson()}); final List buffers = []; @@ -191,7 +191,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required VideoStreamType streamType, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteVideoStreamTypeEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteVideoStreamTypeEx_01dc428'; final param = createParams({ 'uid': uid, 'streamType': streamType.value(), @@ -215,7 +215,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future muteLocalAudioStreamEx( {required bool mute, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_muteLocalAudioStreamEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_muteLocalAudioStreamEx_3cf17a4'; final param = createParams({'mute': mute, 'connection': connection.toJson()}); final List buffers = []; @@ -236,7 +236,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future muteLocalVideoStreamEx( {required bool mute, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_muteLocalVideoStreamEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_muteLocalVideoStreamEx_3cf17a4'; final param = createParams({'mute': mute, 'connection': connection.toJson()}); final List buffers = []; @@ -257,7 +257,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future muteAllRemoteAudioStreamsEx( {required bool mute, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_muteAllRemoteAudioStreamsEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_muteAllRemoteAudioStreamsEx_3cf17a4'; final param = createParams({'mute': mute, 'connection': connection.toJson()}); final List buffers = []; @@ -278,7 +278,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future muteAllRemoteVideoStreamsEx( {required bool mute, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_muteAllRemoteVideoStreamsEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_muteAllRemoteVideoStreamsEx_3cf17a4'; final param = createParams({'mute': mute, 'connection': connection.toJson()}); final List buffers = []; @@ -301,7 +301,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int uidNumber, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeAudioBlocklistEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeAudioBlocklistEx_9f1e85c'; final param = createParams({ 'uidList': uidList, 'uidNumber': uidNumber, @@ -327,7 +327,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int uidNumber, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeAudioAllowlistEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeAudioAllowlistEx_9f1e85c'; final param = createParams({ 'uidList': uidList, 'uidNumber': uidNumber, @@ -353,7 +353,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int uidNumber, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeVideoBlocklistEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeVideoBlocklistEx_9f1e85c'; final param = createParams({ 'uidList': uidList, 'uidNumber': uidNumber, @@ -379,7 +379,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int uidNumber, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeVideoAllowlistEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setSubscribeVideoAllowlistEx_9f1e85c'; final param = createParams({ 'uidList': uidList, 'uidNumber': uidNumber, @@ -405,7 +405,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required VideoSubscriptionOptions options, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteVideoSubscriptionOptionsEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteVideoSubscriptionOptionsEx_3cd36bc'; final param = createParams({ 'uid': uid, 'options': options.toJson(), @@ -433,7 +433,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required double gain, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteVoicePositionEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteVoicePositionEx_fc0471c'; final param = createParams({ 'uid': uid, 'pan': pan, @@ -460,7 +460,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required SpatialAudioParams params, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteUserSpatialAudioParamsEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteUserSpatialAudioParamsEx_40ca9fb'; final param = createParams({ 'uid': uid, 'params': params.toJson(), @@ -488,7 +488,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required VideoMirrorModeType mirrorMode, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteRenderModeEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setRemoteRenderModeEx_a72fe4e'; final param = createParams({ 'uid': uid, 'renderMode': renderMode.value(), @@ -515,11 +515,11 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required bool enabled, String? deviceName}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_enableLoopbackRecordingEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_enableLoopbackRecordingEx_4f41542'; final param = createParams({ 'connection': connection.toJson(), 'enabled': enabled, - 'deviceName': deviceName + if (deviceName != null) 'deviceName': deviceName }); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -539,7 +539,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future adjustRecordingSignalVolumeEx( {required int volume, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_adjustRecordingSignalVolumeEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_adjustRecordingSignalVolumeEx_e84d10e'; final param = createParams({'volume': volume, 'connection': connection.toJson()}); final List buffers = []; @@ -560,7 +560,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future muteRecordingSignalEx( {required bool mute, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_muteRecordingSignalEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_muteRecordingSignalEx_3cf17a4'; final param = createParams({'mute': mute, 'connection': connection.toJson()}); final List buffers = []; @@ -583,7 +583,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int volume, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_adjustUserPlaybackSignalVolumeEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_adjustUserPlaybackSignalVolumeEx_adbd29c'; final param = createParams( {'uid': uid, 'volume': volume, 'connection': connection.toJson()}); final List buffers = []; @@ -604,7 +604,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future getConnectionStateEx( RtcConnection connection) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_getConnectionStateEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_getConnectionStateEx_c81e1a4'; final param = createParams({'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -624,7 +624,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required bool enabled, required EncryptionConfig config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_enableEncryptionEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_enableEncryptionEx_10cd872'; final param = createParams({ 'connection': connection.toJson(), 'enabled': enabled, @@ -650,7 +650,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { {required DataStreamConfig config, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_createDataStreamEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_createDataStreamEx_9f641b6'; final param = createParams( {'config': config.toJson(), 'connection': connection.toJson()}); final List buffers = []; @@ -678,7 +678,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int length, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_sendStreamMessageEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_sendStreamMessageEx_0c34857'; final param = createParams({ 'streamId': streamId, 'length': length, @@ -705,7 +705,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required WatermarkOptions options, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_addVideoWatermarkEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_addVideoWatermarkEx_ad7daa3'; final param = createParams({ 'watermarkUrl': watermarkUrl, 'options': options.toJson(), @@ -729,7 +729,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { @override Future clearVideoWatermarkEx(RtcConnection connection) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_clearVideoWatermarkEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_clearVideoWatermarkEx_c81e1a4'; final param = createParams({'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -754,7 +754,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int value, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_sendCustomReportMessageEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_sendCustomReportMessageEx_833b8a5'; final param = createParams({ 'id': id, 'category': category, @@ -784,7 +784,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required bool reportVad, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_enableAudioVolumeIndicationEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_enableAudioVolumeIndicationEx_ac84f2a'; final param = createParams({ 'interval': interval, 'smooth': smooth, @@ -809,7 +809,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future startRtmpStreamWithoutTranscodingEx( {required String url, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_startRtmpStreamWithoutTranscodingEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_startRtmpStreamWithoutTranscodingEx_e405325'; final param = createParams({'url': url, 'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -831,7 +831,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required LiveTranscoding transcoding, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_startRtmpStreamWithTranscodingEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_startRtmpStreamWithTranscodingEx_ab121b5'; final param = createParams({ 'url': url, 'transcoding': transcoding.toJson(), @@ -857,7 +857,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { {required LiveTranscoding transcoding, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_updateRtmpTranscodingEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_updateRtmpTranscodingEx_77f3ee8'; final param = createParams({ 'transcoding': transcoding.toJson(), 'connection': connection.toJson() @@ -881,7 +881,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future stopRtmpStreamEx( {required String url, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_stopRtmpStreamEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_stopRtmpStreamEx_e405325'; final param = createParams({'url': url, 'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -902,57 +902,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { {required ChannelMediaRelayConfiguration configuration, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_startOrUpdateChannelMediaRelayEx'; - final param = createParams({ - 'configuration': configuration.toJson(), - 'connection': connection.toJson() - }); - final List buffers = []; - buffers.addAll(configuration.collectBufferList()); - buffers.addAll(connection.collectBufferList()); - final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); - if (callApiResult.irisReturnCode < 0) { - throw AgoraRtcException(code: callApiResult.irisReturnCode); - } - final rm = callApiResult.data; - final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } - } - - @override - Future startChannelMediaRelayEx( - {required ChannelMediaRelayConfiguration configuration, - required RtcConnection connection}) async { - final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_startChannelMediaRelayEx'; - final param = createParams({ - 'configuration': configuration.toJson(), - 'connection': connection.toJson() - }); - final List buffers = []; - buffers.addAll(configuration.collectBufferList()); - buffers.addAll(connection.collectBufferList()); - final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); - if (callApiResult.irisReturnCode < 0) { - throw AgoraRtcException(code: callApiResult.irisReturnCode); - } - final rm = callApiResult.data; - final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } - } - - @override - Future updateChannelMediaRelayEx( - {required ChannelMediaRelayConfiguration configuration, - required RtcConnection connection}) async { - final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_updateChannelMediaRelayEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_startOrUpdateChannelMediaRelayEx_4ad39a8'; final param = createParams({ 'configuration': configuration.toJson(), 'connection': connection.toJson() @@ -975,7 +925,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { @override Future stopChannelMediaRelayEx(RtcConnection connection) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_stopChannelMediaRelayEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_stopChannelMediaRelayEx_c81e1a4'; final param = createParams({'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -994,7 +944,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { @override Future pauseAllChannelMediaRelayEx(RtcConnection connection) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_pauseAllChannelMediaRelayEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_pauseAllChannelMediaRelayEx_c81e1a4'; final param = createParams({'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -1013,7 +963,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { @override Future resumeAllChannelMediaRelayEx(RtcConnection connection) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_resumeAllChannelMediaRelayEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_resumeAllChannelMediaRelayEx_c81e1a4'; final param = createParams({'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -1033,7 +983,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future getUserInfoByUserAccountEx( {required String userAccount, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_getUserInfoByUserAccountEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_getUserInfoByUserAccountEx_ca39cc6'; final param = createParams( {'userAccount': userAccount, 'connection': connection.toJson()}); final List buffers = []; @@ -1057,7 +1007,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { Future getUserInfoByUidEx( {required int uid, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_getUserInfoByUidEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_getUserInfoByUidEx_1e78da1'; final param = createParams({'uid': uid, 'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -1082,7 +1032,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required SimulcastStreamConfig streamConfig, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_enableDualStreamModeEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_enableDualStreamModeEx_4b18f41'; final param = createParams({ 'enabled': enabled, 'streamConfig': streamConfig.toJson(), @@ -1109,7 +1059,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required SimulcastStreamConfig streamConfig, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setDualStreamModeEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setDualStreamModeEx_622d0f3'; final param = createParams({ 'mode': mode.value(), 'streamConfig': streamConfig.toJson(), @@ -1137,7 +1087,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required StreamFallbackOptions option, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_setHighPriorityUserListEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_setHighPriorityUserListEx_8736b5c'; final param = createParams({ 'uidList': uidList, 'uidNum': uidNum, @@ -1164,7 +1114,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required int uid, required String filePath}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_takeSnapshotEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_takeSnapshotEx_de1c015'; final param = createParams( {'connection': connection.toJson(), 'uid': uid, 'filePath': filePath}); final List buffers = []; @@ -1187,7 +1137,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { required ContentInspectConfig config, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_enableContentInspectEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_enableContentInspectEx_c4e7f69'; final param = createParams({ 'enabled': enabled, 'config': config.toJson(), @@ -1211,7 +1161,7 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { @override Future startMediaRenderingTracingEx(RtcConnection connection) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngineEx'}_startMediaRenderingTracingEx'; + '${isOverrideClassName ? className : 'RtcEngineEx'}_startMediaRenderingTracingEx_c81e1a4'; final param = createParams({'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); @@ -1226,4 +1176,25 @@ class RtcEngineExImpl extends RtcEngineImpl implements RtcEngineEx { throw AgoraRtcException(code: result); } } + + @override + Future setParametersEx( + {required RtcConnection connection, required String parameters}) async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngineEx'}_setParametersEx_8225ea3'; + final param = createParams( + {'connection': connection.toJson(), 'parameters': parameters}); + final List buffers = []; + buffers.addAll(connection.collectBufferList()); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } } diff --git a/lib/src/binding/agora_rtc_engine_impl.dart b/lib/src/binding/agora_rtc_engine_impl.dart index 17f523c96..8b814b18d 100644 --- a/lib/src/binding/agora_rtc_engine_impl.dart +++ b/lib/src/binding/agora_rtc_engine_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -40,7 +40,7 @@ class VideoDeviceManagerImpl implements VideoDeviceManager { @override Future setDevice(String deviceIdUTF8) async { final apiType = - '${isOverrideClassName ? className : 'VideoDeviceManager'}_setDevice'; + '${isOverrideClassName ? className : 'VideoDeviceManager'}_setDevice_4ad5f6e'; final param = createParams({'deviceIdUTF8': deviceIdUTF8}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -57,7 +57,7 @@ class VideoDeviceManagerImpl implements VideoDeviceManager { @override Future getDevice() async { final apiType = - '${isOverrideClassName ? className : 'VideoDeviceManager'}_getDevice'; + '${isOverrideClassName ? className : 'VideoDeviceManager'}_getDevice_73b9872'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -76,7 +76,7 @@ class VideoDeviceManagerImpl implements VideoDeviceManager { @override Future numberOfCapabilities(String deviceIdUTF8) async { final apiType = - '${isOverrideClassName ? className : 'VideoDeviceManager'}_numberOfCapabilities'; + '${isOverrideClassName ? className : 'VideoDeviceManager'}_numberOfCapabilities_3a2037f'; final param = createParams({'deviceIdUTF8': deviceIdUTF8}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -93,7 +93,7 @@ class VideoDeviceManagerImpl implements VideoDeviceManager { {required String deviceIdUTF8, required int deviceCapabilityNumber}) async { final apiType = - '${isOverrideClassName ? className : 'VideoDeviceManager'}_getCapability'; + '${isOverrideClassName ? className : 'VideoDeviceManager'}_getCapability_ddeefdd'; final param = createParams({ 'deviceIdUTF8': deviceIdUTF8, 'deviceCapabilityNumber': deviceCapabilityNumber @@ -115,7 +115,7 @@ class VideoDeviceManagerImpl implements VideoDeviceManager { @override Future startDeviceTest(int hwnd) async { final apiType = - '${isOverrideClassName ? className : 'VideoDeviceManager'}_startDeviceTest'; + '${isOverrideClassName ? className : 'VideoDeviceManager'}_startDeviceTest_a55f55f'; final param = createParams({'hwnd': hwnd}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -181,26 +181,10 @@ class RtcEngineImpl implements RtcEngine { @protected String get className => 'RtcEngine'; - @override - Future release({bool sync = false}) async { - final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_release'; - final param = createParams({'sync': sync}); - final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); - if (callApiResult.irisReturnCode < 0) { - throw AgoraRtcException(code: callApiResult.irisReturnCode); - } - final rm = callApiResult.data; - final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } - } - @override Future initialize(RtcEngineContext context) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_initialize'; + '${isOverrideClassName ? className : 'RtcEngine'}_initialize_0320339'; final param = createParams({'context': context.toJson()}); final List buffers = []; buffers.addAll(context.collectBufferList()); @@ -219,7 +203,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getVersion() async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getVersion'; + '${isOverrideClassName ? className : 'RtcEngine'}_getVersion_915cb25'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -234,7 +218,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getErrorDescription(int code) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getErrorDescription'; + '${isOverrideClassName ? className : 'RtcEngine'}_getErrorDescription_46f8ab7'; final param = createParams({'code': code}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -249,7 +233,7 @@ class RtcEngineImpl implements RtcEngine { @override Future> queryCodecCapability(int size) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_queryCodecCapability'; + '${isOverrideClassName ? className : 'RtcEngine'}_queryCodecCapability_ddf4f31'; final param = createParams({'size': size}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -266,13 +250,28 @@ class RtcEngineImpl implements RtcEngine { return queryCodecCapabilityJson.codecInfo; } + @override + Future queryDeviceScore() async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_queryDeviceScore'; + final param = createParams({}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + return result as int; + } + @override Future preloadChannel( {required String token, required String channelId, required int uid}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_preloadChannel'; + '${isOverrideClassName ? className : 'RtcEngine'}_preloadChannel_a0779eb'; final param = createParams({'token': token, 'channelId': channelId, 'uid': uid}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -290,7 +289,7 @@ class RtcEngineImpl implements RtcEngine { required String channelId, required String userAccount}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_preloadChannelWithUserAccount'; + '${isOverrideClassName ? className : 'RtcEngine'}_preloadChannelWithUserAccount_0e4f59e'; final param = createParams( {'token': token, 'channelId': channelId, 'userAccount': userAccount}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -305,7 +304,7 @@ class RtcEngineImpl implements RtcEngine { @override Future updatePreloadChannelToken(String token) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updatePreloadChannelToken'; + '${isOverrideClassName ? className : 'RtcEngine'}_updatePreloadChannelToken_3a2037f'; final param = createParams({'token': token}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -326,7 +325,7 @@ class RtcEngineImpl implements RtcEngine { required int uid, required ChannelMediaOptions options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_joinChannel'; + '${isOverrideClassName ? className : 'RtcEngine'}_joinChannel_cdbb747'; final param = createParams({ 'token': token, 'channelId': channelId, @@ -347,7 +346,7 @@ class RtcEngineImpl implements RtcEngine { @override Future updateChannelMediaOptions(ChannelMediaOptions options) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateChannelMediaOptions'; + '${isOverrideClassName ? className : 'RtcEngine'}_updateChannelMediaOptions_7bfc1d7'; final param = createParams({'options': options.toJson()}); final List buffers = []; buffers.addAll(options.collectBufferList()); @@ -366,7 +365,7 @@ class RtcEngineImpl implements RtcEngine { @override Future leaveChannel({LeaveChannelOptions? options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_leaveChannel'; + '${isOverrideClassName ? className : 'RtcEngine'}_leaveChannel_2c0e3aa'; final param = createParams({'options': options?.toJson()}); final List buffers = []; if (options != null) { @@ -384,7 +383,7 @@ class RtcEngineImpl implements RtcEngine { @override Future renewToken(String token) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_renewToken'; + '${isOverrideClassName ? className : 'RtcEngine'}_renewToken_3a2037f'; final param = createParams({'token': token}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -401,7 +400,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setChannelProfile(ChannelProfileType profile) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setChannelProfile'; + '${isOverrideClassName ? className : 'RtcEngine'}_setChannelProfile_a78fa4f'; final param = createParams({'profile': profile.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -419,7 +418,7 @@ class RtcEngineImpl implements RtcEngine { Future setClientRole( {required ClientRoleType role, ClientRoleOptions? options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setClientRole'; + '${isOverrideClassName ? className : 'RtcEngine'}_setClientRole_b46cc48'; final param = createParams({'role': role.value(), 'options': options?.toJson()}); final List buffers = []; @@ -438,7 +437,7 @@ class RtcEngineImpl implements RtcEngine { @override Future startEchoTest(EchoTestConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startEchoTest'; + '${isOverrideClassName ? className : 'RtcEngine'}_startEchoTest_16140d7'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -473,7 +472,7 @@ class RtcEngineImpl implements RtcEngine { {required bool enabled, required CameraCapturerConfiguration config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableMultiCamera'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableMultiCamera_bffe023'; final param = createParams({'enabled': enabled, 'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -528,7 +527,7 @@ class RtcEngineImpl implements RtcEngine { {VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startPreview'; + '${isOverrideClassName ? className : 'RtcEngine'}_startPreview_4fd718e'; final param = createParams({'sourceType': sourceType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -539,12 +538,26 @@ class RtcEngineImpl implements RtcEngine { final result = rm['result']; } + @override + Future startPreviewWithoutSourceType() async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_startPreview'; + final param = createParams({}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + } + @override Future stopPreview( {VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_stopPreview'; + '${isOverrideClassName ? className : 'RtcEngine'}_stopPreview_4fd718e'; final param = createParams({'sourceType': sourceType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -558,7 +571,7 @@ class RtcEngineImpl implements RtcEngine { @override Future startLastmileProbeTest(LastmileProbeConfig config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startLastmileProbeTest'; + '${isOverrideClassName ? className : 'RtcEngine'}_startLastmileProbeTest_c4de423'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -595,7 +608,7 @@ class RtcEngineImpl implements RtcEngine { Future setVideoEncoderConfiguration( VideoEncoderConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVideoEncoderConfiguration'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVideoEncoderConfiguration_89677d8'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -617,7 +630,7 @@ class RtcEngineImpl implements RtcEngine { required BeautyOptions options, MediaSourceType type = MediaSourceType.primaryCameraSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setBeautyEffectOptions'; + '${isOverrideClassName ? className : 'RtcEngine'}_setBeautyEffectOptions_e7635d1'; final param = createParams({ 'enabled': enabled, 'options': options.toJson(), @@ -643,7 +656,7 @@ class RtcEngineImpl implements RtcEngine { required LowlightEnhanceOptions options, MediaSourceType type = MediaSourceType.primaryCameraSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLowlightEnhanceOptions'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLowlightEnhanceOptions_4f9f013'; final param = createParams({ 'enabled': enabled, 'options': options.toJson(), @@ -669,7 +682,7 @@ class RtcEngineImpl implements RtcEngine { required VideoDenoiserOptions options, MediaSourceType type = MediaSourceType.primaryCameraSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVideoDenoiserOptions'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVideoDenoiserOptions_4e9fccc'; final param = createParams({ 'enabled': enabled, 'options': options.toJson(), @@ -695,7 +708,7 @@ class RtcEngineImpl implements RtcEngine { required ColorEnhanceOptions options, MediaSourceType type = MediaSourceType.primaryCameraSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setColorEnhanceOptions'; + '${isOverrideClassName ? className : 'RtcEngine'}_setColorEnhanceOptions_ecae2b3'; final param = createParams({ 'enabled': enabled, 'options': options.toJson(), @@ -722,7 +735,7 @@ class RtcEngineImpl implements RtcEngine { required SegmentationProperty segproperty, MediaSourceType type = MediaSourceType.primaryCameraSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableVirtualBackground'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableVirtualBackground_6dd8ee4'; final param = createParams({ 'enabled': enabled, 'backgroundSource': backgroundSource.toJson(), @@ -747,7 +760,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setupRemoteVideo(VideoCanvas canvas) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setupRemoteVideo'; + '${isOverrideClassName ? className : 'RtcEngine'}_setupRemoteVideo_acc9c38'; final param = createParams({'canvas': canvas.toJson()}); final List buffers = []; buffers.addAll(canvas.collectBufferList()); @@ -766,7 +779,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setupLocalVideo(VideoCanvas canvas) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setupLocalVideo'; + '${isOverrideClassName ? className : 'RtcEngine'}_setupLocalVideo_acc9c38'; final param = createParams({'canvas': canvas.toJson()}); final List buffers = []; buffers.addAll(canvas.collectBufferList()); @@ -786,7 +799,7 @@ class RtcEngineImpl implements RtcEngine { Future setVideoScenario( VideoApplicationScenarioType scenarioType) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVideoScenario'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVideoScenario_c02cd1c'; final param = createParams({'scenarioType': scenarioType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -800,6 +813,24 @@ class RtcEngineImpl implements RtcEngine { } } + @override + Future setVideoQoEPreference( + VideoQoePreferenceType qoePreference) async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_setVideoQoEPreference_c4a3d9f'; + final param = createParams({'qoePreference': qoePreference.value()}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } + @override Future enableAudio() async { final apiType = @@ -840,7 +871,7 @@ class RtcEngineImpl implements RtcEngine { AudioScenarioType scenario = AudioScenarioType.audioScenarioDefault}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioProfile'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioProfile_d944543'; final param = createParams( {'profile': profile.value(), 'scenario': scenario.value()}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -855,7 +886,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setAudioScenario(AudioScenarioType scenario) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioScenario'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioScenario_c36f5c1'; final param = createParams({'scenario': scenario.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -872,7 +903,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableLocalAudio(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableLocalAudio'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableLocalAudio_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -889,7 +920,7 @@ class RtcEngineImpl implements RtcEngine { @override Future muteLocalAudioStream(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_muteLocalAudioStream'; + '${isOverrideClassName ? className : 'RtcEngine'}_muteLocalAudioStream_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -906,7 +937,7 @@ class RtcEngineImpl implements RtcEngine { @override Future muteAllRemoteAudioStreams(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_muteAllRemoteAudioStreams'; + '${isOverrideClassName ? className : 'RtcEngine'}_muteAllRemoteAudioStreams_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -923,7 +954,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setDefaultMuteAllRemoteAudioStreams(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setDefaultMuteAllRemoteAudioStreams'; + '${isOverrideClassName ? className : 'RtcEngine'}_setDefaultMuteAllRemoteAudioStreams_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -941,7 +972,7 @@ class RtcEngineImpl implements RtcEngine { Future muteRemoteAudioStream( {required int uid, required bool mute}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_muteRemoteAudioStream'; + '${isOverrideClassName ? className : 'RtcEngine'}_muteRemoteAudioStream_dbdc15a'; final param = createParams({'uid': uid, 'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -958,7 +989,7 @@ class RtcEngineImpl implements RtcEngine { @override Future muteLocalVideoStream(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_muteLocalVideoStream'; + '${isOverrideClassName ? className : 'RtcEngine'}_muteLocalVideoStream_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -975,7 +1006,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableLocalVideo(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableLocalVideo'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableLocalVideo_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -992,7 +1023,7 @@ class RtcEngineImpl implements RtcEngine { @override Future muteAllRemoteVideoStreams(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_muteAllRemoteVideoStreams'; + '${isOverrideClassName ? className : 'RtcEngine'}_muteAllRemoteVideoStreams_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1009,7 +1040,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setDefaultMuteAllRemoteVideoStreams(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setDefaultMuteAllRemoteVideoStreams'; + '${isOverrideClassName ? className : 'RtcEngine'}_setDefaultMuteAllRemoteVideoStreams_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1024,11 +1055,11 @@ class RtcEngineImpl implements RtcEngine { } @override - Future muteRemoteVideoStream( - {required int uid, required bool mute}) async { + Future setRemoteDefaultVideoStreamType( + VideoStreamType streamType) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_muteRemoteVideoStream'; - final param = createParams({'uid': uid, 'mute': mute}); + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteDefaultVideoStreamType_5a94eb0'; + final param = createParams({'streamType': streamType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -1042,11 +1073,11 @@ class RtcEngineImpl implements RtcEngine { } @override - Future setRemoteVideoStreamType( - {required int uid, required VideoStreamType streamType}) async { + Future muteRemoteVideoStream( + {required int uid, required bool mute}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteVideoStreamType'; - final param = createParams({'uid': uid, 'streamType': streamType.value()}); + '${isOverrideClassName ? className : 'RtcEngine'}_muteRemoteVideoStream_dbdc15a'; + final param = createParams({'uid': uid, 'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -1060,15 +1091,13 @@ class RtcEngineImpl implements RtcEngine { } @override - Future setRemoteVideoSubscriptionOptions( - {required int uid, required VideoSubscriptionOptions options}) async { + Future setRemoteVideoStreamType( + {required int uid, required VideoStreamType streamType}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteVideoSubscriptionOptions'; - final param = createParams({'uid': uid, 'options': options.toJson()}); - final List buffers = []; - buffers.addAll(options.collectBufferList()); + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteVideoStreamType_9e6406e'; + final param = createParams({'uid': uid, 'streamType': streamType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -1080,13 +1109,15 @@ class RtcEngineImpl implements RtcEngine { } @override - Future setRemoteDefaultVideoStreamType( - VideoStreamType streamType) async { + Future setRemoteVideoSubscriptionOptions( + {required int uid, required VideoSubscriptionOptions options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteDefaultVideoStreamType'; - final param = createParams({'streamType': streamType.value()}); + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteVideoSubscriptionOptions_0b6b258'; + final param = createParams({'uid': uid, 'options': options.toJson()}); + final List buffers = []; + buffers.addAll(options.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -1101,7 +1132,7 @@ class RtcEngineImpl implements RtcEngine { Future setSubscribeAudioBlocklist( {required List uidList, required int uidNumber}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeAudioBlocklist'; + '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeAudioBlocklist_2d31fd5'; final param = createParams({'uidList': uidList, 'uidNumber': uidNumber}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1119,7 +1150,7 @@ class RtcEngineImpl implements RtcEngine { Future setSubscribeAudioAllowlist( {required List uidList, required int uidNumber}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeAudioAllowlist'; + '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeAudioAllowlist_2d31fd5'; final param = createParams({'uidList': uidList, 'uidNumber': uidNumber}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1137,7 +1168,7 @@ class RtcEngineImpl implements RtcEngine { Future setSubscribeVideoBlocklist( {required List uidList, required int uidNumber}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeVideoBlocklist'; + '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeVideoBlocklist_2d31fd5'; final param = createParams({'uidList': uidList, 'uidNumber': uidNumber}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1155,7 +1186,7 @@ class RtcEngineImpl implements RtcEngine { Future setSubscribeVideoAllowlist( {required List uidList, required int uidNumber}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeVideoAllowlist'; + '${isOverrideClassName ? className : 'RtcEngine'}_setSubscribeVideoAllowlist_2d31fd5'; final param = createParams({'uidList': uidList, 'uidNumber': uidNumber}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1175,7 +1206,7 @@ class RtcEngineImpl implements RtcEngine { required int smooth, required bool reportVad}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableAudioVolumeIndication'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableAudioVolumeIndication_39794a0'; final param = createParams( {'interval': interval, 'smooth': smooth, 'reportVad': reportVad}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -1193,7 +1224,7 @@ class RtcEngineImpl implements RtcEngine { @override Future startAudioRecording(AudioRecordingConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startAudioRecording'; + '${isOverrideClassName ? className : 'RtcEngine'}_startAudioRecording_e32bb3b'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -1211,7 +1242,7 @@ class RtcEngineImpl implements RtcEngine { {required AudioEncodedFrameObserverConfig config, required AudioEncodedFrameObserver observer}) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerAudioEncodedFrameObserver'; +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerAudioEncodedFrameObserver_ed4a177'; // final param = createParams({// 'config':config.toJson(), 'observer':observer// }); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -1263,7 +1294,7 @@ class RtcEngineImpl implements RtcEngine { @override Future destroyMediaPlayer(MediaPlayer mediaPlayer) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_destroyMediaPlayer'; + '${isOverrideClassName ? className : 'RtcEngine'}_destroyMediaPlayer_328a49b'; final param = createParams({'media_player': mediaPlayer}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1280,7 +1311,7 @@ class RtcEngineImpl implements RtcEngine { @override Future createMediaRecorder(RecorderStreamInfo info) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_createMediaRecorder'; + '${isOverrideClassName ? className : 'RtcEngine'}_createMediaRecorder_f779617'; final param = createParams({'info': info.toJson()}); final List buffers = []; buffers.addAll(info.collectBufferList()); @@ -1297,7 +1328,7 @@ class RtcEngineImpl implements RtcEngine { @override Future destroyMediaRecorder(MediaRecorder mediaRecorder) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_destroyMediaRecorder'; + '${isOverrideClassName ? className : 'RtcEngine'}_destroyMediaRecorder_95cdef5'; final param = createParams({'mediaRecorder': mediaRecorder}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1318,7 +1349,7 @@ class RtcEngineImpl implements RtcEngine { required int cycle, int startPos = 0}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startAudioMixing'; + '${isOverrideClassName ? className : 'RtcEngine'}_startAudioMixing_1ee1b1e'; final param = createParams({ 'filePath': filePath, 'loopback': loopback, @@ -1388,7 +1419,7 @@ class RtcEngineImpl implements RtcEngine { @override Future selectAudioTrack(int index) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_selectAudioTrack'; + '${isOverrideClassName ? className : 'RtcEngine'}_selectAudioTrack_46f8ab7'; final param = createParams({'index': index}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1420,7 +1451,7 @@ class RtcEngineImpl implements RtcEngine { @override Future adjustAudioMixingVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustAudioMixingVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustAudioMixingVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1437,7 +1468,7 @@ class RtcEngineImpl implements RtcEngine { @override Future adjustAudioMixingPublishVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustAudioMixingPublishVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustAudioMixingPublishVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1469,7 +1500,7 @@ class RtcEngineImpl implements RtcEngine { @override Future adjustAudioMixingPlayoutVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustAudioMixingPlayoutVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustAudioMixingPlayoutVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1531,7 +1562,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setAudioMixingPosition(int pos) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioMixingPosition'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioMixingPosition_46f8ab7'; final param = createParams({'pos': pos}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1548,7 +1579,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setAudioMixingDualMonoMode(AudioMixingDualMonoMode mode) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioMixingDualMonoMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioMixingDualMonoMode_38a5515'; final param = createParams({'mode': mode.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1565,7 +1596,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setAudioMixingPitch(int pitch) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioMixingPitch'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioMixingPitch_46f8ab7'; final param = createParams({'pitch': pitch}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1597,7 +1628,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setEffectsVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setEffectsVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_setEffectsVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1617,7 +1648,7 @@ class RtcEngineImpl implements RtcEngine { required String filePath, int startPos = 0}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_preloadEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_preloadEffect_282ba8c'; final param = createParams( {'soundId': soundId, 'filePath': filePath, 'startPos': startPos}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -1643,7 +1674,7 @@ class RtcEngineImpl implements RtcEngine { bool publish = false, int startPos = 0}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_playEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_playEffect_531a783'; final param = createParams({ 'soundId': soundId, 'filePath': filePath, @@ -1674,7 +1705,7 @@ class RtcEngineImpl implements RtcEngine { required int gain, bool publish = false}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_playAllEffects'; + '${isOverrideClassName ? className : 'RtcEngine'}_playAllEffects_20d7df2'; final param = createParams({ 'loopCount': loopCount, 'pitch': pitch, @@ -1697,7 +1728,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getVolumeOfEffect(int soundId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getVolumeOfEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_getVolumeOfEffect_46f8ab7'; final param = createParams({'soundId': soundId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1713,7 +1744,7 @@ class RtcEngineImpl implements RtcEngine { Future setVolumeOfEffect( {required int soundId, required int volume}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVolumeOfEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVolumeOfEffect_4e92b3c'; final param = createParams({'soundId': soundId, 'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1730,7 +1761,7 @@ class RtcEngineImpl implements RtcEngine { @override Future pauseEffect(int soundId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_pauseEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_pauseEffect_46f8ab7'; final param = createParams({'soundId': soundId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1764,7 +1795,7 @@ class RtcEngineImpl implements RtcEngine { @override Future resumeEffect(int soundId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_resumeEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_resumeEffect_46f8ab7'; final param = createParams({'soundId': soundId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1798,7 +1829,7 @@ class RtcEngineImpl implements RtcEngine { @override Future stopEffect(int soundId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_stopEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_stopEffect_46f8ab7'; final param = createParams({'soundId': soundId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1832,7 +1863,7 @@ class RtcEngineImpl implements RtcEngine { @override Future unloadEffect(int soundId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_unloadEffect'; + '${isOverrideClassName ? className : 'RtcEngine'}_unloadEffect_46f8ab7'; final param = createParams({'soundId': soundId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1866,7 +1897,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getEffectDuration(String filePath) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getEffectDuration'; + '${isOverrideClassName ? className : 'RtcEngine'}_getEffectDuration_3a2037f'; final param = createParams({'filePath': filePath}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1882,7 +1913,7 @@ class RtcEngineImpl implements RtcEngine { Future setEffectPosition( {required int soundId, required int pos}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setEffectPosition'; + '${isOverrideClassName ? className : 'RtcEngine'}_setEffectPosition_4e92b3c'; final param = createParams({'soundId': soundId, 'pos': pos}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1899,7 +1930,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getEffectCurrentPosition(int soundId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getEffectCurrentPosition'; + '${isOverrideClassName ? className : 'RtcEngine'}_getEffectCurrentPosition_46f8ab7'; final param = createParams({'soundId': soundId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1914,7 +1945,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableSoundPositionIndication(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableSoundPositionIndication'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableSoundPositionIndication_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1932,7 +1963,7 @@ class RtcEngineImpl implements RtcEngine { Future setRemoteVoicePosition( {required int uid, required double pan, required double gain}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteVoicePosition'; + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteVoicePosition_250b42d'; final param = createParams({'uid': uid, 'pan': pan, 'gain': gain}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1949,7 +1980,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableSpatialAudio(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableSpatialAudio'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableSpatialAudio_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1967,7 +1998,7 @@ class RtcEngineImpl implements RtcEngine { Future setRemoteUserSpatialAudioParams( {required int uid, required SpatialAudioParams params}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteUserSpatialAudioParams'; + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteUserSpatialAudioParams_65a7855'; final param = createParams({'uid': uid, 'params': params.toJson()}); final List buffers = []; buffers.addAll(params.collectBufferList()); @@ -1986,7 +2017,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setVoiceBeautifierPreset(VoiceBeautifierPreset preset) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceBeautifierPreset'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceBeautifierPreset_4dd6319'; final param = createParams({'preset': preset.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2003,7 +2034,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setAudioEffectPreset(AudioEffectPreset preset) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioEffectPreset'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioEffectPreset_92ea92c'; final param = createParams({'preset': preset.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2020,7 +2051,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setVoiceConversionPreset(VoiceConversionPreset preset) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceConversionPreset'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceConversionPreset_d14ee73'; final param = createParams({'preset': preset.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2040,7 +2071,7 @@ class RtcEngineImpl implements RtcEngine { required int param1, required int param2}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioEffectParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioEffectParameters_73bc670'; final param = createParams( {'preset': preset.value(), 'param1': param1, 'param2': param2}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -2061,7 +2092,7 @@ class RtcEngineImpl implements RtcEngine { required int param1, required int param2}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceBeautifierParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceBeautifierParameters_f3cf745'; final param = createParams( {'preset': preset.value(), 'param1': param1, 'param2': param2}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -2082,7 +2113,7 @@ class RtcEngineImpl implements RtcEngine { required int param1, required int param2}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceConversionParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setVoiceConversionParameters_2f5022e'; final param = createParams( {'preset': preset.value(), 'param1': param1, 'param2': param2}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -2100,7 +2131,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLocalVoicePitch(double pitch) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoicePitch'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoicePitch_bdb36bb'; final param = createParams({'pitch': pitch}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2117,7 +2148,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLocalVoiceFormant(double formantRatio) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoiceFormant'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoiceFormant_bdb36bb'; final param = createParams({'formantRatio': formantRatio}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2136,7 +2167,7 @@ class RtcEngineImpl implements RtcEngine { {required AudioEqualizationBandFrequency bandFrequency, required int bandGain}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoiceEqualization'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoiceEqualization_d14012c'; final param = createParams( {'bandFrequency': bandFrequency.value(), 'bandGain': bandGain}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -2155,7 +2186,7 @@ class RtcEngineImpl implements RtcEngine { Future setLocalVoiceReverb( {required AudioReverbType reverbKey, required int value}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoiceReverb'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVoiceReverb_29c2013'; final param = createParams({'reverbKey': reverbKey.value(), 'value': value}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -2173,7 +2204,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setHeadphoneEQPreset(HeadphoneEqualizerPreset preset) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setHeadphoneEQPreset'; + '${isOverrideClassName ? className : 'RtcEngine'}_setHeadphoneEQPreset_b679644'; final param = createParams({'preset': preset.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2191,7 +2222,7 @@ class RtcEngineImpl implements RtcEngine { Future setHeadphoneEQParameters( {required int lowGain, required int highGain}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setHeadphoneEQParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setHeadphoneEQParameters_4e92b3c'; final param = createParams({'lowGain': lowGain, 'highGain': highGain}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2208,7 +2239,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLogFile(String filePath) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLogFile'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLogFile_3a2037f'; final param = createParams({'filePath': filePath}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2225,7 +2256,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLogFilter(LogFilterType filter) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLogFilter'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLogFilter_2626ac7'; final param = createParams({'filter': filter.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2242,7 +2273,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLogLevel(LogLevel level) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLogLevel'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLogLevel_f125d83'; final param = createParams({'level': level.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2259,7 +2290,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLogFileSize(int fileSizeInKBytes) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLogFileSize'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLogFileSize_2626ac7'; final param = createParams({'fileSizeInKBytes': fileSizeInKBytes}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2276,7 +2307,7 @@ class RtcEngineImpl implements RtcEngine { @override Future uploadLogFile() async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_uploadLogFile'; + '${isOverrideClassName ? className : 'RtcEngine'}_uploadLogFile_66d4ecd'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2298,7 +2329,7 @@ class RtcEngineImpl implements RtcEngine { VideoMirrorModeType mirrorMode = VideoMirrorModeType.videoMirrorModeAuto}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalRenderMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalRenderMode_cfb201b'; final param = createParams( {'renderMode': renderMode.value(), 'mirrorMode': mirrorMode.value()}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -2316,7 +2347,7 @@ class RtcEngineImpl implements RtcEngine { required RenderModeType renderMode, required VideoMirrorModeType mirrorMode}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteRenderMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteRenderMode_6771ce0'; final param = createParams({ 'uid': uid, 'renderMode': renderMode.value(), @@ -2337,7 +2368,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLocalVideoMirrorMode(VideoMirrorModeType mirrorMode) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVideoMirrorMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalVideoMirrorMode_b8a6c69'; final param = createParams({'mirrorMode': mirrorMode.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2355,7 +2386,7 @@ class RtcEngineImpl implements RtcEngine { Future enableDualStreamMode( {required bool enabled, SimulcastStreamConfig? streamConfig}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableDualStreamMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableDualStreamMode_9822d8a'; final param = createParams( {'enabled': enabled, 'streamConfig': streamConfig?.toJson()}); final List buffers = []; @@ -2376,7 +2407,7 @@ class RtcEngineImpl implements RtcEngine { {required SimulcastStreamMode mode, SimulcastStreamConfig? streamConfig}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setDualStreamMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setDualStreamMode_b3a4f6c'; final param = createParams( {'mode': mode.value(), 'streamConfig': streamConfig?.toJson()}); final List buffers = []; @@ -2396,7 +2427,7 @@ class RtcEngineImpl implements RtcEngine { Future enableCustomAudioLocalPlayback( {required int trackId, required bool enabled}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableCustomAudioLocalPlayback'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableCustomAudioLocalPlayback_9566341'; final param = createParams({'trackId': trackId, 'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2417,7 +2448,7 @@ class RtcEngineImpl implements RtcEngine { required RawAudioFrameOpModeType mode, required int samplesPerCall}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRecordingAudioFrameParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setRecordingAudioFrameParameters_bd46d1d'; final param = createParams({ 'sampleRate': sampleRate, 'channel': channel, @@ -2443,7 +2474,7 @@ class RtcEngineImpl implements RtcEngine { required RawAudioFrameOpModeType mode, required int samplesPerCall}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setPlaybackAudioFrameParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setPlaybackAudioFrameParameters_bd46d1d'; final param = createParams({ 'sampleRate': sampleRate, 'channel': channel, @@ -2468,7 +2499,7 @@ class RtcEngineImpl implements RtcEngine { required int channel, required int samplesPerCall}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setMixedAudioFrameParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setMixedAudioFrameParameters_ee7e270'; final param = createParams({ 'sampleRate': sampleRate, 'channel': channel, @@ -2493,7 +2524,7 @@ class RtcEngineImpl implements RtcEngine { required RawAudioFrameOpModeType mode, required int samplesPerCall}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setEarMonitoringAudioFrameParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setEarMonitoringAudioFrameParameters_bd46d1d'; final param = createParams({ 'sampleRate': sampleRate, 'channel': channel, @@ -2516,7 +2547,7 @@ class RtcEngineImpl implements RtcEngine { Future setPlaybackAudioFrameBeforeMixingParameters( {required int sampleRate, required int channel}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setPlaybackAudioFrameBeforeMixingParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setPlaybackAudioFrameBeforeMixingParameters_4e92b3c'; final param = createParams({'sampleRate': sampleRate, 'channel': channel}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2533,7 +2564,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableAudioSpectrumMonitor({int intervalInMS = 100}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableAudioSpectrumMonitor'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableAudioSpectrumMonitor_46f8ab7'; final param = createParams({'intervalInMS': intervalInMS}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2567,7 +2598,7 @@ class RtcEngineImpl implements RtcEngine { @override void registerAudioSpectrumObserver(AudioSpectrumObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerAudioSpectrumObserver'; +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerAudioSpectrumObserver_0406ea7'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -2584,7 +2615,7 @@ class RtcEngineImpl implements RtcEngine { @override void unregisterAudioSpectrumObserver(AudioSpectrumObserver observer) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_unregisterAudioSpectrumObserver'; +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_unregisterAudioSpectrumObserver_0406ea7'; // final param = createParams({// 'observer':observer// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -2601,7 +2632,7 @@ class RtcEngineImpl implements RtcEngine { @override Future adjustRecordingSignalVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustRecordingSignalVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustRecordingSignalVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2618,7 +2649,7 @@ class RtcEngineImpl implements RtcEngine { @override Future muteRecordingSignal(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_muteRecordingSignal'; + '${isOverrideClassName ? className : 'RtcEngine'}_muteRecordingSignal_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2635,7 +2666,7 @@ class RtcEngineImpl implements RtcEngine { @override Future adjustPlaybackSignalVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustPlaybackSignalVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustPlaybackSignalVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2653,7 +2684,7 @@ class RtcEngineImpl implements RtcEngine { Future adjustUserPlaybackSignalVolume( {required int uid, required int volume}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustUserPlaybackSignalVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustUserPlaybackSignalVolume_88641bf'; final param = createParams({'uid': uid, 'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2671,7 +2702,7 @@ class RtcEngineImpl implements RtcEngine { Future setLocalPublishFallbackOption( StreamFallbackOptions option) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalPublishFallbackOption'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalPublishFallbackOption_c29b788'; final param = createParams({'option': option.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2689,7 +2720,7 @@ class RtcEngineImpl implements RtcEngine { Future setRemoteSubscribeFallbackOption( StreamFallbackOptions option) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteSubscribeFallbackOption'; + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteSubscribeFallbackOption_c29b788'; final param = createParams({'option': option.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2709,7 +2740,7 @@ class RtcEngineImpl implements RtcEngine { required int uidNum, required StreamFallbackOptions option}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setHighPriorityUserList'; + '${isOverrideClassName ? className : 'RtcEngine'}_setHighPriorityUserList_ab88726'; final param = createParams( {'uidList': uidList, 'uidNum': uidNum, 'option': option.value()}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -2725,11 +2756,19 @@ class RtcEngineImpl implements RtcEngine { } @override - Future enableLoopbackRecording( - {required bool enabled, String? deviceName}) async { + Future enableExtension( + {required String provider, + required String extension, + bool enable = true, + MediaSourceType type = MediaSourceType.unknownMediaSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableLoopbackRecording'; - final param = createParams({'enabled': enabled, 'deviceName': deviceName}); + '${isOverrideClassName ? className : 'RtcEngine'}_enableExtension_0b60a2c'; + final param = createParams({ + 'provider': provider, + 'extension': extension, + 'enable': enable, + 'type': type.value() + }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2737,16 +2776,24 @@ class RtcEngineImpl implements RtcEngine { } final rm = callApiResult.data; final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } } @override - Future adjustLoopbackSignalVolume(int volume) async { + Future setExtensionProperty( + {required String provider, + required String extension, + required String key, + required String value, + MediaSourceType type = MediaSourceType.unknownMediaSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustLoopbackSignalVolume'; - final param = createParams({'volume': volume}); + '${isOverrideClassName ? className : 'RtcEngine'}_setExtensionProperty_520ac55'; + final param = createParams({ + 'provider': provider, + 'extension': extension, + 'key': key, + 'value': value, + 'type': type.value() + }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2754,16 +2801,24 @@ class RtcEngineImpl implements RtcEngine { } final rm = callApiResult.data; final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } } @override - Future getLoopbackRecordingVolume() async { + Future getExtensionProperty( + {required String provider, + required String extension, + required String key, + required int bufLen, + MediaSourceType type = MediaSourceType.unknownMediaSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getLoopbackRecordingVolume'; - final param = createParams({}); + '${isOverrideClassName ? className : 'RtcEngine'}_getExtensionProperty_38c9723'; + final param = createParams({ + 'provider': provider, + 'extension': extension, + 'key': key, + 'buf_len': bufLen, + 'type': type.value() + }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2771,19 +2826,21 @@ class RtcEngineImpl implements RtcEngine { } final rm = callApiResult.data; final result = rm['result']; - return result as int; + if (result < 0) { + throw AgoraRtcException(code: result); + } + final getExtensionPropertyJson = + RtcEngineGetExtensionPropertyJson.fromJson(rm); + return getExtensionPropertyJson.value; } @override - Future enableInEarMonitoring( - {required bool enabled, - required EarMonitoringFilterType includeAudioFilters}) async { + Future enableLoopbackRecording( + {required bool enabled, String? deviceName}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableInEarMonitoring'; - final param = createParams({ - 'enabled': enabled, - 'includeAudioFilters': includeAudioFilters.value() - }); + '${isOverrideClassName ? className : 'RtcEngine'}_enableLoopbackRecording_0b8eb79'; + final param = createParams( + {'enabled': enabled, if (deviceName != null) 'deviceName': deviceName}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2797,9 +2854,9 @@ class RtcEngineImpl implements RtcEngine { } @override - Future setInEarMonitoringVolume(int volume) async { + Future adjustLoopbackSignalVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setInEarMonitoringVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustLoopbackSignalVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -2814,12 +2871,10 @@ class RtcEngineImpl implements RtcEngine { } @override - Future loadExtensionProvider( - {required String path, bool unloadAfterUse = false}) async { + Future getLoopbackRecordingVolume() async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_loadExtensionProvider'; - final param = - createParams({'path': path, 'unload_after_use': unloadAfterUse}); + '${isOverrideClassName ? className : 'RtcEngine'}_getLoopbackRecordingVolume'; + final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2827,20 +2882,19 @@ class RtcEngineImpl implements RtcEngine { } final rm = callApiResult.data; final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } + return result as int; } @override - Future setExtensionProviderProperty( - {required String provider, - required String key, - required String value}) async { + Future enableInEarMonitoring( + {required bool enabled, + required EarMonitoringFilterType includeAudioFilters}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setExtensionProviderProperty'; - final param = - createParams({'provider': provider, 'key': key, 'value': value}); + '${isOverrideClassName ? className : 'RtcEngine'}_enableInEarMonitoring_077cf5f'; + final param = createParams({ + 'enabled': enabled, + 'includeAudioFilters': includeAudioFilters.value() + }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2854,14 +2908,10 @@ class RtcEngineImpl implements RtcEngine { } @override - Future registerExtension( - {required String provider, - required String extension, - MediaSourceType type = MediaSourceType.unknownMediaSource}) async { + Future setInEarMonitoringVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_registerExtension'; - final param = createParams( - {'provider': provider, 'extension': extension, 'type': type.value()}); + '${isOverrideClassName ? className : 'RtcEngine'}_setInEarMonitoringVolume_46f8ab7'; + final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2875,19 +2925,12 @@ class RtcEngineImpl implements RtcEngine { } @override - Future enableExtension( - {required String provider, - required String extension, - bool enable = true, - MediaSourceType type = MediaSourceType.unknownMediaSource}) async { + Future loadExtensionProvider( + {required String path, bool unloadAfterUse = false}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableExtension'; - final param = createParams({ - 'provider': provider, - 'extension': extension, - 'enable': enable, - 'type': type.value() - }); + '${isOverrideClassName ? className : 'RtcEngine'}_loadExtensionProvider_7a174df'; + final param = + createParams({'path': path, 'unload_after_use': unloadAfterUse}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2895,24 +2938,20 @@ class RtcEngineImpl implements RtcEngine { } final rm = callApiResult.data; final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } } @override - Future setExtensionProperty( + Future setExtensionProviderProperty( {required String provider, - required String extension, required String key, - required String value, - MediaSourceType type = MediaSourceType.unknownMediaSource}) async { + required String value}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setExtensionProperty'; - final param = createParams({ - 'provider': provider, - 'extension': extension, - 'key': key, - 'value': value, - 'type': type.value() - }); + '${isOverrideClassName ? className : 'RtcEngine'}_setExtensionProviderProperty_0e4f59e'; + final param = + createParams({'provider': provider, 'key': key, 'value': value}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2920,24 +2959,20 @@ class RtcEngineImpl implements RtcEngine { } final rm = callApiResult.data; final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } } @override - Future getExtensionProperty( + Future registerExtension( {required String provider, required String extension, - required String key, - required int bufLen, MediaSourceType type = MediaSourceType.unknownMediaSource}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getExtensionProperty'; - final param = createParams({ - 'provider': provider, - 'extension': extension, - 'key': key, - 'buf_len': bufLen, - 'type': type.value() - }); + '${isOverrideClassName ? className : 'RtcEngine'}_registerExtension_fd62af4'; + final param = createParams( + {'provider': provider, 'extension': extension, 'type': type.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -2948,16 +2983,13 @@ class RtcEngineImpl implements RtcEngine { if (result < 0) { throw AgoraRtcException(code: result); } - final getExtensionPropertyJson = - RtcEngineGetExtensionPropertyJson.fromJson(rm); - return getExtensionPropertyJson.value; } @override Future setCameraCapturerConfiguration( CameraCapturerConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraCapturerConfiguration'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraCapturerConfiguration_afa93b3'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -2991,7 +3023,7 @@ class RtcEngineImpl implements RtcEngine { @override Future createCustomEncodedVideoTrack(SenderOptions senderOption) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_createCustomEncodedVideoTrack'; + '${isOverrideClassName ? className : 'RtcEngine'}_createCustomEncodedVideoTrack_0e9dc99'; final param = createParams({'sender_option': senderOption.toJson()}); final List buffers = []; buffers.addAll(senderOption.collectBufferList()); @@ -3008,7 +3040,7 @@ class RtcEngineImpl implements RtcEngine { @override Future destroyCustomVideoTrack(int videoTrackId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_destroyCustomVideoTrack'; + '${isOverrideClassName ? className : 'RtcEngine'}_destroyCustomVideoTrack_3019423'; final param = createParams({'video_track_id': videoTrackId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3025,7 +3057,7 @@ class RtcEngineImpl implements RtcEngine { @override Future destroyCustomEncodedVideoTrack(int videoTrackId) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_destroyCustomEncodedVideoTrack'; + '${isOverrideClassName ? className : 'RtcEngine'}_destroyCustomEncodedVideoTrack_3019423'; final param = createParams({'video_track_id': videoTrackId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3134,7 +3166,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setCameraZoomFactor(double factor) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraZoomFactor'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraZoomFactor_685e803'; final param = createParams({'factor': factor}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3151,7 +3183,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableFaceDetection(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableFaceDetection'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableFaceDetection_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3184,7 +3216,7 @@ class RtcEngineImpl implements RtcEngine { Future setCameraFocusPositionInPreview( {required double positionX, required double positionY}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraFocusPositionInPreview'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraFocusPositionInPreview_f282d50'; final param = createParams({'positionX': positionX, 'positionY': positionY}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -3202,7 +3234,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setCameraTorchOn(bool isOn) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraTorchOn'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraTorchOn_5039d15'; final param = createParams({'isOn': isOn}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3219,7 +3251,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setCameraAutoFocusFaceModeEnabled(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraAutoFocusFaceModeEnabled'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraAutoFocusFaceModeEnabled_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3253,7 +3285,7 @@ class RtcEngineImpl implements RtcEngine { {required double positionXinView, required double positionYinView}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraExposurePosition'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraExposurePosition_f282d50'; final param = createParams({ 'positionXinView': positionXinView, 'positionYinView': positionYinView @@ -3288,7 +3320,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setCameraExposureFactor(double factor) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraExposureFactor'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraExposureFactor_685e803'; final param = createParams({'factor': factor}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3320,7 +3352,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setCameraAutoExposureFaceModeEnabled(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraAutoExposureFaceModeEnabled'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraAutoExposureFaceModeEnabled_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3337,7 +3369,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setDefaultAudioRouteToSpeakerphone(bool defaultToSpeaker) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setDefaultAudioRouteToSpeakerphone'; + '${isOverrideClassName ? className : 'RtcEngine'}_setDefaultAudioRouteToSpeakerphone_5039d15'; final param = createParams({'defaultToSpeaker': defaultToSpeaker}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3354,7 +3386,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setEnableSpeakerphone(bool speakerOn) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setEnableSpeakerphone'; + '${isOverrideClassName ? className : 'RtcEngine'}_setEnableSpeakerphone_5039d15'; final param = createParams({'speakerOn': speakerOn}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3386,7 +3418,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setRouteInCommunicationMode(int route) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRouteInCommunicationMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setRouteInCommunicationMode_46f8ab7'; final param = createParams({'route': route}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3406,7 +3438,7 @@ class RtcEngineImpl implements RtcEngine { required SIZE iconSize, required bool includeScreen}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getScreenCaptureSources'; + '${isOverrideClassName ? className : 'RtcEngine'}_getScreenCaptureSources_f3e02cb'; final param = createParams({ 'thumbSize': thumbSize.toJson(), 'iconSize': iconSize.toJson(), @@ -3429,7 +3461,7 @@ class RtcEngineImpl implements RtcEngine { Future setAudioSessionOperationRestriction( AudioSessionOperationRestriction restriction) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAudioSessionOperationRestriction'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAudioSessionOperationRestriction_c492897'; final param = createParams({'restriction': restriction.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3449,7 +3481,7 @@ class RtcEngineImpl implements RtcEngine { required Rectangle regionRect, required ScreenCaptureParameters captureParams}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCaptureByDisplayId'; + '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCaptureByDisplayId_7cf6800'; final param = createParams({ 'displayId': displayId, 'regionRect': regionRect.toJson(), @@ -3476,7 +3508,7 @@ class RtcEngineImpl implements RtcEngine { required Rectangle regionRect, required ScreenCaptureParameters captureParams}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCaptureByScreenRect'; + '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCaptureByScreenRect_e286286'; final param = createParams({ 'screenRect': screenRect.toJson(), 'regionRect': regionRect.toJson(), @@ -3501,7 +3533,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getAudioDeviceInfo() async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getAudioDeviceInfo'; + '${isOverrideClassName ? className : 'RtcEngine'}_getAudioDeviceInfo_505aa0c'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3523,7 +3555,7 @@ class RtcEngineImpl implements RtcEngine { required Rectangle regionRect, required ScreenCaptureParameters captureParams}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCaptureByWindowId'; + '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCaptureByWindowId_5ab7e59'; final param = createParams({ 'windowId': windowId, 'regionRect': regionRect.toJson(), @@ -3547,7 +3579,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setScreenCaptureContentHint(VideoContentHint contentHint) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setScreenCaptureContentHint'; + '${isOverrideClassName ? className : 'RtcEngine'}_setScreenCaptureContentHint_8ad2c79'; final param = createParams({'contentHint': contentHint.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3564,7 +3596,7 @@ class RtcEngineImpl implements RtcEngine { @override Future updateScreenCaptureRegion(Rectangle regionRect) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateScreenCaptureRegion'; + '${isOverrideClassName ? className : 'RtcEngine'}_updateScreenCaptureRegion_6b327a8'; final param = createParams({'regionRect': regionRect.toJson()}); final List buffers = []; buffers.addAll(regionRect.collectBufferList()); @@ -3584,7 +3616,7 @@ class RtcEngineImpl implements RtcEngine { Future updateScreenCaptureParameters( ScreenCaptureParameters captureParams) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateScreenCaptureParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_updateScreenCaptureParameters_a2eef93'; final param = createParams({'captureParams': captureParams.toJson()}); final List buffers = []; buffers.addAll(captureParams.collectBufferList()); @@ -3604,7 +3636,7 @@ class RtcEngineImpl implements RtcEngine { Future startScreenCapture( ScreenCaptureParameters2 captureParams) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCapture'; + '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCapture_270da41'; final param = createParams({'captureParams': captureParams.toJson()}); final List buffers = []; buffers.addAll(captureParams.collectBufferList()); @@ -3622,7 +3654,7 @@ class RtcEngineImpl implements RtcEngine { {required VideoSourceType sourceType, required ScreenCaptureConfiguration config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCaptureBySourceType'; + '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCapture_9ebb320'; final param = createParams( {'sourceType': sourceType.value(), 'config': config.toJson()}); final List buffers = []; @@ -3640,7 +3672,7 @@ class RtcEngineImpl implements RtcEngine { Future updateScreenCapture( ScreenCaptureParameters2 captureParams) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateScreenCapture'; + '${isOverrideClassName ? className : 'RtcEngine'}_updateScreenCapture_270da41'; final param = createParams({'captureParams': captureParams.toJson()}); final List buffers = []; buffers.addAll(captureParams.collectBufferList()); @@ -3675,7 +3707,7 @@ class RtcEngineImpl implements RtcEngine { Future setScreenCaptureScenario( ScreenScenarioType screenScenario) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setScreenCaptureScenario'; + '${isOverrideClassName ? className : 'RtcEngine'}_setScreenCaptureScenario_13de7b4'; final param = createParams({'screenScenario': screenScenario.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3706,7 +3738,7 @@ class RtcEngineImpl implements RtcEngine { @override Future stopScreenCaptureBySourceType(VideoSourceType sourceType) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_stopScreenCaptureBySourceType'; + '${isOverrideClassName ? className : 'RtcEngine'}_stopScreenCapture_4fd718e'; final param = createParams({'sourceType': sourceType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3720,7 +3752,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getCallId() async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getCallId'; + '${isOverrideClassName ? className : 'RtcEngine'}_getCallId_66d4ecd'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3741,7 +3773,8 @@ class RtcEngineImpl implements RtcEngine { {required String callId, required int rating, required String description}) async { - final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_rate'; + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_rate_f1a0070'; final param = createParams( {'callId': callId, 'rating': rating, 'description': description}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -3759,7 +3792,8 @@ class RtcEngineImpl implements RtcEngine { @override Future complain( {required String callId, required String description}) async { - final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_complain'; + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_complain_ccad422'; final param = createParams({'callId': callId, 'description': description}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3776,7 +3810,7 @@ class RtcEngineImpl implements RtcEngine { @override Future startRtmpStreamWithoutTranscoding(String url) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startRtmpStreamWithoutTranscoding'; + '${isOverrideClassName ? className : 'RtcEngine'}_startRtmpStreamWithoutTranscoding_3a2037f'; final param = createParams({'url': url}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3794,7 +3828,7 @@ class RtcEngineImpl implements RtcEngine { Future startRtmpStreamWithTranscoding( {required String url, required LiveTranscoding transcoding}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startRtmpStreamWithTranscoding'; + '${isOverrideClassName ? className : 'RtcEngine'}_startRtmpStreamWithTranscoding_f76aa1a'; final param = createParams({'url': url, 'transcoding': transcoding.toJson()}); final List buffers = []; @@ -3814,7 +3848,7 @@ class RtcEngineImpl implements RtcEngine { @override Future updateRtmpTranscoding(LiveTranscoding transcoding) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateRtmpTranscoding'; + '${isOverrideClassName ? className : 'RtcEngine'}_updateRtmpTranscoding_91368d4'; final param = createParams({'transcoding': transcoding.toJson()}); final List buffers = []; buffers.addAll(transcoding.collectBufferList()); @@ -3831,12 +3865,15 @@ class RtcEngineImpl implements RtcEngine { } @override - Future stopRtmpStream(String url) async { + Future startLocalVideoTranscoder( + LocalTranscoderConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_stopRtmpStream'; - final param = createParams({'url': url}); + '${isOverrideClassName ? className : 'RtcEngine'}_startLocalVideoTranscoder_90f9e33'; + final param = createParams({'config': config.toJson()}); + final List buffers = []; + buffers.addAll(config.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -3848,10 +3885,10 @@ class RtcEngineImpl implements RtcEngine { } @override - Future startLocalVideoTranscoder( + Future updateLocalTranscoderConfiguration( LocalTranscoderConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startLocalVideoTranscoder'; + '${isOverrideClassName ? className : 'RtcEngine'}_updateLocalTranscoderConfiguration_90f9e33'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -3868,15 +3905,12 @@ class RtcEngineImpl implements RtcEngine { } @override - Future updateLocalTranscoderConfiguration( - LocalTranscoderConfiguration config) async { + Future stopRtmpStream(String url) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateLocalTranscoderConfiguration'; - final param = createParams({'config': config.toJson()}); - final List buffers = []; - buffers.addAll(config.collectBufferList()); + '${isOverrideClassName ? className : 'RtcEngine'}_stopRtmpStream_3a2037f'; + final param = createParams({'url': url}); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -3909,7 +3943,7 @@ class RtcEngineImpl implements RtcEngine { {required VideoSourceType sourceType, required CameraCapturerConfiguration config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startCameraCapture'; + '${isOverrideClassName ? className : 'RtcEngine'}_startCameraCapture_f3692cc'; final param = createParams( {'sourceType': sourceType.value(), 'config': config.toJson()}); final List buffers = []; @@ -3929,7 +3963,7 @@ class RtcEngineImpl implements RtcEngine { @override Future stopCameraCapture(VideoSourceType sourceType) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_stopCameraCapture'; + '${isOverrideClassName ? className : 'RtcEngine'}_stopCameraCapture_4fd718e'; final param = createParams({'sourceType': sourceType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -3948,7 +3982,7 @@ class RtcEngineImpl implements RtcEngine { {required VideoSourceType type, required VideoOrientation orientation}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCameraDeviceOrientation'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCameraDeviceOrientation_025aae8'; final param = createParams( {'type': type.value(), 'orientation': orientation.value()}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -3968,7 +4002,7 @@ class RtcEngineImpl implements RtcEngine { {required VideoSourceType type, required VideoOrientation orientation}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setScreenCaptureOrientation'; + '${isOverrideClassName ? className : 'RtcEngine'}_setScreenCaptureOrientation_025aae8'; final param = createParams( {'type': type.value(), 'orientation': orientation.value()}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -4001,7 +4035,7 @@ class RtcEngineImpl implements RtcEngine { @override void registerEventHandler(RtcEngineEventHandler eventHandler) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerEventHandler'; +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerEventHandler_5fc0465'; // final param = createParams({// 'eventHandler':eventHandler// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -4018,7 +4052,7 @@ class RtcEngineImpl implements RtcEngine { @override void unregisterEventHandler(RtcEngineEventHandler eventHandler) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_unregisterEventHandler'; +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_unregisterEventHandler_5fc0465'; // final param = createParams({// 'eventHandler':eventHandler// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -4036,7 +4070,7 @@ class RtcEngineImpl implements RtcEngine { Future setRemoteUserPriority( {required int uid, required PriorityType userPriority}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteUserPriority'; + '${isOverrideClassName ? className : 'RtcEngine'}_setRemoteUserPriority_f34115b'; final param = createParams({'uid': uid, 'userPriority': userPriority.value()}); final callApiResult = await irisMethodChannel.invokeMethod( @@ -4054,7 +4088,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setEncryptionMode(String encryptionMode) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setEncryptionMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setEncryptionMode_3a2037f'; final param = createParams({'encryptionMode': encryptionMode}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4071,7 +4105,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setEncryptionSecret(String secret) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setEncryptionSecret'; + '${isOverrideClassName ? className : 'RtcEngine'}_setEncryptionSecret_3a2037f'; final param = createParams({'secret': secret}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4089,7 +4123,7 @@ class RtcEngineImpl implements RtcEngine { Future enableEncryption( {required bool enabled, required EncryptionConfig config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableEncryption'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableEncryption_421c27b'; final param = createParams({'enabled': enabled, 'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -4108,7 +4142,7 @@ class RtcEngineImpl implements RtcEngine { @override Future createDataStream(DataStreamConfig config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_createDataStream'; + '${isOverrideClassName ? className : 'RtcEngine'}_createDataStream_5862815'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -4132,7 +4166,7 @@ class RtcEngineImpl implements RtcEngine { required Uint8List data, required int length}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_sendStreamMessage'; + '${isOverrideClassName ? className : 'RtcEngine'}_sendStreamMessage_8715a45'; final param = createParams({'streamId': streamId, 'length': length}); final List buffers = []; buffers.add(data); @@ -4152,7 +4186,7 @@ class RtcEngineImpl implements RtcEngine { Future addVideoWatermark( {required String watermarkUrl, required WatermarkOptions options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_addVideoWatermark'; + '${isOverrideClassName ? className : 'RtcEngine'}_addVideoWatermark_7480410'; final param = createParams( {'watermarkUrl': watermarkUrl, 'options': options.toJson()}); final List buffers = []; @@ -4220,7 +4254,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableWebSdkInteroperability(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableWebSdkInteroperability'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableWebSdkInteroperability_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4242,7 +4276,7 @@ class RtcEngineImpl implements RtcEngine { required String label, required int value}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_sendCustomReportMessage'; + '${isOverrideClassName ? className : 'RtcEngine'}_sendCustomReportMessage_56d6589'; final param = createParams({ 'id': id, 'category': category, @@ -4266,7 +4300,7 @@ class RtcEngineImpl implements RtcEngine { void registerMediaMetadataObserver( {required MetadataObserver observer, required MetadataType type}) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerMediaMetadataObserver'; +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_registerMediaMetadataObserver_8701fec'; // final param = createParams({// 'observer':observer, 'type':type// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -4284,7 +4318,7 @@ class RtcEngineImpl implements RtcEngine { void unregisterMediaMetadataObserver( {required MetadataObserver observer, required MetadataType type}) { // Implementation template -// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_unregisterMediaMetadataObserver'; +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_unregisterMediaMetadataObserver_8701fec'; // final param = createParams({// 'observer':observer, 'type':type// }); // final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); // if (callApiResult.irisReturnCode < 0) { @@ -4301,17 +4335,17 @@ class RtcEngineImpl implements RtcEngine { @override Future startAudioFrameDump( {required String channelId, - required int userId, + required int uid, required String location, required String uuid, required String passwd, required int durationMs, required bool autoUpload}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startAudioFrameDump'; + '${isOverrideClassName ? className : 'RtcEngine'}_startAudioFrameDump_aad7331'; final param = createParams({ 'channel_id': channelId, - 'user_id': userId, + 'uid': uid, 'location': location, 'uuid': uuid, 'passwd': passwd, @@ -4333,12 +4367,12 @@ class RtcEngineImpl implements RtcEngine { @override Future stopAudioFrameDump( {required String channelId, - required int userId, + required int uid, required String location}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_stopAudioFrameDump'; + '${isOverrideClassName ? className : 'RtcEngine'}_stopAudioFrameDump_a4c9af4'; final param = createParams( - {'channel_id': channelId, 'user_id': userId, 'location': location}); + {'channel_id': channelId, 'uid': uid, 'location': location}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -4355,7 +4389,7 @@ class RtcEngineImpl implements RtcEngine { Future setAINSMode( {required bool enabled, required AudioAinsMode mode}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAINSMode'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAINSMode_4df3049'; final param = createParams({'enabled': enabled, 'mode': mode.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4373,7 +4407,7 @@ class RtcEngineImpl implements RtcEngine { Future registerLocalUserAccount( {required String appId, required String userAccount}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_registerLocalUserAccount'; + '${isOverrideClassName ? className : 'RtcEngine'}_registerLocalUserAccount_ccad422'; final param = createParams({'appId': appId, 'userAccount': userAccount}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4394,7 +4428,7 @@ class RtcEngineImpl implements RtcEngine { required String userAccount, ChannelMediaOptions? options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_joinChannelWithUserAccount'; + '${isOverrideClassName ? className : 'RtcEngine'}_joinChannelWithUserAccount_4685af9'; final param = createParams({ 'token': token, 'channelId': channelId, @@ -4421,7 +4455,7 @@ class RtcEngineImpl implements RtcEngine { required String userAccount, required ChannelMediaOptions options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_joinChannelWithUserAccountEx'; + '${isOverrideClassName ? className : 'RtcEngine'}_joinChannelWithUserAccountEx_268b977'; final param = createParams({ 'token': token, 'channelId': channelId, @@ -4445,7 +4479,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getUserInfoByUserAccount(String userAccount) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getUserInfoByUserAccount'; + '${isOverrideClassName ? className : 'RtcEngine'}_getUserInfoByUserAccount_c6a8f08'; final param = createParams({'userAccount': userAccount}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4465,7 +4499,7 @@ class RtcEngineImpl implements RtcEngine { @override Future getUserInfoByUid(int uid) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_getUserInfoByUid'; + '${isOverrideClassName ? className : 'RtcEngine'}_getUserInfoByUid_6b7aee8'; final param = createParams({'uid': uid}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4485,47 +4519,7 @@ class RtcEngineImpl implements RtcEngine { Future startOrUpdateChannelMediaRelay( ChannelMediaRelayConfiguration configuration) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startOrUpdateChannelMediaRelay'; - final param = createParams({'configuration': configuration.toJson()}); - final List buffers = []; - buffers.addAll(configuration.collectBufferList()); - final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); - if (callApiResult.irisReturnCode < 0) { - throw AgoraRtcException(code: callApiResult.irisReturnCode); - } - final rm = callApiResult.data; - final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } - } - - @override - Future startChannelMediaRelay( - ChannelMediaRelayConfiguration configuration) async { - final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startChannelMediaRelay'; - final param = createParams({'configuration': configuration.toJson()}); - final List buffers = []; - buffers.addAll(configuration.collectBufferList()); - final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); - if (callApiResult.irisReturnCode < 0) { - throw AgoraRtcException(code: callApiResult.irisReturnCode); - } - final rm = callApiResult.data; - final result = rm['result']; - if (result < 0) { - throw AgoraRtcException(code: result); - } - } - - @override - Future updateChannelMediaRelay( - ChannelMediaRelayConfiguration configuration) async { - final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateChannelMediaRelay'; + '${isOverrideClassName ? className : 'RtcEngine'}_startOrUpdateChannelMediaRelay_e68f0a4'; final param = createParams({'configuration': configuration.toJson()}); final List buffers = []; buffers.addAll(configuration.collectBufferList()); @@ -4596,7 +4590,7 @@ class RtcEngineImpl implements RtcEngine { Future setDirectCdnStreamingAudioConfiguration( AudioProfileType profile) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setDirectCdnStreamingAudioConfiguration'; + '${isOverrideClassName ? className : 'RtcEngine'}_setDirectCdnStreamingAudioConfiguration_ac39c15'; final param = createParams({'profile': profile.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4614,7 +4608,7 @@ class RtcEngineImpl implements RtcEngine { Future setDirectCdnStreamingVideoConfiguration( VideoEncoderConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setDirectCdnStreamingVideoConfiguration'; + '${isOverrideClassName ? className : 'RtcEngine'}_setDirectCdnStreamingVideoConfiguration_89677d8'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -4636,7 +4630,7 @@ class RtcEngineImpl implements RtcEngine { required String publishUrl, required DirectCdnStreamingMediaOptions options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startDirectCdnStreaming'; + '${isOverrideClassName ? className : 'RtcEngine'}_startDirectCdnStreaming_ed8d77b'; final param = createParams({ 'eventHandler': eventHandler, 'publishUrl': publishUrl, @@ -4677,7 +4671,7 @@ class RtcEngineImpl implements RtcEngine { Future updateDirectCdnStreamingMediaOptions( DirectCdnStreamingMediaOptions options) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_updateDirectCdnStreamingMediaOptions'; + '${isOverrideClassName ? className : 'RtcEngine'}_updateDirectCdnStreamingMediaOptions_d2556c8'; final param = createParams({'options': options.toJson()}); final List buffers = []; buffers.addAll(options.collectBufferList()); @@ -4699,7 +4693,7 @@ class RtcEngineImpl implements RtcEngine { required String sound2, required AgoraRhythmPlayerConfig config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startRhythmPlayer'; + '${isOverrideClassName ? className : 'RtcEngine'}_startRhythmPlayer_e1f6565'; final param = createParams( {'sound1': sound1, 'sound2': sound2, 'config': config.toJson()}); final List buffers = []; @@ -4736,7 +4730,7 @@ class RtcEngineImpl implements RtcEngine { @override Future configRhythmPlayer(AgoraRhythmPlayerConfig config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_configRhythmPlayer'; + '${isOverrideClassName ? className : 'RtcEngine'}_configRhythmPlayer_b36c805'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -4756,7 +4750,7 @@ class RtcEngineImpl implements RtcEngine { Future takeSnapshot( {required int uid, required String filePath}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_takeSnapshot'; + '${isOverrideClassName ? className : 'RtcEngine'}_takeSnapshot_1922dd1'; final param = createParams({'uid': uid, 'filePath': filePath}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4774,7 +4768,7 @@ class RtcEngineImpl implements RtcEngine { Future enableContentInspect( {required bool enabled, required ContentInspectConfig config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableContentInspect'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableContentInspect_e15e514'; final param = createParams({'enabled': enabled, 'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -4794,7 +4788,7 @@ class RtcEngineImpl implements RtcEngine { Future adjustCustomAudioPublishVolume( {required int trackId, required int volume}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustCustomAudioPublishVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustCustomAudioPublishVolume_f8da2ca'; final param = createParams({'trackId': trackId, 'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4812,7 +4806,7 @@ class RtcEngineImpl implements RtcEngine { Future adjustCustomAudioPlayoutVolume( {required int trackId, required int volume}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_adjustCustomAudioPlayoutVolume'; + '${isOverrideClassName ? className : 'RtcEngine'}_adjustCustomAudioPlayoutVolume_f8da2ca'; final param = createParams({'trackId': trackId, 'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4829,7 +4823,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setCloudProxy(CloudProxyType proxyType) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setCloudProxy'; + '${isOverrideClassName ? className : 'RtcEngine'}_setCloudProxy_39d115e'; final param = createParams({'proxyType': proxyType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4846,7 +4840,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setLocalAccessPoint(LocalAccessPointConfiguration config) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setLocalAccessPoint'; + '${isOverrideClassName ? className : 'RtcEngine'}_setLocalAccessPoint_798c8c7'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -4866,7 +4860,7 @@ class RtcEngineImpl implements RtcEngine { Future setAdvancedAudioOptions( {required AdvancedAudioOptions options, int sourceType = 0}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAdvancedAudioOptions'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAdvancedAudioOptions_38d986b'; final param = createParams({'options': options.toJson(), 'sourceType': sourceType}); final List buffers = []; @@ -4887,7 +4881,7 @@ class RtcEngineImpl implements RtcEngine { Future setAVSyncSource( {required String channelId, required int uid}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setAVSyncSource'; + '${isOverrideClassName ? className : 'RtcEngine'}_setAVSyncSource_bf26e54'; final param = createParams({'channelId': channelId, 'uid': uid}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4905,7 +4899,7 @@ class RtcEngineImpl implements RtcEngine { Future enableVideoImageSource( {required bool enable, required ImageTrackOptions options}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableVideoImageSource'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableVideoImageSource_5f39ea0'; final param = createParams({'enable': enable, 'options': options.toJson()}); final List buffers = []; buffers.addAll(options.collectBufferList()); @@ -4939,7 +4933,7 @@ class RtcEngineImpl implements RtcEngine { @override Future enableWirelessAccelerate(bool enabled) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_enableWirelessAccelerate'; + '${isOverrideClassName ? className : 'RtcEngine'}_enableWirelessAccelerate_5039d15'; final param = createParams({'enabled': enabled}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -4971,7 +4965,7 @@ class RtcEngineImpl implements RtcEngine { @override Future setParameters(String parameters) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_setParameters'; + '${isOverrideClassName ? className : 'RtcEngine'}_setParameters_3a2037f'; final param = createParams({'parameters': parameters}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -5037,7 +5031,7 @@ class RtcEngineImpl implements RtcEngine { @override Future isFeatureAvailableOnDevice(FeatureType type) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_isFeatureAvailableOnDevice'; + '${isOverrideClassName ? className : 'RtcEngine'}_isFeatureAvailableOnDevice_a694b62'; final param = createParams({'type': type.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -5049,6 +5043,19 @@ class RtcEngineImpl implements RtcEngine { return result as bool; } + @override + Future release({bool sync = false}) async { + final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_release'; + final param = createParams({'sync': sync}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + } + @override AudioDeviceManager getAudioDeviceManager() { // Implementation template @@ -5124,6 +5131,21 @@ class RtcEngineImpl implements RtcEngine { throw UnimplementedError('Unimplement for getLocalSpatialAudioEngine'); } + @override + H265Transcoder getH265Transcoder() { +// Implementation template +// final apiType = '${isOverrideClassName ? className : 'RtcEngine'}_getH265Transcoder'; +// final param = createParams({// // }); +// final callApiResult = irisMethodChannel.invokeMethod(IrisMethodCall(apiType, jsonEncode(param), buffers:null)); +// if (callApiResult.irisReturnCode < 0) { +// throw AgoraRtcException(code: callApiResult.irisReturnCode); +// } +// final rm = callApiResult.data; +// final result = rm['result']; +// return result as H265Transcoder; + throw UnimplementedError('Unimplement for getH265Transcoder'); + } + @override Future sendMetaData( {required Metadata metadata, required VideoSourceType sourceType}) async { diff --git a/lib/src/binding/agora_spatial_audio_impl.dart b/lib/src/binding/agora_spatial_audio_impl.dart index 6905a64df..b550a9970 100644 --- a/lib/src/binding/agora_spatial_audio_impl.dart +++ b/lib/src/binding/agora_spatial_audio_impl.dart @@ -1,12 +1,12 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { - BaseSpatialAudioEngineImpl(this.irisMethodChannel); +class LocalSpatialAudioEngineImpl implements LocalSpatialAudioEngine { + LocalSpatialAudioEngineImpl(this.irisMethodChannel); @protected final IrisMethodChannel irisMethodChannel; @@ -20,12 +20,12 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { bool get isOverrideClassName => false; @protected - String get className => 'BaseSpatialAudioEngine'; + String get className => 'LocalSpatialAudioEngine'; @override Future release() async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_release'; + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_release'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -40,10 +40,10 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future setMaxAudioRecvCount(int maxCount) async { + Future initialize() async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_setMaxAudioRecvCount'; - final param = createParams({'maxCount': maxCount}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_initialize_cf94fbf'; + final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -57,12 +57,15 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future setAudioRecvRange(double range) async { + Future updateRemotePosition( + {required int uid, required RemoteVoicePositionInfo posInfo}) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_setAudioRecvRange'; - final param = createParams({'range': range}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_updateRemotePosition_adc0909'; + final param = createParams({'uid': uid, 'posInfo': posInfo.toJson()}); + final List buffers = []; + buffers.addAll(posInfo.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -74,12 +77,22 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future setDistanceUnit(double unit) async { + Future updateRemotePositionEx( + {required int uid, + required RemoteVoicePositionInfo posInfo, + required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_setDistanceUnit'; - final param = createParams({'unit': unit}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_updateRemotePositionEx_f0252d9'; + final param = createParams({ + 'uid': uid, + 'posInfo': posInfo.toJson(), + 'connection': connection.toJson() + }); + final List buffers = []; + buffers.addAll(posInfo.collectBufferList()); + buffers.addAll(connection.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -91,19 +104,10 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future updateSelfPosition( - {required List position, - required List axisForward, - required List axisRight, - required List axisUp}) async { + Future removeRemotePosition(int uid) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_updateSelfPosition'; - final param = createParams({ - 'position': position, - 'axisForward': axisForward, - 'axisRight': axisRight, - 'axisUp': axisUp - }); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_removeRemotePosition_c8d091a'; + final param = createParams({'uid': uid}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -117,21 +121,11 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future updateSelfPositionEx( - {required List position, - required List axisForward, - required List axisRight, - required List axisUp, - required RtcConnection connection}) async { + Future removeRemotePositionEx( + {required int uid, required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_updateSelfPositionEx'; - final param = createParams({ - 'position': position, - 'axisForward': axisForward, - 'axisRight': axisRight, - 'axisUp': axisUp, - 'connection': connection.toJson() - }); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_removeRemotePositionEx_58a9850'; + final param = createParams({'uid': uid, 'connection': connection.toJson()}); final List buffers = []; buffers.addAll(connection.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( @@ -147,15 +141,12 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future updatePlayerPositionInfo( - {required int playerId, - required RemoteVoicePositionInfo positionInfo}) async { + Future clearRemotePositionsEx(RtcConnection connection) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_updatePlayerPositionInfo'; - final param = createParams( - {'playerId': playerId, 'positionInfo': positionInfo.toJson()}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_clearRemotePositionsEx_c81e1a4'; + final param = createParams({'connection': connection.toJson()}); final List buffers = []; - buffers.addAll(positionInfo.collectBufferList()); + buffers.addAll(connection.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { @@ -169,12 +160,25 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future setParameters(String params) async { + Future updateSelfPositionEx( + {required List position, + required List axisForward, + required List axisRight, + required List axisUp, + required RtcConnection connection}) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_setParameters'; - final param = createParams({'params': params}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_updateSelfPositionEx_502183a'; + final param = createParams({ + 'position': position, + 'axisForward': axisForward, + 'axisRight': axisRight, + 'axisUp': axisUp, + 'connection': connection.toJson() + }); + final List buffers = []; + buffers.addAll(connection.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -186,10 +190,10 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future muteLocalAudioStream(bool mute) async { + Future setMaxAudioRecvCount(int maxCount) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_muteLocalAudioStream'; - final param = createParams({'mute': mute}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setMaxAudioRecvCount_46f8ab7'; + final param = createParams({'maxCount': maxCount}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -203,10 +207,10 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future muteAllRemoteAudioStreams(bool mute) async { + Future setAudioRecvRange(double range) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_muteAllRemoteAudioStreams'; - final param = createParams({'mute': mute}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setAudioRecvRange_685e803'; + final param = createParams({'range': range}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -220,19 +224,12 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future setZones( - {required List zones, required int zoneCount}) async { + Future setDistanceUnit(double unit) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_setZones'; - final zonesJsonList = zones.map((e) => e.toJson()).toList(); - final param = - createParams({'zones': zonesJsonList, 'zoneCount': zoneCount}); - final List buffers = []; - for (final e in zones) { - buffers.addAll(e.collectBufferList()); - } + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setDistanceUnit_685e803'; + final param = createParams({'unit': unit}); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -244,16 +241,18 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future setPlayerAttenuation( - {required int playerId, - required double attenuation, - required bool forceSet}) async { + Future updateSelfPosition( + {required List position, + required List axisForward, + required List axisRight, + required List axisUp}) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_setPlayerAttenuation'; + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_updateSelfPosition_9c9930f'; final param = createParams({ - 'playerId': playerId, - 'attenuation': attenuation, - 'forceSet': forceSet + 'position': position, + 'axisForward': axisForward, + 'axisRight': axisRight, + 'axisUp': axisUp }); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -268,13 +267,17 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { } @override - Future muteRemoteAudioStream( - {required int uid, required bool mute}) async { + Future updatePlayerPositionInfo( + {required int playerId, + required RemoteVoicePositionInfo positionInfo}) async { final apiType = - '${isOverrideClassName ? className : 'BaseSpatialAudioEngine'}_muteRemoteAudioStream'; - final param = createParams({'uid': uid, 'mute': mute}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_updatePlayerPositionInfo_b37c59d'; + final param = createParams( + {'playerId': playerId, 'positionInfo': positionInfo.toJson()}); + final List buffers = []; + buffers.addAll(positionInfo.collectBufferList()); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -284,32 +287,12 @@ class BaseSpatialAudioEngineImpl implements BaseSpatialAudioEngine { throw AgoraRtcException(code: result); } } -} - -class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl - implements LocalSpatialAudioEngine { - LocalSpatialAudioEngineImpl(IrisMethodChannel irisMethodChannel) - : super(irisMethodChannel); @override - @protected - Map createParams(Map param) { - return param; - } - - @override - @protected - bool get isOverrideClassName => false; - - @override - @protected - String get className => 'LocalSpatialAudioEngine'; - - @override - Future initialize() async { + Future setParameters(String params) async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_initialize'; - final param = createParams({}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setParameters_3a2037f'; + final param = createParams({'params': params}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -323,15 +306,12 @@ class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl } @override - Future updateRemotePosition( - {required int uid, required RemoteVoicePositionInfo posInfo}) async { + Future muteLocalAudioStream(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_updateRemotePosition'; - final param = createParams({'uid': uid, 'posInfo': posInfo.toJson()}); - final List buffers = []; - buffers.addAll(posInfo.collectBufferList()); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_muteLocalAudioStream_5039d15'; + final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -343,22 +323,12 @@ class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl } @override - Future updateRemotePositionEx( - {required int uid, - required RemoteVoicePositionInfo posInfo, - required RtcConnection connection}) async { + Future muteAllRemoteAudioStreams(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_updateRemotePositionEx'; - final param = createParams({ - 'uid': uid, - 'posInfo': posInfo.toJson(), - 'connection': connection.toJson() - }); - final List buffers = []; - buffers.addAll(posInfo.collectBufferList()); - buffers.addAll(connection.collectBufferList()); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_muteAllRemoteAudioStreams_5039d15'; + final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -370,10 +340,11 @@ class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl } @override - Future removeRemotePosition(int uid) async { + Future muteRemoteAudioStream( + {required int uid, required bool mute}) async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_removeRemotePosition'; - final param = createParams({'uid': uid}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_muteRemoteAudioStream_dbdc15a'; + final param = createParams({'uid': uid, 'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { @@ -387,15 +358,16 @@ class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl } @override - Future removeRemotePositionEx( - {required int uid, required RtcConnection connection}) async { + Future setRemoteAudioAttenuation( + {required int uid, + required double attenuation, + required bool forceSet}) async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_removeRemotePositionEx'; - final param = createParams({'uid': uid, 'connection': connection.toJson()}); - final List buffers = []; - buffers.addAll(connection.collectBufferList()); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setRemoteAudioAttenuation_74c3e98'; + final param = createParams( + {'uid': uid, 'attenuation': attenuation, 'forceSet': forceSet}); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -407,12 +379,19 @@ class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl } @override - Future clearRemotePositions() async { + Future setZones( + {required List zones, required int zoneCount}) async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_clearRemotePositions'; - final param = createParams({}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setZones_414a27e'; + final zonesJsonList = zones.map((e) => e.toJson()).toList(); + final param = + createParams({'zones': zonesJsonList, 'zoneCount': zoneCount}); + final List buffers = []; + for (final e in zones) { + buffers.addAll(e.collectBufferList()); + } final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -424,14 +403,19 @@ class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl } @override - Future clearRemotePositionsEx(RtcConnection connection) async { + Future setPlayerAttenuation( + {required int playerId, + required double attenuation, + required bool forceSet}) async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_clearRemotePositionsEx'; - final param = createParams({'connection': connection.toJson()}); - final List buffers = []; - buffers.addAll(connection.collectBufferList()); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setPlayerAttenuation_a15bc51'; + final param = createParams({ + 'playerId': playerId, + 'attenuation': attenuation, + 'forceSet': forceSet + }); final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: buffers)); + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { throw AgoraRtcException(code: callApiResult.irisReturnCode); } @@ -443,14 +427,10 @@ class LocalSpatialAudioEngineImpl extends BaseSpatialAudioEngineImpl } @override - Future setRemoteAudioAttenuation( - {required int uid, - required double attenuation, - required bool forceSet}) async { + Future clearRemotePositions() async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_setRemoteAudioAttenuation'; - final param = createParams( - {'uid': uid, 'attenuation': attenuation, 'forceSet': forceSet}); + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_clearRemotePositions'; + final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); if (callApiResult.irisReturnCode < 0) { diff --git a/lib/src/binding/audio_device_manager_impl.dart b/lib/src/binding/audio_device_manager_impl.dart index d59978c29..8665a1633 100644 --- a/lib/src/binding/audio_device_manager_impl.dart +++ b/lib/src/binding/audio_device_manager_impl.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, annotate_overrides +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, annotate_overrides import 'package:agora_rtc_engine/src/binding_forward_export.dart'; import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; @@ -55,7 +55,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future setPlaybackDevice(String deviceId) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_setPlaybackDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_setPlaybackDevice_4ad5f6e'; final param = createParams({'deviceId': deviceId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -72,7 +72,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getPlaybackDevice() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDevice_73b9872'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -92,7 +92,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getPlaybackDeviceInfo() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDeviceInfo'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDeviceInfo_5540658'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -107,7 +107,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future setPlaybackDeviceVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_setPlaybackDeviceVolume'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_setPlaybackDeviceVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -124,7 +124,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getPlaybackDeviceVolume() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDeviceVolume'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDeviceVolume_915cb25'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -144,7 +144,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future setRecordingDevice(String deviceId) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_setRecordingDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_setRecordingDevice_4ad5f6e'; final param = createParams({'deviceId': deviceId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -161,7 +161,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getRecordingDevice() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDevice_73b9872'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -181,7 +181,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getRecordingDeviceInfo() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDeviceInfo'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDeviceInfo_5540658'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -196,7 +196,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future setRecordingDeviceVolume(int volume) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_setRecordingDeviceVolume'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_setRecordingDeviceVolume_46f8ab7'; final param = createParams({'volume': volume}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -213,7 +213,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getRecordingDeviceVolume() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDeviceVolume'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDeviceVolume_915cb25'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -233,7 +233,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future setLoopbackDevice(String deviceId) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_setLoopbackDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_setLoopbackDevice_4ad5f6e'; final param = createParams({'deviceId': deviceId}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -250,7 +250,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getLoopbackDevice() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getLoopbackDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getLoopbackDevice_73b9872'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -270,7 +270,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future setPlaybackDeviceMute(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_setPlaybackDeviceMute'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_setPlaybackDeviceMute_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -287,7 +287,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getPlaybackDeviceMute() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDeviceMute'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getPlaybackDeviceMute_d942327'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -307,7 +307,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future setRecordingDeviceMute(bool mute) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_setRecordingDeviceMute'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_setRecordingDeviceMute_5039d15'; final param = createParams({'mute': mute}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -324,7 +324,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future getRecordingDeviceMute() async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDeviceMute'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_getRecordingDeviceMute_d942327'; final param = createParams({}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -344,7 +344,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future startPlaybackDeviceTest(String testAudioFilePath) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_startPlaybackDeviceTest'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_startPlaybackDeviceTest_3a2037f'; final param = createParams({'testAudioFilePath': testAudioFilePath}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -378,7 +378,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future startRecordingDeviceTest(int indicationInterval) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_startRecordingDeviceTest'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_startRecordingDeviceTest_46f8ab7'; final param = createParams({'indicationInterval': indicationInterval}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -412,7 +412,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future startAudioDeviceLoopbackTest(int indicationInterval) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_startAudioDeviceLoopbackTest'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_startAudioDeviceLoopbackTest_46f8ab7'; final param = createParams({'indicationInterval': indicationInterval}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -446,7 +446,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future followSystemPlaybackDevice(bool enable) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_followSystemPlaybackDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_followSystemPlaybackDevice_5039d15'; final param = createParams({'enable': enable}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -463,7 +463,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future followSystemRecordingDevice(bool enable) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_followSystemRecordingDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_followSystemRecordingDevice_5039d15'; final param = createParams({'enable': enable}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -480,7 +480,7 @@ class AudioDeviceManagerImpl implements AudioDeviceManager { @override Future followSystemLoopbackDevice(bool enable) async { final apiType = - '${isOverrideClassName ? className : 'AudioDeviceManager'}_followSystemLoopbackDevice'; + '${isOverrideClassName ? className : 'AudioDeviceManager'}_followSystemLoopbackDevice_5039d15'; final param = createParams({'enable': enable}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); diff --git a/lib/src/binding/call_api_event_handler_buffer_ext.dart b/lib/src/binding/call_api_event_handler_buffer_ext.dart index c5ca3ff95..a80a004fc 100644 --- a/lib/src/binding/call_api_event_handler_buffer_ext.dart +++ b/lib/src/binding/call_api_event_handler_buffer_ext.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, prefer_is_empty +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, prefer_is_empty import 'package:agora_rtc_engine/src/binding_forward_export.dart'; extension VideoDimensionsBufferExt on VideoDimensions { @@ -708,8 +708,8 @@ extension VideoRenderingTracingInfoBufferExt on VideoRenderingTracingInfo { } } -extension RecorderStreamInfoBufferExt on RecorderStreamInfo { - RecorderStreamInfo fillBuffers(List bufferList) { +extension LogUploadServerInfoBufferExt on LogUploadServerInfo { + LogUploadServerInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -720,8 +720,8 @@ extension RecorderStreamInfoBufferExt on RecorderStreamInfo { } } -extension LogUploadServerInfoBufferExt on LogUploadServerInfo { - LogUploadServerInfo fillBuffers(List bufferList) { +extension AdvancedConfigInfoBufferExt on AdvancedConfigInfo { + AdvancedConfigInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -732,8 +732,9 @@ extension LogUploadServerInfoBufferExt on LogUploadServerInfo { } } -extension AdvancedConfigInfoBufferExt on AdvancedConfigInfo { - AdvancedConfigInfo fillBuffers(List bufferList) { +extension LocalAccessPointConfigurationBufferExt + on LocalAccessPointConfiguration { + LocalAccessPointConfiguration fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -744,9 +745,8 @@ extension AdvancedConfigInfoBufferExt on AdvancedConfigInfo { } } -extension LocalAccessPointConfigurationBufferExt - on LocalAccessPointConfiguration { - LocalAccessPointConfiguration fillBuffers(List bufferList) { +extension RecorderStreamInfoBufferExt on RecorderStreamInfo { + RecorderStreamInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; return this; } @@ -769,6 +769,18 @@ extension SpatialAudioParamsBufferExt on SpatialAudioParams { } } +extension VideoLayoutBufferExt on VideoLayout { + VideoLayout fillBuffers(List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + extension AudioParametersBufferExt on AudioParameters { AudioParameters fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; @@ -937,7 +949,8 @@ extension VideoFrameBufferExt on VideoFrame { textureId: textureId, matrix: matrix, alphaBuffer: alphaBuffer, - pixelBuffer: pixelBuffer); + pixelBuffer: pixelBuffer, + metaInfo: metaInfo); } List collectBufferList() { @@ -980,7 +993,8 @@ extension AudioFrameBufferExt on AudioFrame { buffer: buffer, renderTimeMs: renderTimeMs, avsyncType: avsyncType, - presentationMs: presentationMs); + presentationMs: presentationMs, + audioTrackNumber: audioTrackNumber); } List collectBufferList() { @@ -1088,6 +1102,18 @@ extension CacheStatisticsBufferExt on CacheStatistics { } } +extension PlayerPlaybackStatsBufferExt on PlayerPlaybackStats { + PlayerPlaybackStats fillBuffers(List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + extension PlayerUpdatedInfoBufferExt on PlayerUpdatedInfo { PlayerUpdatedInfo fillBuffers(List bufferList) { if (bufferList.isEmpty) return this; diff --git a/lib/src/binding/call_api_impl_params_json.dart b/lib/src/binding/call_api_impl_params_json.dart index 4ec4cb684..f51eb9eda 100644 --- a/lib/src/binding/call_api_impl_params_json.dart +++ b/lib/src/binding/call_api_impl_params_json.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import import 'package:agora_rtc_engine/src/binding_forward_export.dart'; part 'call_api_impl_params_json.g.dart'; diff --git a/lib/src/binding/event_handler_param_json.dart b/lib/src/binding/event_handler_param_json.dart index be1df3820..c173905dd 100644 --- a/lib/src/binding/event_handler_param_json.dart +++ b/lib/src/binding/event_handler_param_json.dart @@ -1,6 +1,6 @@ /// GENERATED BY terra, DO NOT MODIFY BY HAND. -// ignore_for_file: public_member_api_docs, unused_local_variable, prefer_is_empty +// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import, prefer_is_empty import 'package:agora_rtc_engine/src/binding_forward_export.dart'; part 'event_handler_param_json.g.dart'; @@ -557,7 +557,7 @@ extension VideoFrameObserverOnTranscodedVideoFrameJsonBufferExt @JsonSerializable(explicitToJson: true) class MediaRecorderObserverOnRecorderStateChangedJson { const MediaRecorderObserverOnRecorderStateChangedJson( - {this.channelId, this.uid, this.state, this.error}); + {this.channelId, this.uid, this.state, this.reason}); @JsonKey(name: 'channelId') final String? channelId; @@ -565,8 +565,8 @@ class MediaRecorderObserverOnRecorderStateChangedJson { final int? uid; @JsonKey(name: 'state') final RecorderState? state; - @JsonKey(name: 'error') - final RecorderErrorCode? error; + @JsonKey(name: 'reason') + final RecorderReasonCode? reason; factory MediaRecorderObserverOnRecorderStateChangedJson.fromJson( Map json) => _$MediaRecorderObserverOnRecorderStateChangedJsonFromJson(json); @@ -620,6 +620,92 @@ extension MediaRecorderObserverOnRecorderInfoUpdatedJsonBufferExt } } +@JsonSerializable(explicitToJson: true) +class H265TranscoderObserverOnEnableTranscodeJson { + const H265TranscoderObserverOnEnableTranscodeJson({this.result}); + + @JsonKey(name: 'result') + final H265TranscodeResult? result; + factory H265TranscoderObserverOnEnableTranscodeJson.fromJson( + Map json) => + _$H265TranscoderObserverOnEnableTranscodeJsonFromJson(json); + Map toJson() => + _$H265TranscoderObserverOnEnableTranscodeJsonToJson(this); +} + +extension H265TranscoderObserverOnEnableTranscodeJsonBufferExt + on H265TranscoderObserverOnEnableTranscodeJson { + H265TranscoderObserverOnEnableTranscodeJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + +@JsonSerializable(explicitToJson: true) +class H265TranscoderObserverOnQueryChannelJson { + const H265TranscoderObserverOnQueryChannelJson( + {this.result, this.originChannel, this.transcodeChannel}); + + @JsonKey(name: 'result') + final H265TranscodeResult? result; + @JsonKey(name: 'originChannel') + final String? originChannel; + @JsonKey(name: 'transcodeChannel') + final String? transcodeChannel; + factory H265TranscoderObserverOnQueryChannelJson.fromJson( + Map json) => + _$H265TranscoderObserverOnQueryChannelJsonFromJson(json); + Map toJson() => + _$H265TranscoderObserverOnQueryChannelJsonToJson(this); +} + +extension H265TranscoderObserverOnQueryChannelJsonBufferExt + on H265TranscoderObserverOnQueryChannelJson { + H265TranscoderObserverOnQueryChannelJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + +@JsonSerializable(explicitToJson: true) +class H265TranscoderObserverOnTriggerTranscodeJson { + const H265TranscoderObserverOnTriggerTranscodeJson({this.result}); + + @JsonKey(name: 'result') + final H265TranscodeResult? result; + factory H265TranscoderObserverOnTriggerTranscodeJson.fromJson( + Map json) => + _$H265TranscoderObserverOnTriggerTranscodeJsonFromJson(json); + Map toJson() => + _$H265TranscoderObserverOnTriggerTranscodeJsonToJson(this); +} + +extension H265TranscoderObserverOnTriggerTranscodeJsonBufferExt + on H265TranscoderObserverOnTriggerTranscodeJson { + H265TranscoderObserverOnTriggerTranscodeJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + @JsonSerializable(explicitToJson: true) class MediaPlayerVideoFrameObserverOnFrameJson { const MediaPlayerVideoFrameObserverOnFrameJson({this.frame}); @@ -650,12 +736,12 @@ extension MediaPlayerVideoFrameObserverOnFrameJsonBufferExt @JsonSerializable(explicitToJson: true) class MediaPlayerSourceObserverOnPlayerSourceStateChangedJson { const MediaPlayerSourceObserverOnPlayerSourceStateChangedJson( - {this.state, this.ec}); + {this.state, this.reason}); @JsonKey(name: 'state') final MediaPlayerState? state; - @JsonKey(name: 'ec') - final MediaPlayerError? ec; + @JsonKey(name: 'reason') + final MediaPlayerReason? reason; factory MediaPlayerSourceObserverOnPlayerSourceStateChangedJson.fromJson( Map json) => _$MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonFromJson(json); @@ -679,10 +765,13 @@ extension MediaPlayerSourceObserverOnPlayerSourceStateChangedJsonBufferExt @JsonSerializable(explicitToJson: true) class MediaPlayerSourceObserverOnPositionChangedJson { - const MediaPlayerSourceObserverOnPositionChangedJson({this.positionMs}); + const MediaPlayerSourceObserverOnPositionChangedJson( + {this.positionMs, this.timestampMs}); - @JsonKey(name: 'position_ms') + @JsonKey(name: 'positionMs') final int? positionMs; + @JsonKey(name: 'timestampMs') + final int? timestampMs; factory MediaPlayerSourceObserverOnPositionChangedJson.fromJson( Map json) => _$MediaPlayerSourceObserverOnPositionChangedJsonFromJson(json); @@ -936,6 +1025,60 @@ extension MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonBufferExt } } +@JsonSerializable(explicitToJson: true) +class MediaPlayerSourceObserverOnPlayerCacheStatsJson { + const MediaPlayerSourceObserverOnPlayerCacheStatsJson({this.stats}); + + @JsonKey(name: 'stats') + final CacheStatistics? stats; + factory MediaPlayerSourceObserverOnPlayerCacheStatsJson.fromJson( + Map json) => + _$MediaPlayerSourceObserverOnPlayerCacheStatsJsonFromJson(json); + Map toJson() => + _$MediaPlayerSourceObserverOnPlayerCacheStatsJsonToJson(this); +} + +extension MediaPlayerSourceObserverOnPlayerCacheStatsJsonBufferExt + on MediaPlayerSourceObserverOnPlayerCacheStatsJson { + MediaPlayerSourceObserverOnPlayerCacheStatsJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + +@JsonSerializable(explicitToJson: true) +class MediaPlayerSourceObserverOnPlayerPlaybackStatsJson { + const MediaPlayerSourceObserverOnPlayerPlaybackStatsJson({this.stats}); + + @JsonKey(name: 'stats') + final PlayerPlaybackStats? stats; + factory MediaPlayerSourceObserverOnPlayerPlaybackStatsJson.fromJson( + Map json) => + _$MediaPlayerSourceObserverOnPlayerPlaybackStatsJsonFromJson(json); + Map toJson() => + _$MediaPlayerSourceObserverOnPlayerPlaybackStatsJsonToJson(this); +} + +extension MediaPlayerSourceObserverOnPlayerPlaybackStatsJsonBufferExt + on MediaPlayerSourceObserverOnPlayerPlaybackStatsJson { + MediaPlayerSourceObserverOnPlayerPlaybackStatsJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + @JsonSerializable(explicitToJson: true) class MediaPlayerSourceObserverOnAudioVolumeIndicationJson { const MediaPlayerSourceObserverOnAudioVolumeIndicationJson({this.volume}); @@ -966,14 +1109,14 @@ extension MediaPlayerSourceObserverOnAudioVolumeIndicationJsonBufferExt @JsonSerializable(explicitToJson: true) class MusicContentCenterEventHandlerOnMusicChartsResultJson { const MusicContentCenterEventHandlerOnMusicChartsResultJson( - {this.requestId, this.result, this.errorCode}); + {this.requestId, this.result, this.reason}); @JsonKey(name: 'requestId') final String? requestId; @JsonKey(name: 'result') final List? result; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; + @JsonKey(name: 'reason') + final MusicContentCenterStateReason? reason; factory MusicContentCenterEventHandlerOnMusicChartsResultJson.fromJson( Map json) => _$MusicContentCenterEventHandlerOnMusicChartsResultJsonFromJson(json); @@ -998,14 +1141,14 @@ extension MusicContentCenterEventHandlerOnMusicChartsResultJsonBufferExt @JsonSerializable(explicitToJson: true) class MusicContentCenterEventHandlerOnMusicCollectionResultJson { const MusicContentCenterEventHandlerOnMusicCollectionResultJson( - {this.requestId, this.result, this.errorCode}); + {this.requestId, this.result, this.reason}); @JsonKey(name: 'requestId') final String? requestId; @JsonKey(name: 'result', ignore: true) final MusicCollection? result; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; + @JsonKey(name: 'reason') + final MusicContentCenterStateReason? reason; factory MusicContentCenterEventHandlerOnMusicCollectionResultJson.fromJson( Map json) => _$MusicContentCenterEventHandlerOnMusicCollectionResultJsonFromJson(json); @@ -1030,7 +1173,7 @@ extension MusicContentCenterEventHandlerOnMusicCollectionResultJsonBufferExt @JsonSerializable(explicitToJson: true) class MusicContentCenterEventHandlerOnLyricResultJson { const MusicContentCenterEventHandlerOnLyricResultJson( - {this.requestId, this.songCode, this.lyricUrl, this.errorCode}); + {this.requestId, this.songCode, this.lyricUrl, this.reason}); @JsonKey(name: 'requestId') final String? requestId; @@ -1038,8 +1181,8 @@ class MusicContentCenterEventHandlerOnLyricResultJson { final int? songCode; @JsonKey(name: 'lyricUrl') final String? lyricUrl; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; + @JsonKey(name: 'reason') + final MusicContentCenterStateReason? reason; factory MusicContentCenterEventHandlerOnLyricResultJson.fromJson( Map json) => _$MusicContentCenterEventHandlerOnLyricResultJsonFromJson(json); @@ -1064,7 +1207,7 @@ extension MusicContentCenterEventHandlerOnLyricResultJsonBufferExt @JsonSerializable(explicitToJson: true) class MusicContentCenterEventHandlerOnSongSimpleInfoResultJson { const MusicContentCenterEventHandlerOnSongSimpleInfoResultJson( - {this.requestId, this.songCode, this.simpleInfo, this.errorCode}); + {this.requestId, this.songCode, this.simpleInfo, this.reason}); @JsonKey(name: 'requestId') final String? requestId; @@ -1072,8 +1215,8 @@ class MusicContentCenterEventHandlerOnSongSimpleInfoResultJson { final int? songCode; @JsonKey(name: 'simpleInfo') final String? simpleInfo; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; + @JsonKey(name: 'reason') + final MusicContentCenterStateReason? reason; factory MusicContentCenterEventHandlerOnSongSimpleInfoResultJson.fromJson( Map json) => _$MusicContentCenterEventHandlerOnSongSimpleInfoResultJsonFromJson(json); @@ -1102,8 +1245,8 @@ class MusicContentCenterEventHandlerOnPreLoadEventJson { this.songCode, this.percent, this.lyricUrl, - this.status, - this.errorCode}); + this.state, + this.reason}); @JsonKey(name: 'requestId') final String? requestId; @@ -1113,10 +1256,10 @@ class MusicContentCenterEventHandlerOnPreLoadEventJson { final int? percent; @JsonKey(name: 'lyricUrl') final String? lyricUrl; - @JsonKey(name: 'status') - final PreloadStatusCode? status; - @JsonKey(name: 'errorCode') - final MusicContentCenterStatusCode? errorCode; + @JsonKey(name: 'state') + final PreloadState? state; + @JsonKey(name: 'reason') + final MusicContentCenterStateReason? reason; factory MusicContentCenterEventHandlerOnPreLoadEventJson.fromJson( Map json) => _$MusicContentCenterEventHandlerOnPreLoadEventJsonFromJson(json); @@ -1851,14 +1994,14 @@ extension RtcEngineEventHandlerOnVideoSizeChangedJsonBufferExt @JsonSerializable(explicitToJson: true) class RtcEngineEventHandlerOnLocalVideoStateChangedJson { const RtcEngineEventHandlerOnLocalVideoStateChangedJson( - {this.source, this.state, this.error}); + {this.source, this.state, this.reason}); @JsonKey(name: 'source') final VideoSourceType? source; @JsonKey(name: 'state') final LocalVideoStreamState? state; - @JsonKey(name: 'error') - final LocalVideoStreamError? error; + @JsonKey(name: 'reason') + final LocalVideoStreamReason? reason; factory RtcEngineEventHandlerOnLocalVideoStateChangedJson.fromJson( Map json) => _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonFromJson(json); @@ -2177,24 +2320,24 @@ extension RtcEngineEventHandlerOnUserEnableLocalVideoJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalAudioStatsJson { - const RtcEngineEventHandlerOnLocalAudioStatsJson( +class RtcEngineEventHandlerOnRemoteAudioStatsJson { + const RtcEngineEventHandlerOnRemoteAudioStatsJson( {this.connection, this.stats}); @JsonKey(name: 'connection') final RtcConnection? connection; @JsonKey(name: 'stats') - final LocalAudioStats? stats; - factory RtcEngineEventHandlerOnLocalAudioStatsJson.fromJson( + final RemoteAudioStats? stats; + factory RtcEngineEventHandlerOnRemoteAudioStatsJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson(json); + _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson(this); + _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson(this); } -extension RtcEngineEventHandlerOnLocalAudioStatsJsonBufferExt - on RtcEngineEventHandlerOnLocalAudioStatsJson { - RtcEngineEventHandlerOnLocalAudioStatsJson fillBuffers( +extension RtcEngineEventHandlerOnRemoteAudioStatsJsonBufferExt + on RtcEngineEventHandlerOnRemoteAudioStatsJson { + RtcEngineEventHandlerOnRemoteAudioStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2207,24 +2350,24 @@ extension RtcEngineEventHandlerOnLocalAudioStatsJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnRemoteAudioStatsJson { - const RtcEngineEventHandlerOnRemoteAudioStatsJson( +class RtcEngineEventHandlerOnLocalAudioStatsJson { + const RtcEngineEventHandlerOnLocalAudioStatsJson( {this.connection, this.stats}); @JsonKey(name: 'connection') final RtcConnection? connection; @JsonKey(name: 'stats') - final RemoteAudioStats? stats; - factory RtcEngineEventHandlerOnRemoteAudioStatsJson.fromJson( + final LocalAudioStats? stats; + factory RtcEngineEventHandlerOnLocalAudioStatsJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson(json); + _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson(this); + _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson(this); } -extension RtcEngineEventHandlerOnRemoteAudioStatsJsonBufferExt - on RtcEngineEventHandlerOnRemoteAudioStatsJson { - RtcEngineEventHandlerOnRemoteAudioStatsJson fillBuffers( +extension RtcEngineEventHandlerOnLocalAudioStatsJsonBufferExt + on RtcEngineEventHandlerOnLocalAudioStatsJson { + RtcEngineEventHandlerOnLocalAudioStatsJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2486,12 +2629,12 @@ extension RtcEngineEventHandlerOnAudioMixingStateChangedJsonBufferExt @JsonSerializable(explicitToJson: true) class RtcEngineEventHandlerOnRhythmPlayerStateChangedJson { const RtcEngineEventHandlerOnRhythmPlayerStateChangedJson( - {this.state, this.errorCode}); + {this.state, this.reason}); @JsonKey(name: 'state') final RhythmPlayerStateType? state; - @JsonKey(name: 'errorCode') - final RhythmPlayerErrorType? errorCode; + @JsonKey(name: 'reason') + final RhythmPlayerReason? reason; factory RtcEngineEventHandlerOnRhythmPlayerStateChangedJson.fromJson( Map json) => _$RtcEngineEventHandlerOnRhythmPlayerStateChangedJsonFromJson(json); @@ -2811,26 +2954,26 @@ extension RtcEngineEventHandlerOnFirstLocalAudioFramePublishedJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { - const RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( - {this.connection, this.userId, this.elapsed}); +class RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { + const RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( + {this.connection, this.uid, this.elapsed}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'userId') - final int? userId; + @JsonKey(name: 'uid') + final int? uid; @JsonKey(name: 'elapsed') final int? elapsed; - factory RtcEngineEventHandlerOnFirstRemoteAudioFrameJson.fromJson( + factory RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson(this); + _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonBufferExt - on RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson fillBuffers( +extension RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonBufferExt + on RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2843,26 +2986,26 @@ extension RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { - const RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( - {this.connection, this.uid, this.elapsed}); +class RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { + const RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( + {this.connection, this.userId, this.elapsed}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'uid') - final int? uid; + @JsonKey(name: 'userId') + final int? userId; @JsonKey(name: 'elapsed') final int? elapsed; - factory RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson.fromJson( + factory RtcEngineEventHandlerOnFirstRemoteAudioFrameJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonFromJson(json); + _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson(this); + _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson(this); } -extension RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonBufferExt - on RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson { - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson fillBuffers( +extension RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonBufferExt + on RtcEngineEventHandlerOnFirstRemoteAudioFrameJson { + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -2877,14 +3020,14 @@ extension RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonBufferExt @JsonSerializable(explicitToJson: true) class RtcEngineEventHandlerOnLocalAudioStateChangedJson { const RtcEngineEventHandlerOnLocalAudioStateChangedJson( - {this.connection, this.state, this.error}); + {this.connection, this.state, this.reason}); @JsonKey(name: 'connection') final RtcConnection? connection; @JsonKey(name: 'state') final LocalAudioStreamState? state; - @JsonKey(name: 'error') - final LocalAudioStreamError? error; + @JsonKey(name: 'reason') + final LocalAudioStreamReason? reason; factory RtcEngineEventHandlerOnLocalAudioStateChangedJson.fromJson( Map json) => _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonFromJson(json); @@ -3142,14 +3285,14 @@ extension RtcEngineEventHandlerOnAudioDeviceVolumeChangedJsonBufferExt @JsonSerializable(explicitToJson: true) class RtcEngineEventHandlerOnRtmpStreamingStateChangedJson { const RtcEngineEventHandlerOnRtmpStreamingStateChangedJson( - {this.url, this.state, this.errCode}); + {this.url, this.state, this.reason}); @JsonKey(name: 'url') final String? url; @JsonKey(name: 'state') final RtmpStreamPublishState? state; - @JsonKey(name: 'errCode') - final RtmpStreamPublishErrorType? errCode; + @JsonKey(name: 'reason') + final RtmpStreamPublishReason? reason; factory RtcEngineEventHandlerOnRtmpStreamingStateChangedJson.fromJson( Map json) => _$RtcEngineEventHandlerOnRtmpStreamingStateChangedJsonFromJson(json); @@ -3283,33 +3426,6 @@ extension RtcEngineEventHandlerOnChannelMediaRelayStateChangedJsonBufferExt } } -@JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnChannelMediaRelayEventJson { - const RtcEngineEventHandlerOnChannelMediaRelayEventJson({this.code}); - - @JsonKey(name: 'code') - final ChannelMediaRelayEvent? code; - factory RtcEngineEventHandlerOnChannelMediaRelayEventJson.fromJson( - Map json) => - _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonFromJson(json); - Map toJson() => - _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonToJson(this); -} - -extension RtcEngineEventHandlerOnChannelMediaRelayEventJsonBufferExt - on RtcEngineEventHandlerOnChannelMediaRelayEventJson { - RtcEngineEventHandlerOnChannelMediaRelayEventJson fillBuffers( - List bufferList) { - if (bufferList.isEmpty) return this; - return this; - } - - List collectBufferList() { - final bufferList = []; - return bufferList; - } -} - @JsonSerializable(explicitToJson: true) class RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson { const RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson( @@ -3695,6 +3811,102 @@ extension RtcEngineEventHandlerOnUserInfoUpdatedJsonBufferExt } } +@JsonSerializable(explicitToJson: true) +class RtcEngineEventHandlerOnUserAccountUpdatedJson { + const RtcEngineEventHandlerOnUserAccountUpdatedJson( + {this.connection, this.remoteUid, this.remoteUserAccount}); + + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'remoteUid') + final int? remoteUid; + @JsonKey(name: 'remoteUserAccount') + final String? remoteUserAccount; + factory RtcEngineEventHandlerOnUserAccountUpdatedJson.fromJson( + Map json) => + _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson(json); + Map toJson() => + _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson(this); +} + +extension RtcEngineEventHandlerOnUserAccountUpdatedJsonBufferExt + on RtcEngineEventHandlerOnUserAccountUpdatedJson { + RtcEngineEventHandlerOnUserAccountUpdatedJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + +@JsonSerializable(explicitToJson: true) +class RtcEngineEventHandlerOnVideoRenderingTracingResultJson { + const RtcEngineEventHandlerOnVideoRenderingTracingResultJson( + {this.connection, this.uid, this.currentEvent, this.tracingInfo}); + + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'currentEvent') + final MediaTraceEvent? currentEvent; + @JsonKey(name: 'tracingInfo') + final VideoRenderingTracingInfo? tracingInfo; + factory RtcEngineEventHandlerOnVideoRenderingTracingResultJson.fromJson( + Map json) => + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson(json); + Map toJson() => + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson(this); +} + +extension RtcEngineEventHandlerOnVideoRenderingTracingResultJsonBufferExt + on RtcEngineEventHandlerOnVideoRenderingTracingResultJson { + RtcEngineEventHandlerOnVideoRenderingTracingResultJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + +@JsonSerializable(explicitToJson: true) +class RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { + const RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( + {this.stream, this.error}); + + @JsonKey(name: 'stream') + final TranscodingVideoStream? stream; + @JsonKey(name: 'error') + final VideoTranscoderError? error; + factory RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson.fromJson( + Map json) => + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson(json); + Map toJson() => + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson(this); +} + +extension RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonBufferExt + on RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + @JsonSerializable(explicitToJson: true) class RtcEngineEventHandlerOnUploadLogResultJson { const RtcEngineEventHandlerOnUploadLogResultJson( @@ -3883,6 +4095,49 @@ extension RtcEngineEventHandlerOnVideoPublishStateChangedJsonBufferExt } } +@JsonSerializable(explicitToJson: true) +class RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson { + const RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson( + {this.connection, + this.uid, + this.width, + this.height, + this.layoutCount, + this.layoutlist}); + + @JsonKey(name: 'connection') + final RtcConnection? connection; + @JsonKey(name: 'uid') + final int? uid; + @JsonKey(name: 'width') + final int? width; + @JsonKey(name: 'height') + final int? height; + @JsonKey(name: 'layoutCount') + final int? layoutCount; + @JsonKey(name: 'layoutlist') + final List? layoutlist; + factory RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson.fromJson( + Map json) => + _$RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJsonFromJson(json); + Map toJson() => + _$RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJsonToJson(this); +} + +extension RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJsonBufferExt + on RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson { + RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson fillBuffers( + List bufferList) { + if (bufferList.isEmpty) return this; + return this; + } + + List collectBufferList() { + final bufferList = []; + return bufferList; + } +} + @JsonSerializable(explicitToJson: true) class RtcEngineEventHandlerOnExtensionEventJson { const RtcEngineEventHandlerOnExtensionEventJson( @@ -4012,90 +4267,24 @@ extension RtcEngineEventHandlerOnExtensionErrorJsonBufferExt } @JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnUserAccountUpdatedJson { - const RtcEngineEventHandlerOnUserAccountUpdatedJson( - {this.connection, this.remoteUid, this.userAccount}); - - @JsonKey(name: 'connection') - final RtcConnection? connection; - @JsonKey(name: 'remoteUid') - final int? remoteUid; - @JsonKey(name: 'userAccount') - final String? userAccount; - factory RtcEngineEventHandlerOnUserAccountUpdatedJson.fromJson( - Map json) => - _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson(json); - Map toJson() => - _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson(this); -} - -extension RtcEngineEventHandlerOnUserAccountUpdatedJsonBufferExt - on RtcEngineEventHandlerOnUserAccountUpdatedJson { - RtcEngineEventHandlerOnUserAccountUpdatedJson fillBuffers( - List bufferList) { - if (bufferList.isEmpty) return this; - return this; - } - - List collectBufferList() { - final bufferList = []; - return bufferList; - } -} - -@JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { - const RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( - {this.stream, this.error}); - - @JsonKey(name: 'stream') - final TranscodingVideoStream? stream; - @JsonKey(name: 'error') - final VideoTranscoderError? error; - factory RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson.fromJson( - Map json) => - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson(json); - Map toJson() => - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson(this); -} - -extension RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonBufferExt - on RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson { - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson fillBuffers( - List bufferList) { - if (bufferList.isEmpty) return this; - return this; - } - - List collectBufferList() { - final bufferList = []; - return bufferList; - } -} - -@JsonSerializable(explicitToJson: true) -class RtcEngineEventHandlerOnVideoRenderingTracingResultJson { - const RtcEngineEventHandlerOnVideoRenderingTracingResultJson( - {this.connection, this.uid, this.currentEvent, this.tracingInfo}); +class RtcEngineEventHandlerOnSetRtmFlagResultJson { + const RtcEngineEventHandlerOnSetRtmFlagResultJson( + {this.connection, this.code}); @JsonKey(name: 'connection') final RtcConnection? connection; - @JsonKey(name: 'uid') - final int? uid; - @JsonKey(name: 'currentEvent') - final MediaTraceEvent? currentEvent; - @JsonKey(name: 'tracingInfo') - final VideoRenderingTracingInfo? tracingInfo; - factory RtcEngineEventHandlerOnVideoRenderingTracingResultJson.fromJson( + @JsonKey(name: 'code') + final int? code; + factory RtcEngineEventHandlerOnSetRtmFlagResultJson.fromJson( Map json) => - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson(json); + _$RtcEngineEventHandlerOnSetRtmFlagResultJsonFromJson(json); Map toJson() => - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson(this); + _$RtcEngineEventHandlerOnSetRtmFlagResultJsonToJson(this); } -extension RtcEngineEventHandlerOnVideoRenderingTracingResultJsonBufferExt - on RtcEngineEventHandlerOnVideoRenderingTracingResultJson { - RtcEngineEventHandlerOnVideoRenderingTracingResultJson fillBuffers( +extension RtcEngineEventHandlerOnSetRtmFlagResultJsonBufferExt + on RtcEngineEventHandlerOnSetRtmFlagResultJson { + RtcEngineEventHandlerOnSetRtmFlagResultJson fillBuffers( List bufferList) { if (bufferList.isEmpty) return this; return this; @@ -4137,12 +4326,12 @@ extension MetadataObserverOnMetadataReceivedJsonBufferExt @JsonSerializable(explicitToJson: true) class DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson { const DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson( - {this.state, this.error, this.message}); + {this.state, this.reason, this.message}); @JsonKey(name: 'state') final DirectCdnStreamingState? state; - @JsonKey(name: 'error') - final DirectCdnStreamingError? error; + @JsonKey(name: 'reason') + final DirectCdnStreamingReason? reason; @JsonKey(name: 'message') final String? message; factory DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson.fromJson( diff --git a/lib/src/binding/event_handler_param_json.g.dart b/lib/src/binding/event_handler_param_json.g.dart index 56ad02de2..e2bb06356 100644 --- a/lib/src/binding/event_handler_param_json.g.dart +++ b/lib/src/binding/event_handler_param_json.g.dart @@ -336,7 +336,8 @@ MediaRecorderObserverOnRecorderStateChangedJson channelId: json['channelId'] as String?, uid: json['uid'] as int?, state: $enumDecodeNullable(_$RecorderStateEnumMap, json['state']), - error: $enumDecodeNullable(_$RecorderErrorCodeEnumMap, json['error']), + reason: + $enumDecodeNullable(_$RecorderReasonCodeEnumMap, json['reason']), ); Map _$MediaRecorderObserverOnRecorderStateChangedJsonToJson( @@ -345,7 +346,7 @@ Map _$MediaRecorderObserverOnRecorderStateChangedJsonToJson( 'channelId': instance.channelId, 'uid': instance.uid, 'state': _$RecorderStateEnumMap[instance.state], - 'error': _$RecorderErrorCodeEnumMap[instance.error], + 'reason': _$RecorderReasonCodeEnumMap[instance.reason], }; const _$RecorderStateEnumMap = { @@ -354,12 +355,12 @@ const _$RecorderStateEnumMap = { RecorderState.recorderStateStop: 3, }; -const _$RecorderErrorCodeEnumMap = { - RecorderErrorCode.recorderErrorNone: 0, - RecorderErrorCode.recorderErrorWriteFailed: 1, - RecorderErrorCode.recorderErrorNoStream: 2, - RecorderErrorCode.recorderErrorOverMaxDuration: 3, - RecorderErrorCode.recorderErrorConfigChanged: 4, +const _$RecorderReasonCodeEnumMap = { + RecorderReasonCode.recorderReasonNone: 0, + RecorderReasonCode.recorderReasonWriteFailed: 1, + RecorderReasonCode.recorderReasonNoStream: 2, + RecorderReasonCode.recorderReasonOverMaxDuration: 3, + RecorderReasonCode.recorderReasonConfigChanged: 4, }; MediaRecorderObserverOnRecorderInfoUpdatedJson @@ -381,6 +382,67 @@ Map _$MediaRecorderObserverOnRecorderInfoUpdatedJsonToJson( 'info': instance.info?.toJson(), }; +H265TranscoderObserverOnEnableTranscodeJson + _$H265TranscoderObserverOnEnableTranscodeJsonFromJson( + Map json) => + H265TranscoderObserverOnEnableTranscodeJson( + result: + $enumDecodeNullable(_$H265TranscodeResultEnumMap, json['result']), + ); + +Map _$H265TranscoderObserverOnEnableTranscodeJsonToJson( + H265TranscoderObserverOnEnableTranscodeJson instance) => + { + 'result': _$H265TranscodeResultEnumMap[instance.result], + }; + +const _$H265TranscodeResultEnumMap = { + H265TranscodeResult.h265TranscodeResultUnknown: -1, + H265TranscodeResult.h265TranscodeResultSuccess: 0, + H265TranscodeResult.h265TranscodeResultRequestInvalid: 1, + H265TranscodeResult.h265TranscodeResultUnauthorized: 2, + H265TranscodeResult.h265TranscodeResultTokenExpired: 3, + H265TranscodeResult.h265TranscodeResultForbidden: 4, + H265TranscodeResult.h265TranscodeResultNotFound: 5, + H265TranscodeResult.h265TranscodeResultConflicted: 6, + H265TranscodeResult.h265TranscodeResultNotSupported: 7, + H265TranscodeResult.h265TranscodeResultTooOften: 8, + H265TranscodeResult.h265TranscodeResultServerInternalError: 9, + H265TranscodeResult.h265TranscodeResultServiceUnavailable: 10, +}; + +H265TranscoderObserverOnQueryChannelJson + _$H265TranscoderObserverOnQueryChannelJsonFromJson( + Map json) => + H265TranscoderObserverOnQueryChannelJson( + result: + $enumDecodeNullable(_$H265TranscodeResultEnumMap, json['result']), + originChannel: json['originChannel'] as String?, + transcodeChannel: json['transcodeChannel'] as String?, + ); + +Map _$H265TranscoderObserverOnQueryChannelJsonToJson( + H265TranscoderObserverOnQueryChannelJson instance) => + { + 'result': _$H265TranscodeResultEnumMap[instance.result], + 'originChannel': instance.originChannel, + 'transcodeChannel': instance.transcodeChannel, + }; + +H265TranscoderObserverOnTriggerTranscodeJson + _$H265TranscoderObserverOnTriggerTranscodeJsonFromJson( + Map json) => + H265TranscoderObserverOnTriggerTranscodeJson( + result: + $enumDecodeNullable(_$H265TranscodeResultEnumMap, json['result']), + ); + +Map _$H265TranscoderObserverOnTriggerTranscodeJsonToJson( + H265TranscoderObserverOnTriggerTranscodeJson instance) => + { + 'result': _$H265TranscodeResultEnumMap[instance.result], + }; + MediaPlayerVideoFrameObserverOnFrameJson _$MediaPlayerVideoFrameObserverOnFrameJsonFromJson( Map json) => @@ -401,7 +463,8 @@ MediaPlayerSourceObserverOnPlayerSourceStateChangedJson Map json) => MediaPlayerSourceObserverOnPlayerSourceStateChangedJson( state: $enumDecodeNullable(_$MediaPlayerStateEnumMap, json['state']), - ec: $enumDecodeNullable(_$MediaPlayerErrorEnumMap, json['ec']), + reason: + $enumDecodeNullable(_$MediaPlayerReasonEnumMap, json['reason']), ); Map @@ -409,7 +472,7 @@ Map MediaPlayerSourceObserverOnPlayerSourceStateChangedJson instance) => { 'state': _$MediaPlayerStateEnumMap[instance.state], - 'ec': _$MediaPlayerErrorEnumMap[instance.ec], + 'reason': _$MediaPlayerReasonEnumMap[instance.reason], }; const _$MediaPlayerStateEnumMap = { @@ -431,38 +494,40 @@ const _$MediaPlayerStateEnumMap = { MediaPlayerState.playerStateFailed: 100, }; -const _$MediaPlayerErrorEnumMap = { - MediaPlayerError.playerErrorNone: 0, - MediaPlayerError.playerErrorInvalidArguments: -1, - MediaPlayerError.playerErrorInternal: -2, - MediaPlayerError.playerErrorNoResource: -3, - MediaPlayerError.playerErrorInvalidMediaSource: -4, - MediaPlayerError.playerErrorUnknownStreamType: -5, - MediaPlayerError.playerErrorObjNotInitialized: -6, - MediaPlayerError.playerErrorCodecNotSupported: -7, - MediaPlayerError.playerErrorVideoRenderFailed: -8, - MediaPlayerError.playerErrorInvalidState: -9, - MediaPlayerError.playerErrorUrlNotFound: -10, - MediaPlayerError.playerErrorInvalidConnectionState: -11, - MediaPlayerError.playerErrorSrcBufferUnderflow: -12, - MediaPlayerError.playerErrorInterrupted: -13, - MediaPlayerError.playerErrorNotSupported: -14, - MediaPlayerError.playerErrorTokenExpired: -15, - MediaPlayerError.playerErrorIpExpired: -16, - MediaPlayerError.playerErrorUnknown: -17, +const _$MediaPlayerReasonEnumMap = { + MediaPlayerReason.playerReasonNone: 0, + MediaPlayerReason.playerReasonInvalidArguments: -1, + MediaPlayerReason.playerReasonInternal: -2, + MediaPlayerReason.playerReasonNoResource: -3, + MediaPlayerReason.playerReasonInvalidMediaSource: -4, + MediaPlayerReason.playerReasonUnknownStreamType: -5, + MediaPlayerReason.playerReasonObjNotInitialized: -6, + MediaPlayerReason.playerReasonCodecNotSupported: -7, + MediaPlayerReason.playerReasonVideoRenderFailed: -8, + MediaPlayerReason.playerReasonInvalidState: -9, + MediaPlayerReason.playerReasonUrlNotFound: -10, + MediaPlayerReason.playerReasonInvalidConnectionState: -11, + MediaPlayerReason.playerReasonSrcBufferUnderflow: -12, + MediaPlayerReason.playerReasonInterrupted: -13, + MediaPlayerReason.playerReasonNotSupported: -14, + MediaPlayerReason.playerReasonTokenExpired: -15, + MediaPlayerReason.playerReasonIpExpired: -16, + MediaPlayerReason.playerReasonUnknown: -17, }; MediaPlayerSourceObserverOnPositionChangedJson _$MediaPlayerSourceObserverOnPositionChangedJsonFromJson( Map json) => MediaPlayerSourceObserverOnPositionChangedJson( - positionMs: json['position_ms'] as int?, + positionMs: json['positionMs'] as int?, + timestampMs: json['timestampMs'] as int?, ); Map _$MediaPlayerSourceObserverOnPositionChangedJsonToJson( MediaPlayerSourceObserverOnPositionChangedJson instance) => { - 'position_ms': instance.positionMs, + 'positionMs': instance.positionMs, + 'timestampMs': instance.timestampMs, }; MediaPlayerSourceObserverOnPlayerEventJson @@ -606,6 +671,37 @@ Map _$MediaPlayerSourceObserverOnPlayerInfoUpdatedJsonToJson( 'info': instance.info?.toJson(), }; +MediaPlayerSourceObserverOnPlayerCacheStatsJson + _$MediaPlayerSourceObserverOnPlayerCacheStatsJsonFromJson( + Map json) => + MediaPlayerSourceObserverOnPlayerCacheStatsJson( + stats: json['stats'] == null + ? null + : CacheStatistics.fromJson(json['stats'] as Map), + ); + +Map _$MediaPlayerSourceObserverOnPlayerCacheStatsJsonToJson( + MediaPlayerSourceObserverOnPlayerCacheStatsJson instance) => + { + 'stats': instance.stats?.toJson(), + }; + +MediaPlayerSourceObserverOnPlayerPlaybackStatsJson + _$MediaPlayerSourceObserverOnPlayerPlaybackStatsJsonFromJson( + Map json) => + MediaPlayerSourceObserverOnPlayerPlaybackStatsJson( + stats: json['stats'] == null + ? null + : PlayerPlaybackStats.fromJson( + json['stats'] as Map), + ); + +Map _$MediaPlayerSourceObserverOnPlayerPlaybackStatsJsonToJson( + MediaPlayerSourceObserverOnPlayerPlaybackStatsJson instance) => + { + 'stats': instance.stats?.toJson(), + }; + MediaPlayerSourceObserverOnAudioVolumeIndicationJson _$MediaPlayerSourceObserverOnAudioVolumeIndicationJsonFromJson( Map json) => @@ -628,8 +724,8 @@ MusicContentCenterEventHandlerOnMusicChartsResultJson result: (json['result'] as List?) ?.map((e) => MusicChartInfo.fromJson(e as Map)) .toList(), - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + reason: $enumDecodeNullable( + _$MusicContentCenterStateReasonEnumMap, json['reason']), ); Map @@ -638,20 +734,19 @@ Map { 'requestId': instance.requestId, 'result': instance.result?.map((e) => e.toJson()).toList(), - 'errorCode': - _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], + 'reason': _$MusicContentCenterStateReasonEnumMap[instance.reason], }; -const _$MusicContentCenterStatusCodeEnumMap = { - MusicContentCenterStatusCode.kMusicContentCenterStatusOk: 0, - MusicContentCenterStatusCode.kMusicContentCenterStatusErr: 1, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrGateway: 2, - MusicContentCenterStatusCode - .kMusicContentCenterStatusErrPermissionAndResource: 3, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrInternalDataParse: 4, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicLoading: 5, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrMusicDecryption: 6, - MusicContentCenterStatusCode.kMusicContentCenterStatusErrHttpInternalError: 7, +const _$MusicContentCenterStateReasonEnumMap = { + MusicContentCenterStateReason.kMusicContentCenterReasonOk: 0, + MusicContentCenterStateReason.kMusicContentCenterReasonError: 1, + MusicContentCenterStateReason.kMusicContentCenterReasonGateway: 2, + MusicContentCenterStateReason.kMusicContentCenterReasonPermissionAndResource: + 3, + MusicContentCenterStateReason.kMusicContentCenterReasonInternalDataParse: 4, + MusicContentCenterStateReason.kMusicContentCenterReasonMusicLoading: 5, + MusicContentCenterStateReason.kMusicContentCenterReasonMusicDecryption: 6, + MusicContentCenterStateReason.kMusicContentCenterReasonHttpInternalError: 7, }; MusicContentCenterEventHandlerOnMusicCollectionResultJson @@ -659,8 +754,8 @@ MusicContentCenterEventHandlerOnMusicCollectionResultJson Map json) => MusicContentCenterEventHandlerOnMusicCollectionResultJson( requestId: json['requestId'] as String?, - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + reason: $enumDecodeNullable( + _$MusicContentCenterStateReasonEnumMap, json['reason']), ); Map { 'requestId': instance.requestId, - 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], + 'reason': _$MusicContentCenterStateReasonEnumMap[instance.reason], }; MusicContentCenterEventHandlerOnLyricResultJson @@ -678,8 +773,8 @@ MusicContentCenterEventHandlerOnLyricResultJson requestId: json['requestId'] as String?, songCode: json['songCode'] as int?, lyricUrl: json['lyricUrl'] as String?, - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + reason: $enumDecodeNullable( + _$MusicContentCenterStateReasonEnumMap, json['reason']), ); Map _$MusicContentCenterEventHandlerOnLyricResultJsonToJson( @@ -688,7 +783,7 @@ Map _$MusicContentCenterEventHandlerOnLyricResultJsonToJson( 'requestId': instance.requestId, 'songCode': instance.songCode, 'lyricUrl': instance.lyricUrl, - 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], + 'reason': _$MusicContentCenterStateReasonEnumMap[instance.reason], }; MusicContentCenterEventHandlerOnSongSimpleInfoResultJson @@ -698,8 +793,8 @@ MusicContentCenterEventHandlerOnSongSimpleInfoResultJson requestId: json['requestId'] as String?, songCode: json['songCode'] as int?, simpleInfo: json['simpleInfo'] as String?, - errorCode: $enumDecodeNullable( - _$MusicContentCenterStatusCodeEnumMap, json['errorCode']), + reason: $enumDecodeNullable( + _$MusicContentCenterStateReasonEnumMap, json['reason']), ); Map _$MusicContentCenterEventHandlerOnPreLoadEventJsonToJson( @@ -733,15 +827,15 @@ Map _$MusicContentCenterEventHandlerOnPreLoadEventJsonToJson( 'songCode': instance.songCode, 'percent': instance.percent, 'lyricUrl': instance.lyricUrl, - 'status': _$PreloadStatusCodeEnumMap[instance.status], - 'errorCode': _$MusicContentCenterStatusCodeEnumMap[instance.errorCode], + 'state': _$PreloadStateEnumMap[instance.state], + 'reason': _$MusicContentCenterStateReasonEnumMap[instance.reason], }; -const _$PreloadStatusCodeEnumMap = { - PreloadStatusCode.kPreloadStatusCompleted: 0, - PreloadStatusCode.kPreloadStatusFailed: 1, - PreloadStatusCode.kPreloadStatusPreloading: 2, - PreloadStatusCode.kPreloadStatusRemoved: 3, +const _$PreloadStateEnumMap = { + PreloadState.kPreloadStateCompleted: 0, + PreloadState.kPreloadStateFailed: 1, + PreloadState.kPreloadStatePreloading: 2, + PreloadState.kPreloadStateRemoved: 3, }; RtcEngineEventHandlerOnJoinChannelSuccessJson @@ -891,7 +985,6 @@ const _$ErrorCodeTypeEnumMap = { ErrorCodeType.errAdmStartRecording: 1012, ErrorCodeType.errAdmStopRecording: 1013, ErrorCodeType.errVdmCameraNotAuthorized: 1501, - ErrorCodeType.errAdmApplicationLoopback: 2007, }; RtcEngineEventHandlerOnAudioQualityJson @@ -1282,8 +1375,8 @@ RtcEngineEventHandlerOnLocalVideoStateChangedJson source: $enumDecodeNullable(_$VideoSourceTypeEnumMap, json['source']), state: $enumDecodeNullable( _$LocalVideoStreamStateEnumMap, json['state']), - error: $enumDecodeNullable( - _$LocalVideoStreamErrorEnumMap, json['error']), + reason: $enumDecodeNullable( + _$LocalVideoStreamReasonEnumMap, json['reason']), ); Map _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonToJson( @@ -1291,7 +1384,7 @@ Map _$RtcEngineEventHandlerOnLocalVideoStateChangedJsonToJson( { 'source': _$VideoSourceTypeEnumMap[instance.source], 'state': _$LocalVideoStreamStateEnumMap[instance.state], - 'error': _$LocalVideoStreamErrorEnumMap[instance.error], + 'reason': _$LocalVideoStreamReasonEnumMap[instance.reason], }; const _$LocalVideoStreamStateEnumMap = { @@ -1301,33 +1394,34 @@ const _$LocalVideoStreamStateEnumMap = { LocalVideoStreamState.localVideoStreamStateFailed: 3, }; -const _$LocalVideoStreamErrorEnumMap = { - LocalVideoStreamError.localVideoStreamErrorOk: 0, - LocalVideoStreamError.localVideoStreamErrorFailure: 1, - LocalVideoStreamError.localVideoStreamErrorDeviceNoPermission: 2, - LocalVideoStreamError.localVideoStreamErrorDeviceBusy: 3, - LocalVideoStreamError.localVideoStreamErrorCaptureFailure: 4, - LocalVideoStreamError.localVideoStreamErrorEncodeFailure: 5, - LocalVideoStreamError.localVideoStreamErrorCaptureInbackground: 6, - LocalVideoStreamError.localVideoStreamErrorCaptureMultipleForegroundApps: 7, - LocalVideoStreamError.localVideoStreamErrorDeviceNotFound: 8, - LocalVideoStreamError.localVideoStreamErrorDeviceDisconnected: 9, - LocalVideoStreamError.localVideoStreamErrorDeviceInvalidId: 10, - LocalVideoStreamError.localVideoStreamErrorDeviceSystemPressure: 101, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowMinimized: 11, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowClosed: 12, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowOccluded: 13, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowNotSupported: +const _$LocalVideoStreamReasonEnumMap = { + LocalVideoStreamReason.localVideoStreamReasonOk: 0, + LocalVideoStreamReason.localVideoStreamReasonFailure: 1, + LocalVideoStreamReason.localVideoStreamReasonDeviceNoPermission: 2, + LocalVideoStreamReason.localVideoStreamReasonDeviceBusy: 3, + LocalVideoStreamReason.localVideoStreamReasonCaptureFailure: 4, + LocalVideoStreamReason.localVideoStreamReasonCodecNotSupport: 5, + LocalVideoStreamReason.localVideoStreamReasonCaptureInbackground: 6, + LocalVideoStreamReason.localVideoStreamReasonCaptureMultipleForegroundApps: 7, + LocalVideoStreamReason.localVideoStreamReasonDeviceNotFound: 8, + LocalVideoStreamReason.localVideoStreamReasonDeviceDisconnected: 9, + LocalVideoStreamReason.localVideoStreamReasonDeviceInvalidId: 10, + LocalVideoStreamReason.localVideoStreamReasonDeviceSystemPressure: 101, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowMinimized: 11, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowClosed: 12, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowOccluded: 13, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowNotSupported: 20, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureFailure: 21, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureNoPermission: 22, - LocalVideoStreamError.localVideoStreamErrorScreenCapturePaused: 23, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureResumed: 24, - LocalVideoStreamError.localVideoStreamErrorScreenCaptureWindowHidden: 25, - LocalVideoStreamError - .localVideoStreamErrorScreenCaptureWindowRecoverFromHidden: 26, - LocalVideoStreamError - .localVideoStreamErrorScreenCaptureWindowRecoverFromMinimized: 27, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureFailure: 21, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureNoPermission: 22, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureAutoFallback: 24, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureWindowHidden: 25, + LocalVideoStreamReason + .localVideoStreamReasonScreenCaptureWindowRecoverFromHidden: 26, + LocalVideoStreamReason + .localVideoStreamReasonScreenCaptureWindowRecoverFromMinimized: 27, + LocalVideoStreamReason.localVideoStreamReasonScreenCapturePaused: 28, + LocalVideoStreamReason.localVideoStreamReasonScreenCaptureResumed: 29, }; RtcEngineEventHandlerOnRemoteVideoStateChangedJson @@ -1551,42 +1645,42 @@ Map _$RtcEngineEventHandlerOnUserEnableLocalVideoJsonToJson( 'enabled': instance.enabled, }; -RtcEngineEventHandlerOnLocalAudioStatsJson - _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson( +RtcEngineEventHandlerOnRemoteAudioStatsJson + _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson( Map json) => - RtcEngineEventHandlerOnLocalAudioStatsJson( + RtcEngineEventHandlerOnRemoteAudioStatsJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), stats: json['stats'] == null ? null - : LocalAudioStats.fromJson(json['stats'] as Map), + : RemoteAudioStats.fromJson( + json['stats'] as Map), ); -Map _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson( - RtcEngineEventHandlerOnLocalAudioStatsJson instance) => +Map _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson( + RtcEngineEventHandlerOnRemoteAudioStatsJson instance) => { 'connection': instance.connection?.toJson(), 'stats': instance.stats?.toJson(), }; -RtcEngineEventHandlerOnRemoteAudioStatsJson - _$RtcEngineEventHandlerOnRemoteAudioStatsJsonFromJson( +RtcEngineEventHandlerOnLocalAudioStatsJson + _$RtcEngineEventHandlerOnLocalAudioStatsJsonFromJson( Map json) => - RtcEngineEventHandlerOnRemoteAudioStatsJson( + RtcEngineEventHandlerOnLocalAudioStatsJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), stats: json['stats'] == null ? null - : RemoteAudioStats.fromJson( - json['stats'] as Map), + : LocalAudioStats.fromJson(json['stats'] as Map), ); -Map _$RtcEngineEventHandlerOnRemoteAudioStatsJsonToJson( - RtcEngineEventHandlerOnRemoteAudioStatsJson instance) => +Map _$RtcEngineEventHandlerOnLocalAudioStatsJsonToJson( + RtcEngineEventHandlerOnLocalAudioStatsJson instance) => { 'connection': instance.connection?.toJson(), 'stats': instance.stats?.toJson(), @@ -1752,8 +1846,8 @@ RtcEngineEventHandlerOnRhythmPlayerStateChangedJson RtcEngineEventHandlerOnRhythmPlayerStateChangedJson( state: $enumDecodeNullable( _$RhythmPlayerStateTypeEnumMap, json['state']), - errorCode: $enumDecodeNullable( - _$RhythmPlayerErrorTypeEnumMap, json['errorCode']), + reason: + $enumDecodeNullable(_$RhythmPlayerReasonEnumMap, json['reason']), ); Map @@ -1761,7 +1855,7 @@ Map RtcEngineEventHandlerOnRhythmPlayerStateChangedJson instance) => { 'state': _$RhythmPlayerStateTypeEnumMap[instance.state], - 'errorCode': _$RhythmPlayerErrorTypeEnumMap[instance.errorCode], + 'reason': _$RhythmPlayerReasonEnumMap[instance.reason], }; const _$RhythmPlayerStateTypeEnumMap = { @@ -1772,12 +1866,12 @@ const _$RhythmPlayerStateTypeEnumMap = { RhythmPlayerStateType.rhythmPlayerStateFailed: 814, }; -const _$RhythmPlayerErrorTypeEnumMap = { - RhythmPlayerErrorType.rhythmPlayerErrorOk: 0, - RhythmPlayerErrorType.rhythmPlayerErrorFailed: 1, - RhythmPlayerErrorType.rhythmPlayerErrorCanNotOpen: 801, - RhythmPlayerErrorType.rhythmPlayerErrorCanNotPlay: 802, - RhythmPlayerErrorType.rhythmPlayerErrorFileOverDurationLimit: 803, +const _$RhythmPlayerReasonEnumMap = { + RhythmPlayerReason.rhythmPlayerReasonOk: 0, + RhythmPlayerReason.rhythmPlayerReasonFailed: 1, + RhythmPlayerReason.rhythmPlayerReasonCanNotOpen: 801, + RhythmPlayerReason.rhythmPlayerReasonCanNotPlay: 802, + RhythmPlayerReason.rhythmPlayerReasonFileOverDurationLimit: 803, }; RtcEngineEventHandlerOnConnectionLostJson @@ -1961,43 +2055,43 @@ Map json) => - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - userId: json['userId'] as int?, + uid: json['uid'] as int?, elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson( - RtcEngineEventHandlerOnFirstRemoteAudioFrameJson instance) => +Map _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson( + RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson instance) => { 'connection': instance.connection?.toJson(), - 'userId': instance.userId, + 'uid': instance.uid, 'elapsed': instance.elapsed, }; -RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson - _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonFromJson( +RtcEngineEventHandlerOnFirstRemoteAudioFrameJson + _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonFromJson( Map json) => - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson( + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - uid: json['uid'] as int?, + userId: json['userId'] as int?, elapsed: json['elapsed'] as int?, ); -Map _$RtcEngineEventHandlerOnFirstRemoteAudioDecodedJsonToJson( - RtcEngineEventHandlerOnFirstRemoteAudioDecodedJson instance) => +Map _$RtcEngineEventHandlerOnFirstRemoteAudioFrameJsonToJson( + RtcEngineEventHandlerOnFirstRemoteAudioFrameJson instance) => { 'connection': instance.connection?.toJson(), - 'uid': instance.uid, + 'userId': instance.userId, 'elapsed': instance.elapsed, }; @@ -2011,8 +2105,8 @@ RtcEngineEventHandlerOnLocalAudioStateChangedJson json['connection'] as Map), state: $enumDecodeNullable( _$LocalAudioStreamStateEnumMap, json['state']), - error: $enumDecodeNullable( - _$LocalAudioStreamErrorEnumMap, json['error']), + reason: $enumDecodeNullable( + _$LocalAudioStreamReasonEnumMap, json['reason']), ); Map _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonToJson( @@ -2020,7 +2114,7 @@ Map _$RtcEngineEventHandlerOnLocalAudioStateChangedJsonToJson( { 'connection': instance.connection?.toJson(), 'state': _$LocalAudioStreamStateEnumMap[instance.state], - 'error': _$LocalAudioStreamErrorEnumMap[instance.error], + 'reason': _$LocalAudioStreamReasonEnumMap[instance.reason], }; const _$LocalAudioStreamStateEnumMap = { @@ -2030,18 +2124,18 @@ const _$LocalAudioStreamStateEnumMap = { LocalAudioStreamState.localAudioStreamStateFailed: 3, }; -const _$LocalAudioStreamErrorEnumMap = { - LocalAudioStreamError.localAudioStreamErrorOk: 0, - LocalAudioStreamError.localAudioStreamErrorFailure: 1, - LocalAudioStreamError.localAudioStreamErrorDeviceNoPermission: 2, - LocalAudioStreamError.localAudioStreamErrorDeviceBusy: 3, - LocalAudioStreamError.localAudioStreamErrorRecordFailure: 4, - LocalAudioStreamError.localAudioStreamErrorEncodeFailure: 5, - LocalAudioStreamError.localAudioStreamErrorNoRecordingDevice: 6, - LocalAudioStreamError.localAudioStreamErrorNoPlayoutDevice: 7, - LocalAudioStreamError.localAudioStreamErrorInterrupted: 8, - LocalAudioStreamError.localAudioStreamErrorRecordInvalidId: 9, - LocalAudioStreamError.localAudioStreamErrorPlayoutInvalidId: 10, +const _$LocalAudioStreamReasonEnumMap = { + LocalAudioStreamReason.localAudioStreamReasonOk: 0, + LocalAudioStreamReason.localAudioStreamReasonFailure: 1, + LocalAudioStreamReason.localAudioStreamReasonDeviceNoPermission: 2, + LocalAudioStreamReason.localAudioStreamReasonDeviceBusy: 3, + LocalAudioStreamReason.localAudioStreamReasonRecordFailure: 4, + LocalAudioStreamReason.localAudioStreamReasonEncodeFailure: 5, + LocalAudioStreamReason.localAudioStreamReasonNoRecordingDevice: 6, + LocalAudioStreamReason.localAudioStreamReasonNoPlayoutDevice: 7, + LocalAudioStreamReason.localAudioStreamReasonInterrupted: 8, + LocalAudioStreamReason.localAudioStreamReasonRecordInvalidId: 9, + LocalAudioStreamReason.localAudioStreamReasonPlayoutInvalidId: 10, }; RtcEngineEventHandlerOnRemoteAudioStateChangedJson @@ -2239,8 +2333,8 @@ RtcEngineEventHandlerOnRtmpStreamingStateChangedJson url: json['url'] as String?, state: $enumDecodeNullable( _$RtmpStreamPublishStateEnumMap, json['state']), - errCode: $enumDecodeNullable( - _$RtmpStreamPublishErrorTypeEnumMap, json['errCode']), + reason: $enumDecodeNullable( + _$RtmpStreamPublishReasonEnumMap, json['reason']), ); Map @@ -2249,7 +2343,7 @@ Map { 'url': instance.url, 'state': _$RtmpStreamPublishStateEnumMap[instance.state], - 'errCode': _$RtmpStreamPublishErrorTypeEnumMap[instance.errCode], + 'reason': _$RtmpStreamPublishReasonEnumMap[instance.reason], }; const _$RtmpStreamPublishStateEnumMap = { @@ -2261,24 +2355,24 @@ const _$RtmpStreamPublishStateEnumMap = { RtmpStreamPublishState.rtmpStreamPublishStateDisconnecting: 5, }; -const _$RtmpStreamPublishErrorTypeEnumMap = { - RtmpStreamPublishErrorType.rtmpStreamPublishErrorOk: 0, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidArgument: 1, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorEncryptedStreamNotAllowed: 2, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorConnectionTimeout: 3, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInternalServerError: 4, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorRtmpServerError: 5, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorTooOften: 6, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorReachLimit: 7, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotAuthorized: 8, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorStreamNotFound: 9, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorFormatNotSupported: 10, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNotBroadcaster: 11, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorTranscodingNoMixStream: 13, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorNetDown: 14, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidAppid: 15, - RtmpStreamPublishErrorType.rtmpStreamPublishErrorInvalidPrivilege: 16, - RtmpStreamPublishErrorType.rtmpStreamUnpublishErrorOk: 100, +const _$RtmpStreamPublishReasonEnumMap = { + RtmpStreamPublishReason.rtmpStreamPublishReasonOk: 0, + RtmpStreamPublishReason.rtmpStreamPublishReasonInvalidArgument: 1, + RtmpStreamPublishReason.rtmpStreamPublishReasonEncryptedStreamNotAllowed: 2, + RtmpStreamPublishReason.rtmpStreamPublishReasonConnectionTimeout: 3, + RtmpStreamPublishReason.rtmpStreamPublishReasonInternalServerError: 4, + RtmpStreamPublishReason.rtmpStreamPublishReasonRtmpServerError: 5, + RtmpStreamPublishReason.rtmpStreamPublishReasonTooOften: 6, + RtmpStreamPublishReason.rtmpStreamPublishReasonReachLimit: 7, + RtmpStreamPublishReason.rtmpStreamPublishReasonNotAuthorized: 8, + RtmpStreamPublishReason.rtmpStreamPublishReasonStreamNotFound: 9, + RtmpStreamPublishReason.rtmpStreamPublishReasonFormatNotSupported: 10, + RtmpStreamPublishReason.rtmpStreamPublishReasonNotBroadcaster: 11, + RtmpStreamPublishReason.rtmpStreamPublishReasonTranscodingNoMixStream: 13, + RtmpStreamPublishReason.rtmpStreamPublishReasonNetDown: 14, + RtmpStreamPublishReason.rtmpStreamPublishReasonInvalidAppid: 15, + RtmpStreamPublishReason.rtmpStreamPublishReasonInvalidPrivilege: 16, + RtmpStreamPublishReason.rtmpStreamUnpublishReasonOk: 100, }; RtcEngineEventHandlerOnRtmpStreamingEventJson @@ -2366,39 +2460,6 @@ const _$ChannelMediaRelayErrorEnumMap = { ChannelMediaRelayError.relayErrorDestTokenExpired: 11, }; -RtcEngineEventHandlerOnChannelMediaRelayEventJson - _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonFromJson( - Map json) => - RtcEngineEventHandlerOnChannelMediaRelayEventJson( - code: $enumDecodeNullable( - _$ChannelMediaRelayEventEnumMap, json['code']), - ); - -Map _$RtcEngineEventHandlerOnChannelMediaRelayEventJsonToJson( - RtcEngineEventHandlerOnChannelMediaRelayEventJson instance) => - { - 'code': _$ChannelMediaRelayEventEnumMap[instance.code], - }; - -const _$ChannelMediaRelayEventEnumMap = { - ChannelMediaRelayEvent.relayEventNetworkDisconnected: 0, - ChannelMediaRelayEvent.relayEventNetworkConnected: 1, - ChannelMediaRelayEvent.relayEventPacketJoinedSrcChannel: 2, - ChannelMediaRelayEvent.relayEventPacketJoinedDestChannel: 3, - ChannelMediaRelayEvent.relayEventPacketSentToDestChannel: 4, - ChannelMediaRelayEvent.relayEventPacketReceivedVideoFromSrc: 5, - ChannelMediaRelayEvent.relayEventPacketReceivedAudioFromSrc: 6, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannel: 7, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelRefused: 8, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelNotChange: 9, - ChannelMediaRelayEvent.relayEventPacketUpdateDestChannelIsNull: 10, - ChannelMediaRelayEvent.relayEventVideoProfileUpdate: 11, - ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelSuccess: 12, - ChannelMediaRelayEvent.relayEventPauseSendPacketToDestChannelFailed: 13, - ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelSuccess: 14, - ChannelMediaRelayEvent.relayEventResumeSendPacketToDestChannelFailed: 15, -}; - RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJson _$RtcEngineEventHandlerOnLocalPublishFallbackToAudioOnlyJsonFromJson( Map json) => @@ -2534,6 +2595,8 @@ const _$ConnectionChangedReasonTypeEnumMap = { ConnectionChangedReasonType.connectionChangedTooManyBroadcasters: 20, ConnectionChangedReasonType.connectionChangedLicenseValidationFailure: 21, ConnectionChangedReasonType.connectionChangedCertificationVeryfyFailure: 22, + ConnectionChangedReasonType.connectionChangedStreamChannelNotAvailable: 23, + ConnectionChangedReasonType.connectionChangedInconsistentAppid: 24, }; RtcEngineEventHandlerOnWlAccMessageJson @@ -2704,6 +2767,87 @@ Map _$RtcEngineEventHandlerOnUserInfoUpdatedJsonToJson( 'info': instance.info?.toJson(), }; +RtcEngineEventHandlerOnUserAccountUpdatedJson + _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson( + Map json) => + RtcEngineEventHandlerOnUserAccountUpdatedJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + remoteUid: json['remoteUid'] as int?, + remoteUserAccount: json['remoteUserAccount'] as String?, + ); + +Map _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson( + RtcEngineEventHandlerOnUserAccountUpdatedJson instance) => + { + 'connection': instance.connection?.toJson(), + 'remoteUid': instance.remoteUid, + 'remoteUserAccount': instance.remoteUserAccount, + }; + +RtcEngineEventHandlerOnVideoRenderingTracingResultJson + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson( + Map json) => + RtcEngineEventHandlerOnVideoRenderingTracingResultJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + uid: json['uid'] as int?, + currentEvent: $enumDecodeNullable( + _$MediaTraceEventEnumMap, json['currentEvent']), + tracingInfo: json['tracingInfo'] == null + ? null + : VideoRenderingTracingInfo.fromJson( + json['tracingInfo'] as Map), + ); + +Map + _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson( + RtcEngineEventHandlerOnVideoRenderingTracingResultJson instance) => + { + 'connection': instance.connection?.toJson(), + 'uid': instance.uid, + 'currentEvent': _$MediaTraceEventEnumMap[instance.currentEvent], + 'tracingInfo': instance.tracingInfo?.toJson(), + }; + +const _$MediaTraceEventEnumMap = { + MediaTraceEvent.mediaTraceEventVideoRendered: 0, + MediaTraceEvent.mediaTraceEventVideoDecoded: 1, +}; + +RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson( + Map json) => + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( + stream: json['stream'] == null + ? null + : TranscodingVideoStream.fromJson( + json['stream'] as Map), + error: + $enumDecodeNullable(_$VideoTranscoderErrorEnumMap, json['error']), + ); + +Map + _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson( + RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson instance) => + { + 'stream': instance.stream?.toJson(), + 'error': _$VideoTranscoderErrorEnumMap[instance.error], + }; + +const _$VideoTranscoderErrorEnumMap = { + VideoTranscoderError.vtErrVideoSourceNotReady: 1, + VideoTranscoderError.vtErrInvalidVideoSourceType: 2, + VideoTranscoderError.vtErrInvalidImagePath: 3, + VideoTranscoderError.vtErrUnsupportImageFormat: 4, + VideoTranscoderError.vtErrInvalidLayout: 5, + VideoTranscoderError.vtErrInternal: 20, +}; + RtcEngineEventHandlerOnUploadLogResultJson _$RtcEngineEventHandlerOnUploadLogResultJsonFromJson( Map json) => @@ -2841,6 +2985,35 @@ Map 'elapseSinceLastState': instance.elapseSinceLastState, }; +RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson + _$RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJsonFromJson( + Map json) => + RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson( + connection: json['connection'] == null + ? null + : RtcConnection.fromJson( + json['connection'] as Map), + uid: json['uid'] as int?, + width: json['width'] as int?, + height: json['height'] as int?, + layoutCount: json['layoutCount'] as int?, + layoutlist: (json['layoutlist'] as List?) + ?.map((e) => VideoLayout.fromJson(e as Map)) + .toList(), + ); + +Map + _$RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJsonToJson( + RtcEngineEventHandlerOnTranscodedStreamLayoutInfoJson instance) => + { + 'connection': instance.connection?.toJson(), + 'uid': instance.uid, + 'width': instance.width, + 'height': instance.height, + 'layoutCount': instance.layoutCount, + 'layoutlist': instance.layoutlist?.map((e) => e.toJson()).toList(), + }; + RtcEngineEventHandlerOnExtensionEventJson _$RtcEngineEventHandlerOnExtensionEventJsonFromJson( Map json) => @@ -2909,87 +3082,24 @@ Map _$RtcEngineEventHandlerOnExtensionErrorJsonToJson( 'message': instance.message, }; -RtcEngineEventHandlerOnUserAccountUpdatedJson - _$RtcEngineEventHandlerOnUserAccountUpdatedJsonFromJson( +RtcEngineEventHandlerOnSetRtmFlagResultJson + _$RtcEngineEventHandlerOnSetRtmFlagResultJsonFromJson( Map json) => - RtcEngineEventHandlerOnUserAccountUpdatedJson( + RtcEngineEventHandlerOnSetRtmFlagResultJson( connection: json['connection'] == null ? null : RtcConnection.fromJson( json['connection'] as Map), - remoteUid: json['remoteUid'] as int?, - userAccount: json['userAccount'] as String?, + code: json['code'] as int?, ); -Map _$RtcEngineEventHandlerOnUserAccountUpdatedJsonToJson( - RtcEngineEventHandlerOnUserAccountUpdatedJson instance) => +Map _$RtcEngineEventHandlerOnSetRtmFlagResultJsonToJson( + RtcEngineEventHandlerOnSetRtmFlagResultJson instance) => { 'connection': instance.connection?.toJson(), - 'remoteUid': instance.remoteUid, - 'userAccount': instance.userAccount, + 'code': instance.code, }; -RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonFromJson( - Map json) => - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson( - stream: json['stream'] == null - ? null - : TranscodingVideoStream.fromJson( - json['stream'] as Map), - error: - $enumDecodeNullable(_$VideoTranscoderErrorEnumMap, json['error']), - ); - -Map - _$RtcEngineEventHandlerOnLocalVideoTranscoderErrorJsonToJson( - RtcEngineEventHandlerOnLocalVideoTranscoderErrorJson instance) => - { - 'stream': instance.stream?.toJson(), - 'error': _$VideoTranscoderErrorEnumMap[instance.error], - }; - -const _$VideoTranscoderErrorEnumMap = { - VideoTranscoderError.vtErrVideoSourceNotReady: 1, - VideoTranscoderError.vtErrInvalidVideoSourceType: 2, - VideoTranscoderError.vtErrInvalidImagePath: 3, - VideoTranscoderError.vtErrUnsupportImageFormat: 4, - VideoTranscoderError.vtErrInvalidLayout: 5, - VideoTranscoderError.vtErrInternal: 20, -}; - -RtcEngineEventHandlerOnVideoRenderingTracingResultJson - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonFromJson( - Map json) => - RtcEngineEventHandlerOnVideoRenderingTracingResultJson( - connection: json['connection'] == null - ? null - : RtcConnection.fromJson( - json['connection'] as Map), - uid: json['uid'] as int?, - currentEvent: $enumDecodeNullable( - _$MediaTraceEventEnumMap, json['currentEvent']), - tracingInfo: json['tracingInfo'] == null - ? null - : VideoRenderingTracingInfo.fromJson( - json['tracingInfo'] as Map), - ); - -Map - _$RtcEngineEventHandlerOnVideoRenderingTracingResultJsonToJson( - RtcEngineEventHandlerOnVideoRenderingTracingResultJson instance) => - { - 'connection': instance.connection?.toJson(), - 'uid': instance.uid, - 'currentEvent': _$MediaTraceEventEnumMap[instance.currentEvent], - 'tracingInfo': instance.tracingInfo?.toJson(), - }; - -const _$MediaTraceEventEnumMap = { - MediaTraceEvent.mediaTraceEventVideoRendered: 0, - MediaTraceEvent.mediaTraceEventVideoDecoded: 1, -}; - MetadataObserverOnMetadataReceivedJson _$MetadataObserverOnMetadataReceivedJsonFromJson( Map json) => @@ -3011,8 +3121,8 @@ DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson DirectCdnStreamingEventHandlerOnDirectCdnStreamingStateChangedJson( state: $enumDecodeNullable( _$DirectCdnStreamingStateEnumMap, json['state']), - error: $enumDecodeNullable( - _$DirectCdnStreamingErrorEnumMap, json['error']), + reason: $enumDecodeNullable( + _$DirectCdnStreamingReasonEnumMap, json['reason']), message: json['message'] as String?, ); @@ -3022,7 +3132,7 @@ Map instance) => { 'state': _$DirectCdnStreamingStateEnumMap[instance.state], - 'error': _$DirectCdnStreamingErrorEnumMap[instance.error], + 'reason': _$DirectCdnStreamingReasonEnumMap[instance.reason], 'message': instance.message, }; @@ -3034,13 +3144,13 @@ const _$DirectCdnStreamingStateEnumMap = { DirectCdnStreamingState.directCdnStreamingStateRecovering: 4, }; -const _$DirectCdnStreamingErrorEnumMap = { - DirectCdnStreamingError.directCdnStreamingErrorOk: 0, - DirectCdnStreamingError.directCdnStreamingErrorFailed: 1, - DirectCdnStreamingError.directCdnStreamingErrorAudioPublication: 2, - DirectCdnStreamingError.directCdnStreamingErrorVideoPublication: 3, - DirectCdnStreamingError.directCdnStreamingErrorNetConnect: 4, - DirectCdnStreamingError.directCdnStreamingErrorBadName: 5, +const _$DirectCdnStreamingReasonEnumMap = { + DirectCdnStreamingReason.directCdnStreamingReasonOk: 0, + DirectCdnStreamingReason.directCdnStreamingReasonFailed: 1, + DirectCdnStreamingReason.directCdnStreamingReasonAudioPublication: 2, + DirectCdnStreamingReason.directCdnStreamingReasonVideoPublication: 3, + DirectCdnStreamingReason.directCdnStreamingReasonNetConnect: 4, + DirectCdnStreamingReason.directCdnStreamingReasonBadName: 5, }; DirectCdnStreamingEventHandlerOnDirectCdnStreamingStatsJson diff --git a/lib/src/binding/impl_forward_export.dart b/lib/src/binding/impl_forward_export.dart index c54909a5c..5ceb2ac43 100644 --- a/lib/src/binding/impl_forward_export.dart +++ b/lib/src/binding/impl_forward_export.dart @@ -1,5 +1,8 @@ export 'agora_base_event_impl.dart'; +export 'agora_media_base_impl.dart'; export 'agora_media_base_event_impl.dart'; +export 'agora_h265_transcoder_impl.dart'; +export 'agora_h265_transcoder_event_impl.dart'; export 'agora_media_engine_impl.dart'; export 'agora_media_player_impl.dart'; export 'agora_media_player_event_impl.dart'; diff --git a/lib/src/binding_forward_export.dart b/lib/src/binding_forward_export.dart index 76d233299..f2a9d41d5 100644 --- a/lib/src/binding_forward_export.dart +++ b/lib/src/binding_forward_export.dart @@ -1,6 +1,7 @@ export 'agora_base.dart'; export 'agora_media_base.dart'; export 'agora_media_player_types.dart'; +export 'agora_h265_transcoder.dart'; export 'agora_log.dart'; export 'agora_media_engine.dart'; export 'agora_media_player.dart'; @@ -18,3 +19,4 @@ export 'dart:typed_data'; export 'package:json_annotation/json_annotation.dart'; export 'package:flutter/foundation.dart'; export 'package:agora_rtc_engine/src/agora_rtc_engine_ext.dart'; +export 'package:agora_rtc_engine/src/impl/json_converters.dart'; diff --git a/lib/src/impl/agora_h265_transcoder_impl_override.dart b/lib/src/impl/agora_h265_transcoder_impl_override.dart new file mode 100644 index 000000000..9ee432cec --- /dev/null +++ b/lib/src/impl/agora_h265_transcoder_impl_override.dart @@ -0,0 +1,44 @@ +import 'dart:convert'; + +import 'package:agora_rtc_engine/src/agora_h265_transcoder.dart'; +import 'package:agora_rtc_engine/src/binding/agora_h265_transcoder_impl.dart' + as impl_binding; +import 'package:agora_rtc_engine/src/binding/agora_h265_transcoder_event_impl.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; + +class H265TranscoderImplOverride extends impl_binding.H265TranscoderImpl { + H265TranscoderImplOverride(IrisMethodChannel irisMethodChannel) + : super(irisMethodChannel); + + final _observerScopedKey = const TypedScopedKey(H265TranscoderImplOverride); + + @override + void registerTranscoderObserver(H265TranscoderObserver observer) async { + final observerWrapper = H265TranscoderObserverWrapper(observer); + final param = createParams({}); + + await irisMethodChannel.registerEventHandler( + ScopedEvent( + scopedKey: _observerScopedKey, + registerName: 'H265Transcoder_registerTranscoderObserver_e1ee996', + unregisterName: + 'H265Transcoder_unregisterTranscoderObserver_e1ee996', + handler: observerWrapper), + jsonEncode(param)); + } + + @override + void unregisterTranscoderObserver(H265TranscoderObserver observer) async { + final observerWrapper = H265TranscoderObserverWrapper(observer); + final param = createParams({}); + + await irisMethodChannel.unregisterEventHandler( + ScopedEvent( + scopedKey: _observerScopedKey, + registerName: 'H265Transcoder_registerTranscoderObserver_e1ee996', + unregisterName: + 'H265Transcoder_unregisterTranscoderObserver_e1ee996', + handler: observerWrapper), + jsonEncode(param)); + } +} diff --git a/lib/src/impl/agora_media_engine_impl_override.dart b/lib/src/impl/agora_media_engine_impl_override.dart index f46ff6a44..e995e20d2 100644 --- a/lib/src/impl/agora_media_engine_impl_override.dart +++ b/lib/src/impl/agora_media_engine_impl_override.dart @@ -30,7 +30,7 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _mediaEngineScopedKey, - registerName: 'MediaEngine_registerAudioFrameObserver', + registerName: 'MediaEngine_registerAudioFrameObserver_d873a64', unregisterName: 'MediaEngine_unregisterAudioFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -44,7 +44,7 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _mediaEngineScopedKey, - registerName: 'MediaEngine_registerVideoFrameObserver', + registerName: 'MediaEngine_registerVideoFrameObserver_2cc0ef1', unregisterName: 'MediaEngine_unregisterVideoFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -59,7 +59,8 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _mediaEngineScopedKey, - registerName: 'MediaEngine_registerVideoEncodedFrameObserver', + registerName: + 'MediaEngine_registerVideoEncodedFrameObserver_d45d579', unregisterName: 'MediaEngine_unregisterVideoEncodedFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -73,7 +74,7 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _mediaEngineScopedKey, - registerName: 'MediaEngine_registerAudioFrameObserver', + registerName: 'MediaEngine_registerAudioFrameObserver_d873a64', unregisterName: 'MediaEngine_unregisterAudioFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -87,7 +88,7 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _mediaEngineScopedKey, - registerName: 'MediaEngine_registerVideoFrameObserver', + registerName: 'MediaEngine_registerVideoFrameObserver_2cc0ef1', unregisterName: 'MediaEngine_unregisterVideoFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -101,7 +102,8 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _mediaEngineScopedKey, - registerName: 'MediaEngine_registerVideoEncodedFrameObserver', + registerName: + 'MediaEngine_registerVideoEncodedFrameObserver_d45d579', unregisterName: 'MediaEngine_unregisterVideoEncodedFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -110,7 +112,7 @@ class MediaEngineImpl extends media_engine_impl_binding.MediaEngineImpl @override Future pushVideoFrame( {required ExternalVideoFrame frame, int videoTrackId = 0}) async { - const apiType = 'MediaEngine_pushVideoFrame'; + const apiType = 'MediaEngine_pushVideoFrame_4e544e2'; final json = frame.toJson(); json['eglContext'] = 0; json['metadata_buffer'] = 0; diff --git a/lib/src/impl/agora_media_recorder_impl_override.dart b/lib/src/impl/agora_media_recorder_impl_override.dart index c64fa46b8..e0bed7d28 100644 --- a/lib/src/impl/agora_media_recorder_impl_override.dart +++ b/lib/src/impl/agora_media_recorder_impl_override.dart @@ -93,7 +93,7 @@ class MediaRecorderImpl extends media_recorder_impl_binding.MediaRecorderImpl @override Future setMediaRecorderObserver(MediaRecorderObserver callback) async { - const apiType = 'MediaRecorder_setMediaRecorderObserver'; + const apiType = 'MediaRecorder_setMediaRecorderObserver_e1f7340'; final param = createParams({}); @@ -103,7 +103,7 @@ class MediaRecorderImpl extends media_recorder_impl_binding.MediaRecorderImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _mediaRecorderScopedKey, - registerName: 'MediaRecorder_setMediaRecorderObserver', + registerName: 'MediaRecorder_setMediaRecorderObserver_e1f7340', unregisterName: 'MediaRecorder_unsetMediaRecorderObserver', handler: _mediaRecorderObserver!), jsonEncode(param)); @@ -119,7 +119,7 @@ class MediaRecorderImpl extends media_recorder_impl_binding.MediaRecorderImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _mediaRecorderScopedKey, - registerName: 'MediaRecorder_setMediaRecorderObserver', + registerName: 'MediaRecorder_setMediaRecorderObserver_e1f7340', unregisterName: 'MediaRecorder_unsetMediaRecorderObserver', handler: _mediaRecorderObserver!), jsonEncode(param)); diff --git a/lib/src/impl/agora_music_content_center_impl_override.dart b/lib/src/impl/agora_music_content_center_impl_override.dart index 3709db763..40afa61e3 100644 --- a/lib/src/impl/agora_music_content_center_impl_override.dart +++ b/lib/src/impl/agora_music_content_center_impl_override.dart @@ -60,7 +60,7 @@ class MusicContentCenterEventHandlerWrapper bool handleEventInternal( String eventName, String eventData, List buffers) { switch (eventName) { - case 'onMusicCollectionResult': + case 'onMusicCollectionResult_c30c2e6': if (musicContentCenterEventHandler.onMusicCollectionResult == null) { return true; } @@ -70,8 +70,8 @@ class MusicContentCenterEventHandlerWrapper jsonMap); paramJson = paramJson.fillBuffers(buffers); String? requestId = paramJson.requestId; - MusicContentCenterStatusCode? errorCode = paramJson.errorCode; - if (requestId == null || errorCode == null) { + MusicContentCenterStateReason? reason = paramJson.reason; + if (requestId == null || reason == null) { return true; } @@ -80,7 +80,7 @@ class MusicContentCenterEventHandlerWrapper final musicCollectionImpl = MusicCollectionImpl(musicCollectionJson); musicContentCenterEventHandler.onMusicCollectionResult!( - requestId, musicCollectionImpl, errorCode); + requestId, musicCollectionImpl, reason); return true; } @@ -96,7 +96,8 @@ class MusicPlayerImpl extends media_player_impl.MediaPlayerImpl @override Future openWithSongCode( {required int songCode, int startPos = 0}) async { - final apiType = '${isOverrideClassName ? className : 'MusicPlayer'}_open'; + final apiType = + '${isOverrideClassName ? className : 'MusicPlayer'}_open_303b92e'; final param = createParams({'songCode': songCode, 'startPos': startPos}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -163,7 +164,7 @@ class MusicContentCenterImpl extends binding.MusicContentCenterImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _musicContentCenterScopeKey, - registerName: 'MusicContentCenter_registerEventHandler', + registerName: 'MusicContentCenter_registerEventHandler_ae49451', unregisterName: 'MusicContentCenter_unregisterEventHandler', handler: eventHandlerWrapper), jsonEncode({})); @@ -179,7 +180,7 @@ class MusicContentCenterImpl extends binding.MusicContentCenterImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _musicContentCenterScopeKey, - registerName: 'MusicContentCenter_registerEventHandler', + registerName: 'MusicContentCenter_registerEventHandler_ae49451', unregisterName: 'MusicContentCenter_unregisterEventHandler', handler: eventHandlerWrapper), jsonEncode({})); @@ -215,7 +216,7 @@ class MusicContentCenterImpl extends binding.MusicContentCenterImpl @override Future isPreloaded(int songCode) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_isPreloaded'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_isPreloaded_f631116'; final param = createParams({'songCode': songCode}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -230,7 +231,7 @@ class MusicContentCenterImpl extends binding.MusicContentCenterImpl @override Future preload(int songCode) async { final apiType = - '${isOverrideClassName ? className : 'MusicContentCenter'}_preload2'; + '${isOverrideClassName ? className : 'MusicContentCenter'}_preload_d3baeab'; final param = createParams({'songCode': songCode}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); diff --git a/lib/src/impl/agora_rtc_engine_impl.dart b/lib/src/impl/agora_rtc_engine_impl.dart index d22e0ac15..f34c80d95 100644 --- a/lib/src/impl/agora_rtc_engine_impl.dart +++ b/lib/src/impl/agora_rtc_engine_impl.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'dart:typed_data'; import 'package:agora_rtc_engine/src/agora_base.dart'; +import 'package:agora_rtc_engine/src/agora_h265_transcoder.dart'; import 'package:agora_rtc_engine/src/agora_media_base.dart'; import 'package:agora_rtc_engine/src/agora_media_engine.dart'; import 'package:agora_rtc_engine/src/agora_media_player.dart'; @@ -24,6 +25,7 @@ import 'package:agora_rtc_engine/src/binding/agora_rtc_engine_impl.dart' import 'package:agora_rtc_engine/src/binding/agora_spatial_audio_impl.dart'; import 'package:agora_rtc_engine/src/binding/call_api_event_handler_buffer_ext.dart'; import 'package:agora_rtc_engine/src/binding/event_handler_param_json.dart'; +import 'package:agora_rtc_engine/src/impl/agora_h265_transcoder_impl_override.dart'; import 'package:agora_rtc_engine/src/impl/agora_media_engine_impl_override.dart' as media_engine_impl; import 'package:agora_rtc_engine/src/impl/agora_media_recorder_impl_override.dart' @@ -36,6 +38,7 @@ import 'package:agora_rtc_engine/src/impl/audio_device_manager_impl.dart' as audio_device_manager_impl; import 'package:agora_rtc_engine/src/impl/media_player_impl.dart' as media_player_impl; + import 'package:agora_rtc_engine/src/impl/platform/platform_bindings_provider.dart'; import 'package:flutter/foundation.dart' show ChangeNotifier, debugPrint, defaultTargetPlatform, kIsWeb; @@ -150,7 +153,7 @@ extension RtcEngineExt on RtcEngine { Future _setupRemoteVideoExWeb( Object viewHandle, VideoCanvas canvas, RtcConnection connection) async { - const apiType = 'RtcEngineEx_setupRemoteVideoEx'; + const apiType = 'RtcEngineEx_setupRemoteVideoEx_522a409'; final param = _createParamsWeb(viewHandle, canvas, connection: connection); final List buffers = []; buffers.addAll(canvas.collectBufferList()); @@ -169,7 +172,7 @@ extension RtcEngineExt on RtcEngine { Future _setupRemoteVideoWeb( Object viewHandle, VideoCanvas canvas) async { - const apiType = 'RtcEngine_setupRemoteVideo'; + const apiType = 'RtcEngine_setupRemoteVideo_acc9c38'; final param = _createParamsWeb(viewHandle, canvas); final List buffers = []; buffers.addAll(canvas.collectBufferList()); @@ -187,7 +190,7 @@ extension RtcEngineExt on RtcEngine { Future _setupLocalVideoWeb( VideoCanvas canvas, Object viewHandle) async { - const apiType = 'RtcEngine_setupLocalVideo'; + const apiType = 'RtcEngine_setupLocalVideo_acc9c38'; // The type of the `VideoCanvas.view` is `String` on web final param = _createParamsWeb(viewHandle, canvas); final List buffers = []; @@ -218,7 +221,7 @@ extension ThumbImageBufferExt on ThumbImageBuffer { extension RtcEngineEventHandlerExExt on RtcEngineEventHandler { bool eventIntercept(String event, String eventData, List buffers) { switch (event) { - case 'RtcEngineEventHandler_onStreamMessageEx': + case 'RtcEngineEventHandler_onStreamMessage_99898cb': if (onStreamMessage == null) break; final jsonMap = jsonDecode(eventData); RtcEngineEventHandlerOnStreamMessageJson paramJson = @@ -264,7 +267,7 @@ extension MetadataObserverExt on MetadataObserver { bool eventIntercept(String event, String data, List buffers) { final jsonMap = jsonDecode(data); switch (event) { - case 'MetadataObserver_onMetadataReceived': + case 'MetadataObserver_onMetadataReceived_cb7661d': if (onMetadataReceived == null) break; MetadataObserverOnMetadataReceivedJson paramJson = MetadataObserverOnMetadataReceivedJson.fromJson(jsonMap); @@ -305,13 +308,29 @@ class InitializationState extends ChangeNotifier { } } +class SharedNativeHandleInitilizationArgProvider + implements InitilizationArgProvider { + const SharedNativeHandleInitilizationArgProvider(this.sharedNativeHandle); + + final Object sharedNativeHandle; + @override + IrisHandle provide(IrisApiEngineHandle apiEngineHandle) { + return ObjectIrisHandle(sharedNativeHandle); + } +} + class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl implements RtcEngineEx { - RtcEngineImpl._(IrisMethodChannel irisMethodChannel) - : super(irisMethodChannel); + RtcEngineImpl._({ + required IrisMethodChannel irisMethodChannel, + Object? sharedNativeHandle, + }) : _sharedNativeHandle = sharedNativeHandle, + super(irisMethodChannel); static RtcEngineImpl? _instance; + Object? _sharedNativeHandle; + InitializationState? _rtcEngineStateInternal; InitializationState get _rtcEngineState { _rtcEngineStateInternal ??= InitializationState(); @@ -342,15 +361,30 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @internal late MethodChannel engineMethodChannel; - static RtcEngineEx create({IrisMethodChannel? irisMethodChannel}) { - if (_instance != null) return _instance!; + static RtcEngineEx create({ + Object? sharedNativeHandle, + IrisMethodChannel? irisMethodChannel, + }) { + if (_instance != null) { + _instance!._updateSharedNativeHandle(sharedNativeHandle); + return _instance!; + } - _instance = RtcEngineImpl._(irisMethodChannel ?? - IrisMethodChannel(createPlatformBindingsProvider())); + _instance = RtcEngineImpl._( + irisMethodChannel: irisMethodChannel ?? + IrisMethodChannel(createPlatformBindingsProvider()), + sharedNativeHandle: sharedNativeHandle, + ); return _instance!; } + void _updateSharedNativeHandle(Object? sharedNativeHandle) { + if (_sharedNativeHandle != sharedNativeHandle) { + _sharedNativeHandle = sharedNativeHandle; + } + } + IrisMethodChannel _getIrisMethodChannel() { return irisMethodChannel; } @@ -377,7 +411,10 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await engineMethodChannel.invokeMethod('androidInit'); } - List args = []; + List args = [ + if (_sharedNativeHandle != null) + SharedNativeHandleInitilizationArgProvider(_sharedNativeHandle!) + ]; assert(() { if (_mockRtcEngineProvider != null) { args.add(_mockRtcEngineProvider!); @@ -443,6 +480,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl _isReleased = true; _releasingCompleter?.complete(null); _releasingCompleter = null; + _instance = null; } @override @@ -454,8 +492,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerEventHandler', - unregisterName: 'RtcEngine_unregisterEventHandler', + registerName: 'RtcEngine_registerEventHandler_5fc0465', + unregisterName: 'RtcEngine_unregisterEventHandler_5fc0465', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -469,8 +507,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerEventHandler', - unregisterName: 'RtcEngine_unregisterEventHandler', + registerName: 'RtcEngine_registerEventHandler_5fc0465', + unregisterName: 'RtcEngine_unregisterEventHandler_5fc0465', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -495,7 +533,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future destroyMediaPlayer(covariant MediaPlayer mediaPlayer) async { - const apiType = 'RtcEngine_destroyMediaPlayer'; + const apiType = 'RtcEngine_destroyMediaPlayer_328a49b'; final playerId = mediaPlayer.getMediaPlayerId(); final param = createParams({'playerId': playerId}); final callApiResult = await irisMethodChannel @@ -513,7 +551,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future enableEncryption( {required bool enabled, required EncryptionConfig config}) async { - const apiType = 'RtcEngine_enableEncryption'; + const apiType = 'RtcEngine_enableEncryption_421c27b'; final configJsonMap = config.toJson(); if (config.encryptionKdfSalt != null) { configJsonMap['encryptionKdfSalt'] = config.encryptionKdfSalt!; @@ -538,7 +576,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl {required RtcConnection connection, required bool enabled, required EncryptionConfig config}) async { - const apiType = 'RtcEngineEx_enableEncryptionEx'; + const apiType = 'RtcEngineEx_enableEncryptionEx_10cd872'; final configJsonMap = config.toJson(); if (config.encryptionKdfSalt != null) { configJsonMap['encryptionKdfSalt'] = config.encryptionKdfSalt!; @@ -567,7 +605,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl {required SIZE thumbSize, required SIZE iconSize, required bool includeScreen}) async { - const apiType = 'RtcEngine_getScreenCaptureSources'; + const apiType = 'RtcEngine_getScreenCaptureSources_f3e02cb'; final param = createParams({ 'thumbSize': thumbSize.toJson(), 'iconSize': iconSize.toJson(), @@ -619,8 +657,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerMediaMetadataObserver', - unregisterName: 'RtcEngine_unregisterMediaMetadataObserver', + registerName: 'RtcEngine_registerMediaMetadataObserver_8701fec', + unregisterName: 'RtcEngine_unregisterMediaMetadataObserver_8701fec', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -634,8 +672,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerMediaMetadataObserver', - unregisterName: 'RtcEngine_unregisterMediaMetadataObserver', + registerName: 'RtcEngine_registerMediaMetadataObserver_8701fec', + unregisterName: 'RtcEngine_unregisterMediaMetadataObserver_8701fec', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -653,7 +691,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_startDirectCdnStreaming', + registerName: 'RtcEngine_startDirectCdnStreaming_ed8d77b', unregisterName: 'RtcEngine_stopDirectCdnStreaming', handler: _directCdnStreamingEventHandlerWrapper!), jsonEncode(param)); @@ -669,7 +707,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_startDirectCdnStreaming', + registerName: 'RtcEngine_startDirectCdnStreaming_ed8d77b', unregisterName: 'RtcEngine_stopDirectCdnStreaming', handler: _directCdnStreamingEventHandlerWrapper!), jsonEncode(param)); @@ -708,9 +746,14 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl return mcci.MusicContentCenterImpl.create(this); } + @override + H265Transcoder getH265Transcoder() { + return H265TranscoderImplOverride(irisMethodChannel); + } + @override Future getVersion() async { - const apiType = 'RtcEngine_getVersion'; + const apiType = 'RtcEngine_getVersion_915cb25'; final param = createParams({}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -728,7 +771,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl required String channelId, required int uid, required ChannelMediaOptions options}) async { - const apiType = 'RtcEngine_joinChannel2'; + const apiType = 'RtcEngine_joinChannel_cdbb747'; final param = createParams({ 'token': token, 'channelId': channelId, @@ -749,8 +792,9 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future leaveChannel({LeaveChannelOptions? options}) async { - final apiType = - options == null ? 'RtcEngine_leaveChannel' : 'RtcEngine_leaveChannel2'; + final apiType = options == null + ? 'RtcEngine_leaveChannel' + : 'RtcEngine_leaveChannel_2c0e3aa'; final param = createParams({'options': options?.toJson()}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -768,8 +812,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl Future setClientRole( {required ClientRoleType role, ClientRoleOptions? options}) async { final apiType = options == null - ? 'RtcEngine_setClientRole' - : 'RtcEngine_setClientRole2'; + ? 'RtcEngine_setClientRole_3426fa6' + : 'RtcEngine_setClientRole_b46cc48'; final param = createParams({'role': role.value(), 'options': options?.toJson()}); final callApiResult = await irisMethodChannel @@ -786,7 +830,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future startEchoTest(EchoTestConfiguration config) async { - const apiType = 'RtcEngine_startEchoTest3'; + const apiType = 'RtcEngine_startEchoTest_16140d7'; final param = createParams({'config': config.toJson()}); final List buffers = []; buffers.addAll(config.collectBufferList()); @@ -802,7 +846,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl {VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary}) async { if (_instance == null) return; - const apiType = 'RtcEngine_startPreview2'; + const apiType = 'RtcEngine_startPreview_4fd718e'; final param = createParams({'sourceType': sourceType.value()}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -816,6 +860,23 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl } } + @override + Future startPreviewWithoutSourceType() async { + final apiType = + '${isOverrideClassName ? className : 'RtcEngine'}_startPreview'; + final param = createParams({}); + final callApiResult = await irisMethodChannel.invokeMethod( + IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + if (callApiResult.irisReturnCode < 0) { + throw AgoraRtcException(code: callApiResult.irisReturnCode); + } + final rm = callApiResult.data; + final result = rm['result']; + if (result < 0) { + throw AgoraRtcException(code: result); + } + } + @override Future enableVideo() async { if (_instance == null) return; @@ -826,7 +887,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl Future stopPreview( {VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary}) async { - const apiType = 'RtcEngine_stopPreview2'; + const apiType = 'RtcEngine_stopPreview_4fd718e'; final param = createParams({'sourceType': sourceType.value()}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -842,7 +903,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future startAudioRecording(AudioRecordingConfiguration config) async { - const apiType = 'RtcEngine_startAudioRecording3'; + const apiType = 'RtcEngine_startAudioRecording_e32bb3b'; final param = createParams({'config': config.toJson()}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -862,7 +923,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl required bool loopback, required int cycle, int startPos = 0}) async { - const apiType = 'RtcEngine_startAudioMixing2'; + const apiType = 'RtcEngine_startAudioMixing_1ee1b1e'; final param = createParams({ 'filePath': filePath, 'loopback': loopback, @@ -887,8 +948,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl VideoSourceType sourceType = VideoSourceType.videoSourceCameraPrimary, SimulcastStreamConfig? streamConfig}) async { final apiType = streamConfig == null - ? 'RtcEngine_enableDualStreamMode' - : 'RtcEngine_enableDualStreamMode2'; + ? 'RtcEngine_enableDualStreamMode_5039d15' + : 'RtcEngine_enableDualStreamMode_9822d8a'; final param = createParams({ 'enabled': enabled, 'sourceType': sourceType.value(), @@ -908,7 +969,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future createDataStream(DataStreamConfig config) async { - const apiType = 'RtcEngine_createDataStream2'; + const apiType = 'RtcEngine_createDataStream_5862815'; final param = createParams({'config': config.toJson()}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -927,7 +988,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future addVideoWatermark( {required String watermarkUrl, required WatermarkOptions options}) async { - const apiType = 'RtcEngine_addVideoWatermark2'; + const apiType = 'RtcEngine_addVideoWatermark_7480410'; final param = createParams( {'watermarkUrl': watermarkUrl, 'options': options.toJson()}); final callApiResult = await irisMethodChannel @@ -949,8 +1010,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl required String userAccount, ChannelMediaOptions? options}) async { final apiType = options == null - ? 'RtcEngine_joinChannelWithUserAccount' - : 'RtcEngine_joinChannelWithUserAccount2'; + ? 'RtcEngine_joinChannelWithUserAccount_0e4f59e' + : 'RtcEngine_joinChannelWithUserAccount_4685af9'; final param = createParams({ 'token': token, 'channelId': channelId, @@ -979,7 +1040,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerAudioEncodedFrameObserver', + registerName: 'RtcEngine_registerAudioEncodedFrameObserver_ed4a177', unregisterName: 'RtcEngine_unregisterAudioEncodedFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -994,7 +1055,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerAudioEncodedFrameObserver', + registerName: 'RtcEngine_registerAudioEncodedFrameObserver_ed4a177', unregisterName: 'RtcEngine_unregisterAudioEncodedFrameObserver', handler: eventHandlerWrapper), jsonEncode(param)); @@ -1008,8 +1069,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerAudioSpectrumObserver', - unregisterName: 'RtcEngine_unregisterAudioSpectrumObserver', + registerName: 'RtcEngine_registerAudioSpectrumObserver_0406ea7', + unregisterName: 'RtcEngine_unregisterAudioSpectrumObserver_0406ea7', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -1022,8 +1083,8 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _rtcEngineImplScopedKey, - registerName: 'RtcEngine_registerAudioSpectrumObserver', - unregisterName: 'RtcEngine_unregisterAudioSpectrumObserver', + registerName: 'RtcEngine_registerAudioSpectrumObserver_0406ea7', + unregisterName: 'RtcEngine_unregisterAudioSpectrumObserver_0406ea7', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -1069,7 +1130,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future createMediaRecorder(RecorderStreamInfo info) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_createMediaRecorder'; + '${isOverrideClassName ? className : 'RtcEngine'}_createMediaRecorder_f779617'; final param = createParams({'info': info.toJson()}); final List buffers = []; buffers.addAll(info.collectBufferList()); @@ -1091,7 +1152,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl await impl.dispose(); final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_destroyMediaRecorder'; + '${isOverrideClassName ? className : 'RtcEngine'}_destroyMediaRecorder_95cdef5'; final param = createParams({'nativeHandle': impl.strNativeHandle}); await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1102,7 +1163,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl {required VideoSourceType sourceType, required ScreenCaptureConfiguration config}) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCapture2'; + '${isOverrideClassName ? className : 'RtcEngine'}_startScreenCapture_9ebb320'; final param = createParams( {'sourceType': sourceType.value(), 'config': config.toJson()}); final List buffers = []; @@ -1122,7 +1183,7 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl @override Future stopScreenCaptureBySourceType(VideoSourceType sourceType) async { final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_stopScreenCapture2'; + '${isOverrideClassName ? className : 'RtcEngine'}_stopScreenCapture_4fd718e'; final param = createParams({'sourceType': sourceType.value()}); final callApiResult = await irisMethodChannel.invokeMethod( IrisMethodCall(apiType, jsonEncode(param), buffers: null)); @@ -1136,21 +1197,21 @@ class RtcEngineImpl extends rtc_engine_ex_binding.RtcEngineExImpl } } - @override - Future preloadChannelWithUserAccount( - {required String token, - required String channelId, - required String userAccount}) async { - final apiType = - '${isOverrideClassName ? className : 'RtcEngine'}_preloadChannel2'; - final param = createParams( - {'token': token, 'channelId': channelId, 'userAccount': userAccount}); - final callApiResult = await irisMethodChannel.invokeMethod( - IrisMethodCall(apiType, jsonEncode(param), buffers: null)); - if (callApiResult.irisReturnCode < 0) { - throw AgoraRtcException(code: callApiResult.irisReturnCode); - } - } + // @override + // Future preloadChannelWithUserAccount( + // {required String token, + // required String channelId, + // required String userAccount}) async { + // final apiType = + // '${isOverrideClassName ? className : 'RtcEngine'}_preloadChannel2'; + // final param = createParams( + // {'token': token, 'channelId': channelId, 'userAccount': userAccount}); + // final callApiResult = await irisMethodChannel.invokeMethod( + // IrisMethodCall(apiType, jsonEncode(param), buffers: null)); + // if (callApiResult.irisReturnCode < 0) { + // throw AgoraRtcException(code: callApiResult.irisReturnCode); + // } + // } Future getAssetAbsolutePath(String assetPath) async { if (kIsWeb) { diff --git a/lib/src/impl/agora_spatial_audio_impl_override.dart b/lib/src/impl/agora_spatial_audio_impl_override.dart index 4fd8662ba..45f435df0 100644 --- a/lib/src/impl/agora_spatial_audio_impl_override.dart +++ b/lib/src/impl/agora_spatial_audio_impl_override.dart @@ -24,7 +24,7 @@ class LocalSpatialAudioEngineImpl extends spatial_audio_binding @override Future initialize() async { final apiType = - '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_initialize'; + '${isOverrideClassName ? className : 'LocalSpatialAudioEngine'}_initialize_cf94fbf'; final param = createParams({}); final List buffers = []; final callApiResult = await irisMethodChannel.invokeMethod( diff --git a/lib/src/impl/audio_device_manager_impl.dart b/lib/src/impl/audio_device_manager_impl.dart index 4db4eae64..514ff307a 100644 --- a/lib/src/impl/audio_device_manager_impl.dart +++ b/lib/src/impl/audio_device_manager_impl.dart @@ -75,7 +75,7 @@ class AudioDeviceManagerImpl @override Future getPlaybackDeviceInfo() async { - const apiType = 'AudioDeviceManager_getPlaybackDeviceInfo'; + const apiType = 'AudioDeviceManager_getPlaybackDeviceInfo_5540658'; final param = createParams({}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -89,7 +89,7 @@ class AudioDeviceManagerImpl @override Future getRecordingDeviceInfo() async { - const apiType = 'AudioDeviceManager_getRecordingDeviceInfo'; + const apiType = 'AudioDeviceManager_getRecordingDeviceInfo_5540658'; final param = createParams({}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); diff --git a/lib/src/impl/json_converters.dart b/lib/src/impl/json_converters.dart new file mode 100644 index 000000000..d4322c743 --- /dev/null +++ b/lib/src/impl/json_converters.dart @@ -0,0 +1,53 @@ +import 'package:agora_rtc_engine/src/agora_media_base.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'json_converters.g.dart'; + +class VideoFrameMetaInfoConverter + implements JsonConverter { + const VideoFrameMetaInfoConverter(); + + @override + VideoFrameMetaInfo? fromJson(Object? json) { + if (json is Map) { + final obj = _VideoFrameMetaInfoInternalJson.fromJson(json); + return _VideoFrameMetaInfoInternal(obj); + } + + return null; + } + + @override + Object? toJson(VideoFrameMetaInfo? object) => null; +} + +class _VideoFrameMetaInfoInternal implements VideoFrameMetaInfo { + const _VideoFrameMetaInfoInternal(this.json); + + final _VideoFrameMetaInfoInternalJson json; + + @override + Future getMetaInfoStr(MetaInfoKey key) async { + if (key == MetaInfoKey.keyFaceCapture) { + return json.KEY_FACE_CAPTURE ?? ''; + } + return ''; + } +} + +@JsonSerializable(explicitToJson: true, includeIfNull: false) +class _VideoFrameMetaInfoInternalJson { + // ignore: non_constant_identifier_names + const _VideoFrameMetaInfoInternalJson({this.KEY_FACE_CAPTURE}); + @JsonKey(name: 'KEY_FACE_CAPTURE') + // Directly match the native sdk naming. + // ignore: non_constant_identifier_names + final String? KEY_FACE_CAPTURE; + + /// @nodoc + factory _VideoFrameMetaInfoInternalJson.fromJson(Map json) => + _$VideoFrameMetaInfoInternalJsonFromJson(json); + + /// @nodoc + Map toJson() => _$VideoFrameMetaInfoInternalJsonToJson(this); +} diff --git a/lib/src/impl/json_converters.g.dart b/lib/src/impl/json_converters.g.dart new file mode 100644 index 000000000..78140378b --- /dev/null +++ b/lib/src/impl/json_converters.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ignore_for_file: non_constant_identifier_names, deprecated_member_use_from_same_package, unused_element + +part of 'json_converters.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_VideoFrameMetaInfoInternalJson _$VideoFrameMetaInfoInternalJsonFromJson( + Map json) => + _VideoFrameMetaInfoInternalJson( + KEY_FACE_CAPTURE: json['KEY_FACE_CAPTURE'] as String?, + ); + +Map _$VideoFrameMetaInfoInternalJsonToJson( + _VideoFrameMetaInfoInternalJson instance) { + final val = {}; + + void writeNotNull(String key, dynamic value) { + if (value != null) { + val[key] = value; + } + } + + writeNotNull('KEY_FACE_CAPTURE', instance.KEY_FACE_CAPTURE); + return val; +} diff --git a/lib/src/impl/media_player_controller_impl.dart b/lib/src/impl/media_player_controller_impl.dart index 643af48c3..648416df9 100644 --- a/lib/src/impl/media_player_controller_impl.dart +++ b/lib/src/impl/media_player_controller_impl.dart @@ -376,4 +376,12 @@ class MediaPlayerControllerImpl await super.disposeRenderInternal(); } } + + @override + Future selectMultiAudioTrack( + {required int playoutTrackIndex, required int publishTrackIndex}) { + return _mediaPlayer!.selectMultiAudioTrack( + playoutTrackIndex: playoutTrackIndex, + publishTrackIndex: publishTrackIndex); + } } diff --git a/lib/src/impl/media_player_impl.dart b/lib/src/impl/media_player_impl.dart index fec4ecc55..10bd2fd1b 100644 --- a/lib/src/impl/media_player_impl.dart +++ b/lib/src/impl/media_player_impl.dart @@ -162,8 +162,9 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _mediaPlayerScopedKey, - registerName: 'MediaPlayer_registerPlayerSourceObserver', - unregisterName: 'MediaPlayer_unregisterPlayerSourceObserver', + registerName: 'MediaPlayer_registerPlayerSourceObserver_15621d7', + unregisterName: + 'MediaPlayer_unregisterPlayerSourceObserver_15621d7', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -178,8 +179,9 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _mediaPlayerScopedKey, - registerName: 'MediaPlayer_registerPlayerSourceObserver', - unregisterName: 'MediaPlayer_unregisterPlayerSourceObserver', + registerName: 'MediaPlayer_registerPlayerSourceObserver_15621d7', + unregisterName: + 'MediaPlayer_unregisterPlayerSourceObserver_15621d7', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -191,7 +193,7 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl @override Future setPlayerOptionInInt( {required String key, required int value}) async { - const apiType = 'MediaPlayer_setPlayerOption'; + const apiType = 'MediaPlayer_setPlayerOption_4d05d29'; final param = createParams({'key': key, 'value': value}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -208,7 +210,7 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl @override Future setPlayerOptionInString( {required String key, required String value}) async { - const apiType = 'MediaPlayer_setPlayerOption2'; + const apiType = 'MediaPlayer_setPlayerOption_ccad422'; final param = createParams({'key': key, 'value': value}); final callApiResult = await irisMethodChannel .invokeMethod(IrisMethodCall(apiType, jsonEncode(param))); @@ -229,13 +231,13 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl RawAudioFrameOpModeType.rawAudioFrameOpModeReadOnly}) async { final eventHandlerWrapper = AudioPcmFrameSinkWrapper(getMediaPlayerId(), observer); - final param = createParams({}); + final param = createParams({'mode': mode.value()}); await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _mediaPlayerScopedKey, - registerName: 'MediaPlayer_registerAudioFrameObserver', - unregisterName: 'MediaPlayer_unregisterAudioFrameObserver', + registerName: 'MediaPlayer_registerAudioFrameObserver_a5b510b', + unregisterName: 'MediaPlayer_unregisterAudioFrameObserver_89ab9b5', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -249,8 +251,8 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _mediaPlayerScopedKey, - registerName: 'MediaPlayer_registerAudioFrameObserver', - unregisterName: 'MediaPlayer_unregisterAudioFrameObserver', + registerName: 'MediaPlayer_registerAudioFrameObserver_a5b510b', + unregisterName: 'MediaPlayer_unregisterAudioFrameObserver_89ab9b5', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -265,8 +267,8 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl await irisMethodChannel.registerEventHandler( ScopedEvent( scopedKey: _mediaPlayerScopedKey, - registerName: 'MediaPlayer_registerVideoFrameObserver', - unregisterName: 'MediaPlayer_unregisterVideoFrameObserver', + registerName: 'MediaPlayer_registerVideoFrameObserver_833bd8d', + unregisterName: 'MediaPlayer_unregisterVideoFrameObserver_5165d4c', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -281,8 +283,8 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl await irisMethodChannel.unregisterEventHandler( ScopedEvent( scopedKey: _mediaPlayerScopedKey, - registerName: 'MediaPlayer_registerVideoFrameObserver', - unregisterName: 'MediaPlayer_unregisterVideoFrameObserver', + registerName: 'MediaPlayer_registerVideoFrameObserver_833bd8d', + unregisterName: 'MediaPlayer_unregisterVideoFrameObserver_5165d4c', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -299,9 +301,9 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl ScopedEvent( scopedKey: _mediaPlayerScopedKey, registerName: - 'MediaPlayer_registerMediaPlayerAudioSpectrumObserver', + 'MediaPlayer_registerMediaPlayerAudioSpectrumObserver_226bb48', unregisterName: - 'MediaPlayer_unregisterMediaPlayerAudioSpectrumObserver', + 'MediaPlayer_unregisterMediaPlayerAudioSpectrumObserver_09064ce', handler: eventHandlerWrapper), jsonEncode(param)); } @@ -317,9 +319,9 @@ class MediaPlayerImpl extends agora_media_player_impl_binding.MediaPlayerImpl ScopedEvent( scopedKey: _mediaPlayerScopedKey, registerName: - 'MediaPlayer_registerMediaPlayerAudioSpectrumObserver', + 'MediaPlayer_registerMediaPlayerAudioSpectrumObserver_226bb48', unregisterName: - 'MediaPlayer_unregisterMediaPlayerAudioSpectrumObserver', + 'MediaPlayer_unregisterMediaPlayerAudioSpectrumObserver_09064ce', handler: eventHandlerWrapper), jsonEncode(param)); } diff --git a/lib/src/impl/platform/io/native_iris_api_engine_binding_delegate.dart b/lib/src/impl/platform/io/native_iris_api_engine_binding_delegate.dart index 700ed02af..3cb5bd5f4 100644 --- a/lib/src/impl/platform/io/native_iris_api_engine_binding_delegate.dart +++ b/lib/src/impl/platform/io/native_iris_api_engine_binding_delegate.dart @@ -41,15 +41,14 @@ class NativeIrisApiEngineBindingsDelegate @override CreateApiEngineResult createApiEngine(List args) { ffi.Pointer enginePtr = ffi.nullptr; - assert(() { - if (args.isNotEmpty) { - assert(args.length == 1); - final engineIntPtr = - args[0].provide(const IrisApiEngineHandle(0))() as int; + if (args.isNotEmpty) { + assert(args.length == 1); + final engineIntPtr = + args[0].provide(const IrisApiEngineHandle(0))() as int; + if (engineIntPtr != 0) { enginePtr = ffi.Pointer.fromAddress(engineIntPtr); } - return true; - }()); + } final apiEnginePtr = _binding.CreateIrisApiEngine(enginePtr); diff --git a/macos/agora_rtc_engine.podspec b/macos/agora_rtc_engine.podspec index fa1847170..ab9f2a8e4 100644 --- a/macos/agora_rtc_engine.podspec +++ b/macos/agora_rtc_engine.podspec @@ -21,8 +21,8 @@ A new flutter plugin project. puts '[plugin_dev] Found .plugin_dev file, use vendored_frameworks instead.' s.vendored_frameworks = 'libs/*.framework' else - s.dependency 'AgoraRtcEngine_macOS', '4.2.6' - s.dependency 'AgoraIrisRTC_macOS', '4.2.6-build.3' + s.dependency 'AgoraRtcEngine_macOS', '4.3.0' + s.dependency 'AgoraIrisRTC_macOS', '4.3.0-build.2' end s.platform = :osx, '10.11' diff --git a/pubspec.yaml b/pubspec.yaml index 591d79cde..526592516 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: agora_rtc_engine description: >- Flutter plugin of Agora RTC SDK, allow you to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code. -version: 6.2.6 +version: 6.3.0 homepage: https://www.agora.io repository: https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/tree/main environment: @@ -17,7 +17,7 @@ dependencies: ffi: '>=1.1.2' async: ^2.8.2 meta: ^1.7.0 - iris_method_channel: 2.0.0 + iris_method_channel: 2.0.1 js: '>=0.6.3' dev_dependencies: flutter_test: diff --git a/scripts/artifacts_version.sh b/scripts/artifacts_version.sh index d6b6cc892..2424fa935 100644 --- a/scripts/artifacts_version.sh +++ b/scripts/artifacts_version.sh @@ -1,6 +1,6 @@ set -e -export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_4.2.6-build.3_DCG_Android_Video_20231116_0243.zip" -export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.2.6-build.3_DCG_iOS_Video_20231116_0243.zip" -export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.2.6-build.3_DCG_Mac_Video_20231116_0243.zip" -export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.2.6-build.3_DCG_Windows_Video_20231116_0243.zip" +export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_4.3.0-build.2_DCG_Android_Video_20240219_0109.zip" +export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.3.0-build.2_DCG_iOS_Video_20240219_0110.zip" +export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.3.0-build.2_DCG_Mac_Video_20240219_0110.zip" +export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.3.0-build.2_DCG_Windows_Video_20240219_0110.zip" diff --git a/scripts/build-iris-android.sh b/scripts/build-iris-android.sh index ecfd51c48..853cad8d7 100644 --- a/scripts/build-iris-android.sh +++ b/scripts/build-iris-android.sh @@ -26,7 +26,7 @@ do cp -RP "${IRIS_OUTPUT}/$ABI/libAgoraRtcWrapper.so" \ "$AGORA_FLUTTER_PROJECT_PATH/android/libs/$ABI/libAgoraRtcWrapper.so" - if [ -f "${IRIS_PROJECT_PATH}/build/android/ALL_ARCHITECTURE/output/${IRIS_TYPE}/${BUILD_TYPE}/${ABI}/libIrisDebugger.so" ]; then + if [ -f "${IRIS_OUTPUT}/${ABI}/libIrisDebugger.so" ]; then mkdir -p ${AGORA_FLUTTER_PROJECT_PATH}/test_shard/iris_tester/android/libs/${ABI} cp -RP "${IRIS_OUTPUT}/$ABI/libIrisDebugger.so" "${AGORA_FLUTTER_PROJECT_PATH}/test_shard/iris_tester/android/libs/${ABI}/libIrisDebugger.so" fi diff --git a/scripts/build-iris-macos.sh b/scripts/build-iris-macos.sh index e1a1b16c7..1862ba570 100644 --- a/scripts/build-iris-macos.sh +++ b/scripts/build-iris-macos.sh @@ -11,10 +11,11 @@ IRIS_TYPE="dcg" SCRIPTS_PATH=$(dirname "$0") echo "Cleaning build cache..." -rm -rf $IRIS_PROJECT_PATH/build echo "Building iris for mac..." -bash $SCRIPTS_PATH/build-iris-macos-arch.sh $IRIS_PROJECT_PATH MAC $BUILD_TYPE +bash $IRIS_PROJECT_PATH/ci/build-mac.sh buildALL $BUILD_TYPE + +IRIS_OUTPUT=${IRIS_PROJECT_PATH}/build/mac/$IRIS_TYPE/MAC/output/$BUILD_TYPE if [[ -d "$AGORA_FLUTTER_PROJECT_PATH/macos/AgoraRtcWrapper.framework" ]]; then rm -rf $AGORA_FLUTTER_PROJECT_PATH/macos/AgoraRtcWrapper.framework @@ -27,13 +28,13 @@ fi mkdir -p "${AGORA_FLUTTER_PROJECT_PATH}/macos/libs" # /Users/fenglang/codes/aw/iris/build/mac/MAC/output/dcg/Debug/AgoraRtcWrapper.framework -echo "Copying $IRIS_PROJECT_PATH/build/mac/MAC/output/$IRIS_TYPE/$BUILD_TYPE/AgoraRtcWrapper.framework $AGORA_FLUTTER_PROJECT_PATH/macos/AgoraRtcWrapper.framework" -cp -RP "$IRIS_PROJECT_PATH/build/mac/MAC/output/$IRIS_TYPE/$BUILD_TYPE/AgoraRtcWrapper.framework" "$AGORA_FLUTTER_PROJECT_PATH/macos/libs" -cp -RP "$IRIS_PROJECT_PATH/build/mac/MAC/output/$IRIS_TYPE/$BUILD_TYPE/$BUILD_TYPE/IrisDebugger.framework" "$AGORA_FLUTTER_PROJECT_PATH/test_shard/iris_tester/macos/" +echo "Copying ${IRIS_OUTPUT}/AgoraRtcWrapper.framework $AGORA_FLUTTER_PROJECT_PATH/macos/AgoraRtcWrapper.framework" +cp -RP "${IRIS_OUTPUT}/AgoraRtcWrapper.framework" "$AGORA_FLUTTER_PROJECT_PATH/macos/libs" +cp -RP "${IRIS_OUTPUT}/$BUILD_TYPE/IrisDebugger.framework" "$AGORA_FLUTTER_PROJECT_PATH/test_shard/iris_tester/macos/" rm -rf $AGORA_FLUTTER_PROJECT_PATH/third_party/include mkdir -p $AGORA_FLUTTER_PROJECT_PATH/third_party/include -cp -RP $IRIS_PROJECT_PATH/build/mac/MAC/output/$IRIS_TYPE/$BUILD_TYPE/AgoraRtcWrapper.framework/Headers/* $AGORA_FLUTTER_PROJECT_PATH/third_party/include/ +cp -RP ${IRIS_OUTPUT}/AgoraRtcWrapper.framework/Headers/* $AGORA_FLUTTER_PROJECT_PATH/third_party/include/ echo "Copying Agora RTC engine frameworks" cp -RP ${IRIS_PROJECT_PATH}/third_party/agora/$IRIS_TYPE/libs/$NATIVE_SDK_PATH_NAME/libs/* "${AGORA_FLUTTER_PROJECT_PATH}/macos/libs/" \ No newline at end of file diff --git a/scripts/code_gen.sh b/scripts/code_gen.sh index 993a31074..624d6de5a 100644 --- a/scripts/code_gen.sh +++ b/scripts/code_gen.sh @@ -13,4 +13,6 @@ bash ${PROJECT_ROOT}/tool/terra/build.sh ${TERRA_PATH} bash ${MY_PATH}/flutter-build-runner.sh bash ${PROJECT_ROOT}/tool/testcase_gen/build.sh +dart format . + popd \ No newline at end of file diff --git a/scripts/iris_web_version.js b/scripts/iris_web_version.js index 0a85f8eda..a329e566d 100644 --- a/scripts/iris_web_version.js +++ b/scripts/iris_web_version.js @@ -1,8 +1,8 @@ // Share the iris web url to all the tests // This url should be same as the url inside the `example/web/index.html` -const irisWebUrl = 'https://download.agora.io/staging/iris-web-rtc_n423_w4182_0.3.0.js'; -const irisWebFakeUrl = 'https://download.agora.io/staging/iris-web-rtc-fake_n423_w4182_0.3.0.js'; +const irisWebUrl = 'https://download.agora.io/staging/iris-web-rtc_n430_w4182_0.5.0.js'; +const irisWebFakeUrl = 'https://download.agora.io/staging/iris-web-rtc-fake_n430_w4182_0.5.0.js'; (function() { var scriptLoaded = false; diff --git a/test/agora_media_base_test.dart b/test/agora_media_base_test.dart new file mode 100644 index 000000000..1028ba6dd --- /dev/null +++ b/test/agora_media_base_test.dart @@ -0,0 +1,25 @@ +import 'dart:convert'; + +import 'package:agora_rtc_engine/src/agora_media_base.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + group('VideoFrame json serialization', () { + test('can parse metaInfo', () async { + const json = ''' +{ + "metaInfo":{ + "KEY_FACE_CAPTURE":"my_meta_info_str" + } +} +'''; + + VideoFrame videoFrame = VideoFrame.fromJson(jsonDecode(json)); + expect(videoFrame.metaInfo, isNotNull); + + final info = + await videoFrame.metaInfo!.getMetaInfoStr(MetaInfoKey.keyFaceCapture); + expect(info, 'my_meta_info_str'); + }); + }); +} diff --git a/test_shard/fake_test_app/android/build.gradle b/test_shard/fake_test_app/android/build.gradle index 83ae22004..3cdaac958 100644 --- a/test_shard/fake_test_app/android/build.gradle +++ b/test_shard/fake_test_app/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/test_shard/fake_test_app/integration_test/apis_call_fake_test.dart b/test_shard/fake_test_app/integration_test/apis_call_fake_test.dart index fbf4c3eb9..5af4b2c79 100644 --- a/test_shard/fake_test_app/integration_test/apis_call_fake_test.dart +++ b/test_shard/fake_test_app/integration_test/apis_call_fake_test.dart @@ -37,26 +37,29 @@ class TestInitilizationArgProvider implements InitilizationArgProvider { void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - IrisTester irisTester = createIrisTester(); + IrisTester? irisTester; setUp(() { - irisTester.initialize(); + irisTester = createIrisTester(); + irisTester!.initialize(); if (kIsWeb) { setMockRtcEngineProvider( - TestInitilizationArgProvider(irisTester.getTesterArgs())); + TestInitilizationArgProvider(irisTester!.getTesterArgs())); } else { // On IO, the function return from the `irisTester.getTesterArgs()` capture // the `Pointer` from `IrisTester`, which is invalid to pass to the `Isolate`, // so directly pass the `ObjectIrisHandle` as value to the `setMockRtcEngineProvider` - final value = irisTester.getTesterArgs()[0](const IrisApiEngineHandle(0)); + final value = + irisTester!.getTesterArgs()[0](const IrisApiEngineHandle(0)); setMockRtcEngineProvider( TestInitilizationArgProvider.fromValue(ObjectIrisHandle(value))); } }); tearDown(() { - irisTester.dispose(); setMockRtcEngineProvider(null); + irisTester!.dispose(); + irisTester = null; }); if (!kIsWeb) { diff --git a/test_shard/fake_test_app/integration_test/eventhandlers_fake_test.dart b/test_shard/fake_test_app/integration_test/eventhandlers_fake_test.dart index 0e1cc05e2..407b705cb 100644 --- a/test_shard/fake_test_app/integration_test/eventhandlers_fake_test.dart +++ b/test_shard/fake_test_app/integration_test/eventhandlers_fake_test.dart @@ -33,52 +33,56 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - IrisTester irisTester = createIrisTester(); + IrisTester? irisTester; setUp(() { - irisTester.initialize(); + irisTester = createIrisTester(); + irisTester!.initialize(); if (kIsWeb) { setMockRtcEngineProvider( - TestInitilizationArgProvider(irisTester.getTesterArgs())); + TestInitilizationArgProvider(irisTester!.getTesterArgs())); } else { // On IO, the function return from the `irisTester.getTesterArgs()` capture // the `Pointer` from `IrisTester`, which is invalid to pass to the `Isolate`, // so directly pass the `ObjectIrisHandle` as value to the `setMockRtcEngineProvider` - final value = irisTester.getTesterArgs()[0](const IrisApiEngineHandle(0)); + final value = + irisTester!.getTesterArgs()[0](const IrisApiEngineHandle(0)); setMockRtcEngineProvider( TestInitilizationArgProvider.fromValue(ObjectIrisHandle(value))); } }); tearDown(() { - irisTester.dispose(); setMockRtcEngineProvider(null); + irisTester!.dispose(); + irisTester = null; }); // RtcEngine events - rtcengine_rtcengineeventhandler.testCases(irisTester); + rtcengine_rtcengineeventhandler.testCases(() => irisTester!); // These callbacks not are implemented on web if (!kIsWeb) { - rtcengine_audiospectrumobserver.generatedTestCases(irisTester); - rtcengine_audioencodedframeobserver.generatedTestCases(irisTester); - rtcengine_metadataobserver.generatedTestCases(irisTester); + rtcengine_audiospectrumobserver.generatedTestCases(() => irisTester!); + rtcengine_audioencodedframeobserver.generatedTestCases(() => irisTester!); + rtcengine_metadataobserver.generatedTestCases(() => irisTester!); // MediaEngine events - mediaengine_videoframeobserver.generatedTestCases(irisTester); - mediaengine_videoencodedframeobserver.generatedTestCases(irisTester); + mediaengine_videoframeobserver.generatedTestCases(() => irisTester!); + mediaengine_videoencodedframeobserver.generatedTestCases(() => irisTester!); // MediaPlayerController events - mediaplayer_audiospectrumobserver.generatedTestCases(irisTester); - mediaplayer_audiopcmframesink.generatedTestCases(irisTester); - mediaplayer_mediaplayersourceobserver.generatedTestCases(irisTester); - mediaplayer_mediaplayervideoframeobserver.generatedTestCases(irisTester); + mediaplayer_audiospectrumobserver.generatedTestCases(() => irisTester!); + mediaplayer_audiopcmframesink.generatedTestCases(() => irisTester!); + mediaplayer_mediaplayersourceobserver.generatedTestCases(() => irisTester!); + mediaplayer_mediaplayervideoframeobserver + .generatedTestCases(() => irisTester!); // MediaRecorder events - mediarecorder_mediarecorderobserver.generatedTestCases(irisTester); + mediarecorder_mediarecorderobserver.generatedTestCases(() => irisTester!); // MusicContentCenter events musiccontentcenter_musiccontentcentereventhandler - .generatedTestCases(irisTester); + .generatedTestCases(() => irisTester!); } } diff --git a/test_shard/fake_test_app/integration_test/generated/audiodevicemanager_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/audiodevicemanager_fake_test.generated.dart index 8212b9fde..5caf1ff29 100644 --- a/test_shard/fake_test_app/integration_test/generated/audiodevicemanager_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/audiodevicemanager_fake_test.generated.dart @@ -11,7 +11,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void audioDeviceManagerSmokeTestCases() { testWidgets( - 'enumeratePlaybackDevices', + 'AudioDeviceManager.enumeratePlaybackDevices', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -21,6 +21,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -28,7 +29,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.enumeratePlaybackDevices(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enumeratePlaybackDevices] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.enumeratePlaybackDevices] error: ${e.toString()}'); rethrow; } @@ -44,7 +46,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'enumerateRecordingDevices', + 'AudioDeviceManager.enumerateRecordingDevices', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -54,6 +56,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -61,7 +64,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.enumerateRecordingDevices(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enumerateRecordingDevices] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.enumerateRecordingDevices] error: ${e.toString()}'); rethrow; } @@ -77,7 +81,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'setPlaybackDevice', + 'AudioDeviceManager.setPlaybackDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -87,6 +91,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -97,7 +102,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setPlaybackDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.setPlaybackDevice] error: ${e.toString()}'); rethrow; } @@ -113,7 +119,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getPlaybackDevice', + 'AudioDeviceManager.getPlaybackDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -123,6 +129,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -130,7 +137,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getPlaybackDevice(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlaybackDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getPlaybackDevice] error: ${e.toString()}'); rethrow; } @@ -146,7 +154,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getPlaybackDeviceInfo', + 'AudioDeviceManager.getPlaybackDeviceInfo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -156,6 +164,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -163,7 +172,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getPlaybackDeviceInfo(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlaybackDeviceInfo] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getPlaybackDeviceInfo] error: ${e.toString()}'); rethrow; } @@ -179,7 +189,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'setPlaybackDeviceVolume', + 'AudioDeviceManager.setPlaybackDeviceVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -189,6 +199,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -199,7 +210,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setPlaybackDeviceVolume] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.setPlaybackDeviceVolume] error: ${e.toString()}'); rethrow; } @@ -215,7 +227,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getPlaybackDeviceVolume', + 'AudioDeviceManager.getPlaybackDeviceVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -225,6 +237,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -232,7 +245,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getPlaybackDeviceVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlaybackDeviceVolume] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getPlaybackDeviceVolume] error: ${e.toString()}'); rethrow; } @@ -248,7 +262,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'setRecordingDevice', + 'AudioDeviceManager.setRecordingDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -258,6 +272,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -268,7 +283,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRecordingDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.setRecordingDevice] error: ${e.toString()}'); rethrow; } @@ -284,7 +300,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getRecordingDevice', + 'AudioDeviceManager.getRecordingDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -294,6 +310,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -301,7 +318,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getRecordingDevice(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getRecordingDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getRecordingDevice] error: ${e.toString()}'); rethrow; } @@ -317,7 +335,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getRecordingDeviceInfo', + 'AudioDeviceManager.getRecordingDeviceInfo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -327,6 +345,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -334,7 +353,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getRecordingDeviceInfo(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getRecordingDeviceInfo] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getRecordingDeviceInfo] error: ${e.toString()}'); rethrow; } @@ -350,7 +370,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'setRecordingDeviceVolume', + 'AudioDeviceManager.setRecordingDeviceVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -360,6 +380,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -370,7 +391,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRecordingDeviceVolume] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.setRecordingDeviceVolume] error: ${e.toString()}'); rethrow; } @@ -386,7 +408,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getRecordingDeviceVolume', + 'AudioDeviceManager.getRecordingDeviceVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -396,6 +418,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -403,7 +426,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getRecordingDeviceVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getRecordingDeviceVolume] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getRecordingDeviceVolume] error: ${e.toString()}'); rethrow; } @@ -419,7 +443,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'setLoopbackDevice', + 'AudioDeviceManager.setLoopbackDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -429,6 +453,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -439,7 +464,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLoopbackDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.setLoopbackDevice] error: ${e.toString()}'); rethrow; } @@ -455,7 +481,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getLoopbackDevice', + 'AudioDeviceManager.getLoopbackDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -465,6 +491,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -472,7 +499,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getLoopbackDevice(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getLoopbackDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getLoopbackDevice] error: ${e.toString()}'); rethrow; } @@ -488,7 +516,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'setPlaybackDeviceMute', + 'AudioDeviceManager.setPlaybackDeviceMute', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -498,6 +526,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -508,7 +537,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setPlaybackDeviceMute] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.setPlaybackDeviceMute] error: ${e.toString()}'); rethrow; } @@ -524,7 +554,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getPlaybackDeviceMute', + 'AudioDeviceManager.getPlaybackDeviceMute', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -534,6 +564,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -541,7 +572,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getPlaybackDeviceMute(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlaybackDeviceMute] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getPlaybackDeviceMute] error: ${e.toString()}'); rethrow; } @@ -557,7 +589,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'setRecordingDeviceMute', + 'AudioDeviceManager.setRecordingDeviceMute', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -567,6 +599,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -577,7 +610,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRecordingDeviceMute] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.setRecordingDeviceMute] error: ${e.toString()}'); rethrow; } @@ -593,7 +627,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getRecordingDeviceMute', + 'AudioDeviceManager.getRecordingDeviceMute', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -603,6 +637,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -610,7 +645,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getRecordingDeviceMute(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getRecordingDeviceMute] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getRecordingDeviceMute] error: ${e.toString()}'); rethrow; } @@ -626,7 +662,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'startPlaybackDeviceTest', + 'AudioDeviceManager.startPlaybackDeviceTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -636,6 +672,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -646,7 +683,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startPlaybackDeviceTest] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.startPlaybackDeviceTest] error: ${e.toString()}'); rethrow; } @@ -662,7 +700,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'stopPlaybackDeviceTest', + 'AudioDeviceManager.stopPlaybackDeviceTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -672,6 +710,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -679,7 +718,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.stopPlaybackDeviceTest(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopPlaybackDeviceTest] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.stopPlaybackDeviceTest] error: ${e.toString()}'); rethrow; } @@ -695,7 +735,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'startRecordingDeviceTest', + 'AudioDeviceManager.startRecordingDeviceTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -705,6 +745,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -715,7 +756,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startRecordingDeviceTest] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.startRecordingDeviceTest] error: ${e.toString()}'); rethrow; } @@ -731,7 +773,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'stopRecordingDeviceTest', + 'AudioDeviceManager.stopRecordingDeviceTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -741,6 +783,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -748,7 +791,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.stopRecordingDeviceTest(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopRecordingDeviceTest] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.stopRecordingDeviceTest] error: ${e.toString()}'); rethrow; } @@ -764,7 +808,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'startAudioDeviceLoopbackTest', + 'AudioDeviceManager.startAudioDeviceLoopbackTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -774,6 +818,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -784,7 +829,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startAudioDeviceLoopbackTest] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.startAudioDeviceLoopbackTest] error: ${e.toString()}'); rethrow; } @@ -800,7 +846,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'stopAudioDeviceLoopbackTest', + 'AudioDeviceManager.stopAudioDeviceLoopbackTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -810,6 +856,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -817,7 +864,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.stopAudioDeviceLoopbackTest(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopAudioDeviceLoopbackTest] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.stopAudioDeviceLoopbackTest] error: ${e.toString()}'); rethrow; } @@ -833,7 +881,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'followSystemPlaybackDevice', + 'AudioDeviceManager.followSystemPlaybackDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -843,6 +891,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -853,7 +902,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[followSystemPlaybackDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.followSystemPlaybackDevice] error: ${e.toString()}'); rethrow; } @@ -869,7 +919,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'followSystemRecordingDevice', + 'AudioDeviceManager.followSystemRecordingDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -879,6 +929,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -889,7 +940,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[followSystemRecordingDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.followSystemRecordingDevice] error: ${e.toString()}'); rethrow; } @@ -905,7 +957,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'followSystemLoopbackDevice', + 'AudioDeviceManager.followSystemLoopbackDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -915,6 +967,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -925,7 +978,8 @@ void audioDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[followSystemLoopbackDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.followSystemLoopbackDevice] error: ${e.toString()}'); rethrow; } @@ -941,7 +995,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'release', + 'AudioDeviceManager.release', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -951,6 +1005,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -958,7 +1013,7 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.release(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[release] error: ${e.toString()}'); + debugPrint('[AudioDeviceManager.release] error: ${e.toString()}'); rethrow; } @@ -974,7 +1029,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getPlaybackDefaultDevice', + 'AudioDeviceManager.getPlaybackDefaultDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -984,6 +1039,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -991,7 +1047,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getPlaybackDefaultDevice(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlaybackDefaultDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getPlaybackDefaultDevice] error: ${e.toString()}'); rethrow; } @@ -1007,7 +1064,7 @@ void audioDeviceManagerSmokeTestCases() { ); testWidgets( - 'getRecordingDefaultDevice', + 'AudioDeviceManager.getRecordingDefaultDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1017,6 +1074,7 @@ void audioDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -1024,7 +1082,8 @@ void audioDeviceManagerSmokeTestCases() { await audioDeviceManager.getRecordingDefaultDevice(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getRecordingDefaultDevice] error: ${e.toString()}'); + debugPrint( + '[AudioDeviceManager.getRecordingDefaultDevice] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/basespatialaudioengine_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/basespatialaudioengine_fake_test.generated.dart deleted file mode 100644 index 946d360ce..000000000 --- a/test_shard/fake_test_app/integration_test/generated/basespatialaudioengine_fake_test.generated.dart +++ /dev/null @@ -1,430 +0,0 @@ -/// GENERATED BY testcase_gen. DO NOT MODIFY BY HAND. - -// ignore_for_file: deprecated_member_use,constant_identifier_names - -import 'package:agora_rtc_engine/agora_rtc_engine.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter/foundation.dart'; -import 'package:iris_tester/iris_tester.dart'; -import 'package:iris_method_channel/iris_method_channel.dart'; - -void localSpatialAudioEngineSmokeTestCases() { - testWidgets( - 'release', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - await localSpatialAudioEngine.release(); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[release] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'setMaxAudioRecvCount', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const int maxCount = 10; - await localSpatialAudioEngine.setMaxAudioRecvCount( - maxCount, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[setMaxAudioRecvCount] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'setAudioRecvRange', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const double range = 10.0; - await localSpatialAudioEngine.setAudioRecvRange( - range, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[setAudioRecvRange] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'setDistanceUnit', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const double unit = 10.0; - await localSpatialAudioEngine.setDistanceUnit( - unit, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[setDistanceUnit] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'updatePlayerPositionInfo', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const int playerId = 10; - const List positionInfoPosition = []; - const List positionInfoForward = []; - const RemoteVoicePositionInfo positionInfo = RemoteVoicePositionInfo( - position: positionInfoPosition, - forward: positionInfoForward, - ); - await localSpatialAudioEngine.updatePlayerPositionInfo( - playerId: playerId, - positionInfo: positionInfo, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[updatePlayerPositionInfo] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'setParameters', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const String params = "hello"; - await localSpatialAudioEngine.setParameters( - params, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[setParameters] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'muteLocalAudioStream', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const bool mute = true; - await localSpatialAudioEngine.muteLocalAudioStream( - mute, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[muteLocalAudioStream] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'muteAllRemoteAudioStreams', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const bool mute = true; - await localSpatialAudioEngine.muteAllRemoteAudioStreams( - mute, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[muteAllRemoteAudioStreams] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'setZones', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const List zones = []; - const int zoneCount = 10; - await localSpatialAudioEngine.setZones( - zones: zones, - zoneCount: zoneCount, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[setZones] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'setPlayerAttenuation', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const int playerId = 10; - const double attenuation = 10.0; - const bool forceSet = true; - await localSpatialAudioEngine.setPlayerAttenuation( - playerId: playerId, - attenuation: attenuation, - forceSet: forceSet, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[setPlayerAttenuation] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); - - testWidgets( - 'muteRemoteAudioStream', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const int uid = 10; - const bool mute = true; - await localSpatialAudioEngine.muteRemoteAudioStream( - uid: uid, - mute: mute, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[muteRemoteAudioStream] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, -// skip: !(), - ); -} diff --git a/test_shard/fake_test_app/integration_test/generated/event_ids_mapping_gen.dart b/test_shard/fake_test_app/integration_test/generated/event_ids_mapping_gen.dart new file mode 100644 index 000000000..6259355bd --- /dev/null +++ b/test_shard/fake_test_app/integration_test/generated/event_ids_mapping_gen.dart @@ -0,0 +1,519 @@ +/// Event Ids mapping of iris api id. +const eventIdsMapping = { + "PacketObserver_onSendAudioPacket": [ + "PacketObserver_onSendAudioPacket_4ad95e3" + ], + "PacketObserver_onSendVideoPacket": [ + "PacketObserver_onSendVideoPacket_4ad95e3" + ], + "PacketObserver_onReceiveAudioPacket": [ + "PacketObserver_onReceiveAudioPacket_4ad95e3" + ], + "PacketObserver_onReceiveVideoPacket": [ + "PacketObserver_onReceiveVideoPacket_4ad95e3" + ], + "AudioEncodedFrameObserver_onRecordAudioEncodedFrame": [ + "AudioEncodedFrameObserver_onRecordAudioEncodedFrame_d930ddc" + ], + "AudioEncodedFrameObserver_onPlaybackAudioEncodedFrame": [ + "AudioEncodedFrameObserver_onPlaybackAudioEncodedFrame_d930ddc" + ], + "AudioEncodedFrameObserver_onMixedAudioEncodedFrame": [ + "AudioEncodedFrameObserver_onMixedAudioEncodedFrame_d930ddc" + ], + "LicenseCallback_onCertificateRequired": [ + "LicenseCallback_onCertificateRequired" + ], + "LicenseCallback_onLicenseRequest": ["LicenseCallback_onLicenseRequest"], + "LicenseCallback_onLicenseValidated": ["LicenseCallback_onLicenseValidated"], + "LicenseCallback_onLicenseError": ["LicenseCallback_onLicenseError_46f8ab7"], + "VideoFrameObserver_onFrame": ["VideoFrameObserver_onFrame_d715140"], + "VideoFrameObserver_isExternal": [ + "VideoFrameObserver_isExternal", + "VideoFrameObserver_isExternal" + ], + "VideoFrameObserver_getVideoFormatPreference": [ + "VideoFrameObserver_getVideoFormatPreference", + "VideoFrameObserver_getVideoFormatPreference" + ], + "AudioPcmFrameSink_onFrame": ["AudioPcmFrameSink_onFrame_95f515a"], + "AudioFrameObserverBase_onRecordAudioFrame": [ + "AudioFrameObserver_onRecordAudioFrame_4c8de15" + ], + "AudioFrameObserverBase_onPlaybackAudioFrame": [ + "AudioFrameObserver_onPlaybackAudioFrame_4c8de15" + ], + "AudioFrameObserverBase_onMixedAudioFrame": [ + "AudioFrameObserver_onMixedAudioFrame_4c8de15" + ], + "AudioFrameObserverBase_onEarMonitoringAudioFrame": [ + "AudioFrameObserver_onEarMonitoringAudioFrame_5405a47" + ], + "AudioFrameObserverBase_onPlaybackAudioFrameBeforeMixing": [ + "AudioFrameObserver_onPlaybackAudioFrameBeforeMixing_9215cc7" + ], + "AudioFrameObserverBase_getObservedAudioFramePosition": [ + "AudioFrameObserver_getObservedAudioFramePosition" + ], + "AudioFrameObserverBase_getPlaybackAudioParams": [ + "AudioFrameObserver_getPlaybackAudioParams" + ], + "AudioFrameObserverBase_getRecordAudioParams": [ + "AudioFrameObserver_getRecordAudioParams" + ], + "AudioFrameObserverBase_getMixedAudioParams": [ + "AudioFrameObserver_getMixedAudioParams" + ], + "AudioFrameObserverBase_getEarMonitoringAudioParams": [ + "AudioFrameObserver_getEarMonitoringAudioParams" + ], + "AudioFrameObserver_onPlaybackAudioFrameBeforeMixing": [ + "AudioFrameObserver_onPlaybackAudioFrameBeforeMixing_85ec0fc", + "AudioFrameObserver_onPlaybackAudioFrameBeforeMixing_9215cc7" + ], + "AudioFrameObserver_onRecordAudioFrame": [ + "AudioFrameObserver_onRecordAudioFrame_4c8de15" + ], + "AudioFrameObserver_onPlaybackAudioFrame": [ + "AudioFrameObserver_onPlaybackAudioFrame_4c8de15" + ], + "AudioFrameObserver_onMixedAudioFrame": [ + "AudioFrameObserver_onMixedAudioFrame_4c8de15" + ], + "AudioFrameObserver_onEarMonitoringAudioFrame": [ + "AudioFrameObserver_onEarMonitoringAudioFrame_5405a47" + ], + "AudioFrameObserver_getObservedAudioFramePosition": [ + "AudioFrameObserver_getObservedAudioFramePosition" + ], + "AudioFrameObserver_getPlaybackAudioParams": [ + "AudioFrameObserver_getPlaybackAudioParams" + ], + "AudioFrameObserver_getRecordAudioParams": [ + "AudioFrameObserver_getRecordAudioParams" + ], + "AudioFrameObserver_getMixedAudioParams": [ + "AudioFrameObserver_getMixedAudioParams" + ], + "AudioFrameObserver_getEarMonitoringAudioParams": [ + "AudioFrameObserver_getEarMonitoringAudioParams" + ], + "AudioSpectrumObserver_onLocalAudioSpectrum": [ + "AudioSpectrumObserver_onLocalAudioSpectrum_5822fed" + ], + "AudioSpectrumObserver_onRemoteAudioSpectrum": [ + "AudioSpectrumObserver_onRemoteAudioSpectrum_8ea2cde" + ], + "VideoEncodedFrameObserver_onEncodedVideoFrameReceived": [ + "VideoEncodedFrameObserver_onEncodedVideoFrameReceived_6922697" + ], + "VideoFrameObserver_onCaptureVideoFrame": [ + "VideoFrameObserver_onCaptureVideoFrame_1673590" + ], + "VideoFrameObserver_onPreEncodeVideoFrame": [ + "VideoFrameObserver_onPreEncodeVideoFrame_1673590" + ], + "VideoFrameObserver_onMediaPlayerVideoFrame": [ + "VideoFrameObserver_onMediaPlayerVideoFrame_e648e2c" + ], + "VideoFrameObserver_onRenderVideoFrame": [ + "VideoFrameObserver_onRenderVideoFrame_43dcf82" + ], + "VideoFrameObserver_onTranscodedVideoFrame": [ + "VideoFrameObserver_onTranscodedVideoFrame_27754d8" + ], + "VideoFrameObserver_getVideoFrameProcessMode": [ + "VideoFrameObserver_getVideoFrameProcessMode" + ], + "VideoFrameObserver_getRotationApplied": [ + "VideoFrameObserver_getRotationApplied" + ], + "VideoFrameObserver_getMirrorApplied": [ + "VideoFrameObserver_getMirrorApplied" + ], + "VideoFrameObserver_getObservedFramePosition": [ + "VideoFrameObserver_getObservedFramePosition" + ], + "MediaRecorderObserver_onRecorderStateChanged": [ + "MediaRecorderObserver_onRecorderStateChanged_c38849f" + ], + "MediaRecorderObserver_onRecorderInfoUpdated": [ + "MediaRecorderObserver_onRecorderInfoUpdated_64fa74a" + ], + "MediaPlayerCustomDataProvider_onReadData": [ + "MediaPlayerCustomDataProvider_onReadData_6e75338" + ], + "MediaPlayerCustomDataProvider_onSeek": [ + "MediaPlayerCustomDataProvider_onSeek_624d569" + ], + "H265TranscoderObserver_onEnableTranscode": [ + "H265TranscoderObserver_onEnableTranscode_6ba6646" + ], + "H265TranscoderObserver_onQueryChannel": [ + "H265TranscoderObserver_onQueryChannel_31ba3df" + ], + "H265TranscoderObserver_onTriggerTranscode": [ + "H265TranscoderObserver_onTriggerTranscode_6ba6646" + ], + "MediaPlayerSourceObserver_onPlayerSourceStateChanged": [ + "MediaPlayerSourceObserver_onPlayerSourceStateChanged_7fb38f1" + ], + "MediaPlayerSourceObserver_onPositionChanged": [ + "MediaPlayerSourceObserver_onPositionChanged_303b92e" + ], + "MediaPlayerSourceObserver_onPlayerEvent": [ + "MediaPlayerSourceObserver_onPlayerEvent_50f16fa" + ], + "MediaPlayerSourceObserver_onMetaData": [ + "MediaPlayerSourceObserver_onMetaData_469a01b" + ], + "MediaPlayerSourceObserver_onPlayBufferUpdated": [ + "MediaPlayerSourceObserver_onPlayBufferUpdated_f631116" + ], + "MediaPlayerSourceObserver_onPreloadEvent": [ + "MediaPlayerSourceObserver_onPreloadEvent_a1e3596" + ], + "MediaPlayerSourceObserver_onCompleted": [ + "MediaPlayerSourceObserver_onCompleted" + ], + "MediaPlayerSourceObserver_onAgoraCDNTokenWillExpire": [ + "MediaPlayerSourceObserver_onAgoraCDNTokenWillExpire" + ], + "MediaPlayerSourceObserver_onPlayerSrcInfoChanged": [ + "MediaPlayerSourceObserver_onPlayerSrcInfoChanged_54f3e5a" + ], + "MediaPlayerSourceObserver_onPlayerInfoUpdated": [ + "MediaPlayerSourceObserver_onPlayerInfoUpdated_0e902a8" + ], + "MediaPlayerSourceObserver_onPlayerCacheStats": [ + "MediaPlayerSourceObserver_onPlayerCacheStats_0145940" + ], + "MediaPlayerSourceObserver_onPlayerPlaybackStats": [ + "MediaPlayerSourceObserver_onPlayerPlaybackStats_ffa466f" + ], + "MediaPlayerSourceObserver_onAudioVolumeIndication": [ + "MediaPlayerSourceObserver_onAudioVolumeIndication_46f8ab7" + ], + "MediaStreamingSourceObserver_onStateChanged": [ + "MediaStreamingSourceObserver_onStateChanged_245f90c" + ], + "MediaStreamingSourceObserver_onOpenDone": [ + "MediaStreamingSourceObserver_onOpenDone_2dddc98" + ], + "MediaStreamingSourceObserver_onSeekDone": [ + "MediaStreamingSourceObserver_onSeekDone_2dddc98" + ], + "MediaStreamingSourceObserver_onEofOnce": [ + "MediaStreamingSourceObserver_onEofOnce_303b92e" + ], + "MediaStreamingSourceObserver_onProgress": [ + "MediaStreamingSourceObserver_onProgress_f631116" + ], + "MediaStreamingSourceObserver_onMetaData": [ + "MediaStreamingSourceObserver_onMetaData_469a01b" + ], + "MusicContentCenterEventHandler_onMusicChartsResult": [ + "MusicContentCenterEventHandler_onMusicChartsResult_fb18135" + ], + "MusicContentCenterEventHandler_onMusicCollectionResult": [ + "MusicContentCenterEventHandler_onMusicCollectionResult_c30c2e6" + ], + "MusicContentCenterEventHandler_onLyricResult": [ + "MusicContentCenterEventHandler_onLyricResult_9ad9c90" + ], + "MusicContentCenterEventHandler_onSongSimpleInfoResult": [ + "MusicContentCenterEventHandler_onSongSimpleInfoResult_9ad9c90" + ], + "MusicContentCenterEventHandler_onPreLoadEvent": [ + "MusicContentCenterEventHandler_onPreLoadEvent_20170bc" + ], + "RtcEngineEventHandler_onJoinChannelSuccess": [ + "RtcEngineEventHandler_onJoinChannelSuccess_263e4cd" + ], + "RtcEngineEventHandler_onRejoinChannelSuccess": [ + "RtcEngineEventHandler_onRejoinChannelSuccess_263e4cd" + ], + "RtcEngineEventHandler_onProxyConnected": [ + "RtcEngineEventHandler_onProxyConnected_9f89fd0" + ], + "RtcEngineEventHandler_onError": ["RtcEngineEventHandler_onError_d26c0fd"], + "RtcEngineEventHandler_onAudioQuality": [ + "RtcEngineEventHandler_onAudioQuality_5c7294b" + ], + "RtcEngineEventHandler_onLastmileProbeResult": [ + "RtcEngineEventHandler_onLastmileProbeResult_42b5843" + ], + "RtcEngineEventHandler_onAudioVolumeIndication": [ + "RtcEngineEventHandler_onAudioVolumeIndication_781482a" + ], + "RtcEngineEventHandler_onLeaveChannel": [ + "RtcEngineEventHandler_onLeaveChannel_c8e730d" + ], + "RtcEngineEventHandler_onRtcStats": [ + "RtcEngineEventHandler_onRtcStats_c8e730d" + ], + "RtcEngineEventHandler_onAudioDeviceStateChanged": [ + "RtcEngineEventHandler_onAudioDeviceStateChanged_976d8c3" + ], + "RtcEngineEventHandler_onAudioMixingPositionChanged": [ + "RtcEngineEventHandler_onAudioMixingPositionChanged_f631116" + ], + "RtcEngineEventHandler_onAudioMixingFinished": [ + "RtcEngineEventHandler_onAudioMixingFinished" + ], + "RtcEngineEventHandler_onAudioEffectFinished": [ + "RtcEngineEventHandler_onAudioEffectFinished_46f8ab7" + ], + "RtcEngineEventHandler_onVideoDeviceStateChanged": [ + "RtcEngineEventHandler_onVideoDeviceStateChanged_976d8c3" + ], + "RtcEngineEventHandler_onNetworkQuality": [ + "RtcEngineEventHandler_onNetworkQuality_34d8b3c" + ], + "RtcEngineEventHandler_onIntraRequestReceived": [ + "RtcEngineEventHandler_onIntraRequestReceived_c81e1a4" + ], + "RtcEngineEventHandler_onUplinkNetworkInfoUpdated": [ + "RtcEngineEventHandler_onUplinkNetworkInfoUpdated_cbb1856" + ], + "RtcEngineEventHandler_onDownlinkNetworkInfoUpdated": [ + "RtcEngineEventHandler_onDownlinkNetworkInfoUpdated_e9d5bd9" + ], + "RtcEngineEventHandler_onLastmileQuality": [ + "RtcEngineEventHandler_onLastmileQuality_46f8ab7" + ], + "RtcEngineEventHandler_onFirstLocalVideoFrame": [ + "RtcEngineEventHandler_onFirstLocalVideoFrame_ebdfd19" + ], + "RtcEngineEventHandler_onFirstLocalVideoFramePublished": [ + "RtcEngineEventHandler_onFirstLocalVideoFramePublished_2ad83d8" + ], + "RtcEngineEventHandler_onFirstRemoteVideoDecoded": [ + "RtcEngineEventHandler_onFirstRemoteVideoDecoded_a68170a" + ], + "RtcEngineEventHandler_onVideoSizeChanged": [ + "RtcEngineEventHandler_onVideoSizeChanged_99bf45c" + ], + "RtcEngineEventHandler_onLocalVideoStateChanged": [ + "RtcEngineEventHandler_onLocalVideoStateChanged_a44228a" + ], + "RtcEngineEventHandler_onRemoteVideoStateChanged": [ + "RtcEngineEventHandler_onRemoteVideoStateChanged_a14e9d1" + ], + "RtcEngineEventHandler_onFirstRemoteVideoFrame": [ + "RtcEngineEventHandler_onFirstRemoteVideoFrame_a68170a" + ], + "RtcEngineEventHandler_onUserJoined": [ + "RtcEngineEventHandler_onUserJoined_c5499bd" + ], + "RtcEngineEventHandler_onUserOffline": [ + "RtcEngineEventHandler_onUserOffline_0a32aac" + ], + "RtcEngineEventHandler_onUserMuteAudio": [ + "RtcEngineEventHandler_onUserMuteAudio_0aac2fe" + ], + "RtcEngineEventHandler_onUserMuteVideo": [ + "RtcEngineEventHandler_onUserMuteVideo_0aac2fe" + ], + "RtcEngineEventHandler_onUserEnableVideo": [ + "RtcEngineEventHandler_onUserEnableVideo_0aac2fe" + ], + "RtcEngineEventHandler_onUserStateChanged": [ + "RtcEngineEventHandler_onUserStateChanged_65f95a7" + ], + "RtcEngineEventHandler_onUserEnableLocalVideo": [ + "RtcEngineEventHandler_onUserEnableLocalVideo_0aac2fe" + ], + "RtcEngineEventHandler_onRemoteAudioStats": [ + "RtcEngineEventHandler_onRemoteAudioStats_ffbde06" + ], + "RtcEngineEventHandler_onLocalAudioStats": [ + "RtcEngineEventHandler_onLocalAudioStats_5657f05" + ], + "RtcEngineEventHandler_onLocalVideoStats": [ + "RtcEngineEventHandler_onLocalVideoStats_baa96c8" + ], + "RtcEngineEventHandler_onRemoteVideoStats": [ + "RtcEngineEventHandler_onRemoteVideoStats_2f43a70" + ], + "RtcEngineEventHandler_onCameraReady": [ + "RtcEngineEventHandler_onCameraReady" + ], + "RtcEngineEventHandler_onCameraFocusAreaChanged": [ + "RtcEngineEventHandler_onCameraFocusAreaChanged_41c5354" + ], + "RtcEngineEventHandler_onCameraExposureAreaChanged": [ + "RtcEngineEventHandler_onCameraExposureAreaChanged_41c5354" + ], + "RtcEngineEventHandler_onFacePositionChanged": [ + "RtcEngineEventHandler_onFacePositionChanged_197b4a7" + ], + "RtcEngineEventHandler_onVideoStopped": [ + "RtcEngineEventHandler_onVideoStopped" + ], + "RtcEngineEventHandler_onAudioMixingStateChanged": [ + "RtcEngineEventHandler_onAudioMixingStateChanged_fd2c0a6" + ], + "RtcEngineEventHandler_onRhythmPlayerStateChanged": [ + "RtcEngineEventHandler_onRhythmPlayerStateChanged_09360d2" + ], + "RtcEngineEventHandler_onConnectionLost": [ + "RtcEngineEventHandler_onConnectionLost_c81e1a4" + ], + "RtcEngineEventHandler_onConnectionInterrupted": [ + "RtcEngineEventHandler_onConnectionInterrupted_c81e1a4" + ], + "RtcEngineEventHandler_onConnectionBanned": [ + "RtcEngineEventHandler_onConnectionBanned_c81e1a4" + ], + "RtcEngineEventHandler_onStreamMessage": [ + "RtcEngineEventHandler_onStreamMessage_99898cb" + ], + "RtcEngineEventHandler_onStreamMessageError": [ + "RtcEngineEventHandler_onStreamMessageError_fe302fc" + ], + "RtcEngineEventHandler_onRequestToken": [ + "RtcEngineEventHandler_onRequestToken_c81e1a4" + ], + "RtcEngineEventHandler_onTokenPrivilegeWillExpire": [ + "RtcEngineEventHandler_onTokenPrivilegeWillExpire_8225ea3" + ], + "RtcEngineEventHandler_onLicenseValidationFailure": [ + "RtcEngineEventHandler_onLicenseValidationFailure_5dfd95e" + ], + "RtcEngineEventHandler_onFirstLocalAudioFramePublished": [ + "RtcEngineEventHandler_onFirstLocalAudioFramePublished_263e4cd" + ], + "RtcEngineEventHandler_onFirstRemoteAudioDecoded": [ + "RtcEngineEventHandler_onFirstRemoteAudioDecoded_c5499bd" + ], + "RtcEngineEventHandler_onFirstRemoteAudioFrame": [ + "RtcEngineEventHandler_onFirstRemoteAudioFrame_c5499bd" + ], + "RtcEngineEventHandler_onLocalAudioStateChanged": [ + "RtcEngineEventHandler_onLocalAudioStateChanged_13b6c02" + ], + "RtcEngineEventHandler_onRemoteAudioStateChanged": [ + "RtcEngineEventHandler_onRemoteAudioStateChanged_056772e" + ], + "RtcEngineEventHandler_onActiveSpeaker": [ + "RtcEngineEventHandler_onActiveSpeaker_dd67adc" + ], + "RtcEngineEventHandler_onContentInspectResult": [ + "RtcEngineEventHandler_onContentInspectResult_ba185c8" + ], + "RtcEngineEventHandler_onSnapshotTaken": [ + "RtcEngineEventHandler_onSnapshotTaken_5a6a693" + ], + "RtcEngineEventHandler_onClientRoleChanged": [ + "RtcEngineEventHandler_onClientRoleChanged_2acaf10" + ], + "RtcEngineEventHandler_onClientRoleChangeFailed": [ + "RtcEngineEventHandler_onClientRoleChangeFailed_5a3af5b" + ], + "RtcEngineEventHandler_onAudioDeviceVolumeChanged": [ + "RtcEngineEventHandler_onAudioDeviceVolumeChanged_55ab726" + ], + "RtcEngineEventHandler_onRtmpStreamingStateChanged": [ + "RtcEngineEventHandler_onRtmpStreamingStateChanged_1f07503" + ], + "RtcEngineEventHandler_onRtmpStreamingEvent": [ + "RtcEngineEventHandler_onRtmpStreamingEvent_2e48ef5" + ], + "RtcEngineEventHandler_onTranscodingUpdated": [ + "RtcEngineEventHandler_onTranscodingUpdated" + ], + "RtcEngineEventHandler_onAudioRoutingChanged": [ + "RtcEngineEventHandler_onAudioRoutingChanged_46f8ab7" + ], + "RtcEngineEventHandler_onChannelMediaRelayStateChanged": [ + "RtcEngineEventHandler_onChannelMediaRelayStateChanged_4e92b3c" + ], + "RtcEngineEventHandler_onLocalPublishFallbackToAudioOnly": [ + "RtcEngineEventHandler_onLocalPublishFallbackToAudioOnly_5039d15" + ], + "RtcEngineEventHandler_onRemoteSubscribeFallbackToAudioOnly": [ + "RtcEngineEventHandler_onRemoteSubscribeFallbackToAudioOnly_dbdc15a" + ], + "RtcEngineEventHandler_onRemoteAudioTransportStats": [ + "RtcEngineEventHandler_onRemoteAudioTransportStats_527a345" + ], + "RtcEngineEventHandler_onRemoteVideoTransportStats": [ + "RtcEngineEventHandler_onRemoteVideoTransportStats_527a345" + ], + "RtcEngineEventHandler_onConnectionStateChanged": [ + "RtcEngineEventHandler_onConnectionStateChanged_4075a9c" + ], + "RtcEngineEventHandler_onWlAccMessage": [ + "RtcEngineEventHandler_onWlAccMessage_2b9068e" + ], + "RtcEngineEventHandler_onWlAccStats": [ + "RtcEngineEventHandler_onWlAccStats_b162607" + ], + "RtcEngineEventHandler_onNetworkTypeChanged": [ + "RtcEngineEventHandler_onNetworkTypeChanged_388fd6f" + ], + "RtcEngineEventHandler_onEncryptionError": [ + "RtcEngineEventHandler_onEncryptionError_e7a65fe" + ], + "RtcEngineEventHandler_onPermissionError": [ + "RtcEngineEventHandler_onPermissionError_f37c62b" + ], + "RtcEngineEventHandler_onLocalUserRegistered": [ + "RtcEngineEventHandler_onLocalUserRegistered_1922dd1" + ], + "RtcEngineEventHandler_onUserInfoUpdated": [ + "RtcEngineEventHandler_onUserInfoUpdated_2120245" + ], + "RtcEngineEventHandler_onUserAccountUpdated": [ + "RtcEngineEventHandler_onUserAccountUpdated_de1c015" + ], + "RtcEngineEventHandler_onVideoRenderingTracingResult": [ + "RtcEngineEventHandler_onVideoRenderingTracingResult_813c0f4" + ], + "RtcEngineEventHandler_onLocalVideoTranscoderError": [ + "RtcEngineEventHandler_onLocalVideoTranscoderError_83e3a9c" + ], + "RtcEngineEventHandler_onUploadLogResult": [ + "RtcEngineEventHandler_onUploadLogResult_3115804" + ], + "RtcEngineEventHandler_onAudioSubscribeStateChanged": [ + "RtcEngineEventHandler_onAudioSubscribeStateChanged_e0ec28e" + ], + "RtcEngineEventHandler_onVideoSubscribeStateChanged": [ + "RtcEngineEventHandler_onVideoSubscribeStateChanged_e0ec28e" + ], + "RtcEngineEventHandler_onAudioPublishStateChanged": [ + "RtcEngineEventHandler_onAudioPublishStateChanged_2c13a28" + ], + "RtcEngineEventHandler_onVideoPublishStateChanged": [ + "RtcEngineEventHandler_onVideoPublishStateChanged_5b45b6e" + ], + "RtcEngineEventHandler_onTranscodedStreamLayoutInfo": [ + "RtcEngineEventHandler_onTranscodedStreamLayoutInfo_48f6419" + ], + "RtcEngineEventHandler_onExtensionEvent": [ + "RtcEngineEventHandler_onExtensionEvent_062d13c" + ], + "RtcEngineEventHandler_onExtensionStarted": [ + "RtcEngineEventHandler_onExtensionStarted_ccad422" + ], + "RtcEngineEventHandler_onExtensionStopped": [ + "RtcEngineEventHandler_onExtensionStopped_ccad422" + ], + "RtcEngineEventHandler_onExtensionError": [ + "RtcEngineEventHandler_onExtensionError_bd3489b" + ], + "RtcEngineEventHandler_onSetRtmFlagResult": [ + "RtcEngineEventHandler_onSetRtmFlagResult_263e4cd" + ], + "MetadataObserver_onMetadataReceived": [ + "MetadataObserver_onMetadataReceived_cb7661d" + ], + "DirectCdnStreamingEventHandler_onDirectCdnStreamingStateChanged": [ + "DirectCdnStreamingEventHandler_onDirectCdnStreamingStateChanged_40f1fa3" + ], + "DirectCdnStreamingEventHandler_onDirectCdnStreamingStats": [ + "DirectCdnStreamingEventHandler_onDirectCdnStreamingStats_d50595f" + ] +}; diff --git a/test_shard/fake_test_app/integration_test/generated/h265transcoder_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/h265transcoder_fake_test.generated.dart new file mode 100644 index 000000000..69a37f4d1 --- /dev/null +++ b/test_shard/fake_test_app/integration_test/generated/h265transcoder_fake_test.generated.dart @@ -0,0 +1,221 @@ +/// GENERATED BY testcase_gen. DO NOT MODIFY BY HAND. + +// ignore_for_file: deprecated_member_use,constant_identifier_names + +import 'package:agora_rtc_engine/agora_rtc_engine.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:flutter/foundation.dart'; +import 'package:iris_tester/iris_tester.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; + +void generatedTestCases() { + testWidgets( + 'H265Transcoder.enableTranscode', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + try { + const String token = "hello"; + const String channel = "hello"; + const int uid = 10; + await h265Transcoder.enableTranscode( + token: token, + channel: channel, + uid: uid, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[H265Transcoder.enableTranscode] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'H265Transcoder.queryChannel', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + try { + const String token = "hello"; + const String channel = "hello"; + const int uid = 10; + await h265Transcoder.queryChannel( + token: token, + channel: channel, + uid: uid, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[H265Transcoder.queryChannel] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'H265Transcoder.triggerTranscode', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + try { + const String token = "hello"; + const String channel = "hello"; + const int uid = 10; + await h265Transcoder.triggerTranscode( + token: token, + channel: channel, + uid: uid, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[H265Transcoder.triggerTranscode] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'H265Transcoder.registerTranscoderObserver', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + try { + final H265TranscoderObserver observer = H265TranscoderObserver( + onEnableTranscode: (H265TranscodeResult result) {}, + onQueryChannel: (H265TranscodeResult result, String originChannel, + String transcodeChannel) {}, + onTriggerTranscode: (H265TranscodeResult result) {}, + ); + h265Transcoder.registerTranscoderObserver( + observer, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[H265Transcoder.registerTranscoderObserver] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'H265Transcoder.unregisterTranscoderObserver', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + try { + final H265TranscoderObserver observer = H265TranscoderObserver( + onEnableTranscode: (H265TranscodeResult result) {}, + onQueryChannel: (H265TranscodeResult result, String originChannel, + String transcodeChannel) {}, + onTriggerTranscode: (H265TranscodeResult result) {}, + ); + h265Transcoder.unregisterTranscoderObserver( + observer, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[H265Transcoder.unregisterTranscoderObserver] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, +// skip: !(), + ); +} diff --git a/test_shard/fake_test_app/integration_test/generated/h265transcoder_h265transcoderobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/h265transcoder_h265transcoderobserver_testcases.generated.dart new file mode 100644 index 000000000..57969daf7 --- /dev/null +++ b/test_shard/fake_test_app/integration_test/generated/h265transcoder_h265transcoderobserver_testcases.generated.dart @@ -0,0 +1,216 @@ +/// GENERATED BY testcase_gen. DO NOT MODIFY BY HAND. + +// ignore_for_file: deprecated_member_use,constant_identifier_names + +import 'dart:async'; +import 'dart:typed_data'; + +import 'package:agora_rtc_engine/agora_rtc_engine.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:iris_tester/iris_tester.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; + +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { + testWidgets( + 'H265TranscoderObserver.onEnableTranscode', + (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + final onEnableTranscodeCompleter = Completer(); + final theH265TranscoderObserver = H265TranscoderObserver( + onEnableTranscode: (H265TranscodeResult result) { + onEnableTranscodeCompleter.complete(true); + }, + ); + + h265Transcoder.registerTranscoderObserver( + theH265TranscoderObserver, + ); + +// Delay 500 milliseconds to ensure the registerTranscoderObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const H265TranscodeResult result = + H265TranscodeResult.h265TranscodeResultUnknown; + + final eventJson = { + 'result': result.value(), + }; + + final eventIds = + eventIdsMapping['H265TranscoderObserver_onEnableTranscode'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onEnableTranscodeCompleter.isCompleted) { + onEnableTranscodeCompleter.complete(true); + } + } + } + } + + final eventCalled = await onEnableTranscodeCompleter.future; + expect(eventCalled, isTrue); + + { + h265Transcoder.unregisterTranscoderObserver( + theH265TranscoderObserver, + ); + } +// Delay 500 milliseconds to ensure the unregisterTranscoderObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), + ); + + testWidgets( + 'H265TranscoderObserver.onQueryChannel', + (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + final onQueryChannelCompleter = Completer(); + final theH265TranscoderObserver = H265TranscoderObserver( + onQueryChannel: (H265TranscodeResult result, String originChannel, + String transcodeChannel) { + onQueryChannelCompleter.complete(true); + }, + ); + + h265Transcoder.registerTranscoderObserver( + theH265TranscoderObserver, + ); + +// Delay 500 milliseconds to ensure the registerTranscoderObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const H265TranscodeResult result = + H265TranscodeResult.h265TranscodeResultUnknown; + const String originChannel = "hello"; + const String transcodeChannel = "hello"; + + final eventJson = { + 'result': result.value(), + 'originChannel': originChannel, + 'transcodeChannel': transcodeChannel, + }; + + final eventIds = + eventIdsMapping['H265TranscoderObserver_onQueryChannel'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onQueryChannelCompleter.isCompleted) { + onQueryChannelCompleter.complete(true); + } + } + } + } + + final eventCalled = await onQueryChannelCompleter.future; + expect(eventCalled, isTrue); + + { + h265Transcoder.unregisterTranscoderObserver( + theH265TranscoderObserver, + ); + } +// Delay 500 milliseconds to ensure the unregisterTranscoderObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), + ); + + testWidgets( + 'H265TranscoderObserver.onTriggerTranscode', + (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + final onTriggerTranscodeCompleter = Completer(); + final theH265TranscoderObserver = H265TranscoderObserver( + onTriggerTranscode: (H265TranscodeResult result) { + onTriggerTranscodeCompleter.complete(true); + }, + ); + + h265Transcoder.registerTranscoderObserver( + theH265TranscoderObserver, + ); + +// Delay 500 milliseconds to ensure the registerTranscoderObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const H265TranscodeResult result = + H265TranscodeResult.h265TranscodeResultUnknown; + + final eventJson = { + 'result': result.value(), + }; + + final eventIds = + eventIdsMapping['H265TranscoderObserver_onTriggerTranscode'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onTriggerTranscodeCompleter.isCompleted) { + onTriggerTranscodeCompleter.complete(true); + } + } + } + } + + final eventCalled = await onTriggerTranscodeCompleter.future; + expect(eventCalled, isTrue); + + { + h265Transcoder.unregisterTranscoderObserver( + theH265TranscoderObserver, + ); + } +// Delay 500 milliseconds to ensure the unregisterTranscoderObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), + ); +} diff --git a/test_shard/fake_test_app/integration_test/generated/localspatialaudioengine_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/localspatialaudioengine_fake_test.generated.dart index 8951f4c8d..15f716c6f 100644 --- a/test_shard/fake_test_app/integration_test/generated/localspatialaudioengine_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/localspatialaudioengine_fake_test.generated.dart @@ -11,7 +11,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void localSpatialAudioEngineSmokeTestCases() { testWidgets( - 'initialize', + 'LocalSpatialAudioEngine.release', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -21,14 +21,54 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + await localSpatialAudioEngine.release(); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.release] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.initialize', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { await localSpatialAudioEngine.initialize(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[initialize] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.initialize] error: ${e.toString()}'); rethrow; } @@ -45,7 +85,7 @@ void localSpatialAudioEngineSmokeTestCases() { ); testWidgets( - 'updateRemotePosition', + 'LocalSpatialAudioEngine.updateRemotePosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -55,8 +95,10 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { const int uid = 10; @@ -72,7 +114,8 @@ void localSpatialAudioEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateRemotePosition] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.updateRemotePosition] error: ${e.toString()}'); rethrow; } @@ -89,7 +132,7 @@ void localSpatialAudioEngineSmokeTestCases() { ); testWidgets( - 'updateRemotePositionEx', + 'LocalSpatialAudioEngine.updateRemotePositionEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -99,8 +142,10 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { const int uid = 10; @@ -123,7 +168,8 @@ void localSpatialAudioEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateRemotePositionEx] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.updateRemotePositionEx] error: ${e.toString()}'); rethrow; } @@ -140,7 +186,7 @@ void localSpatialAudioEngineSmokeTestCases() { ); testWidgets( - 'removeRemotePosition', + 'LocalSpatialAudioEngine.removeRemotePosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -150,8 +196,10 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { const int uid = 10; @@ -160,7 +208,8 @@ void localSpatialAudioEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[removeRemotePosition] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.removeRemotePosition] error: ${e.toString()}'); rethrow; } @@ -177,7 +226,7 @@ void localSpatialAudioEngineSmokeTestCases() { ); testWidgets( - 'removeRemotePositionEx', + 'LocalSpatialAudioEngine.removeRemotePositionEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -187,8 +236,10 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { const int uid = 10; @@ -204,7 +255,8 @@ void localSpatialAudioEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[removeRemotePositionEx] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.removeRemotePositionEx] error: ${e.toString()}'); rethrow; } @@ -221,7 +273,7 @@ void localSpatialAudioEngineSmokeTestCases() { ); testWidgets( - 'clearRemotePositions', + 'LocalSpatialAudioEngine.clearRemotePositionsEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -231,14 +283,25 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { - await localSpatialAudioEngine.clearRemotePositions(); + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + await localSpatialAudioEngine.clearRemotePositionsEx( + connection, + ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[clearRemotePositions] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.clearRemotePositionsEx] error: ${e.toString()}'); rethrow; } @@ -255,7 +318,7 @@ void localSpatialAudioEngineSmokeTestCases() { ); testWidgets( - 'clearRemotePositionsEx', + 'LocalSpatialAudioEngine.setMaxAudioRecvCount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -265,22 +328,267 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { - const String connectionChannelId = "hello"; - const int connectionLocalUid = 10; - const RtcConnection connection = RtcConnection( - channelId: connectionChannelId, - localUid: connectionLocalUid, + const int maxCount = 10; + await localSpatialAudioEngine.setMaxAudioRecvCount( + maxCount, ); - await localSpatialAudioEngine.clearRemotePositionsEx( - connection, + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.setMaxAudioRecvCount] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.setAudioRecvRange', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const double range = 10.0; + await localSpatialAudioEngine.setAudioRecvRange( + range, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.setAudioRecvRange] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.setDistanceUnit', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const double unit = 10.0; + await localSpatialAudioEngine.setDistanceUnit( + unit, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.setDistanceUnit] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.updatePlayerPositionInfo', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const int playerId = 10; + const List positionInfoPosition = []; + const List positionInfoForward = []; + const RemoteVoicePositionInfo positionInfo = RemoteVoicePositionInfo( + position: positionInfoPosition, + forward: positionInfoForward, + ); + await localSpatialAudioEngine.updatePlayerPositionInfo( + playerId: playerId, + positionInfo: positionInfo, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.updatePlayerPositionInfo] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.setParameters', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const String params = "hello"; + await localSpatialAudioEngine.setParameters( + params, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.setParameters] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.muteLocalAudioStream', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const bool mute = true; + await localSpatialAudioEngine.muteLocalAudioStream( + mute, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.muteLocalAudioStream] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.muteAllRemoteAudioStreams', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const bool mute = true; + await localSpatialAudioEngine.muteAllRemoteAudioStreams( + mute, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[clearRemotePositionsEx] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.muteAllRemoteAudioStreams] error: ${e.toString()}'); rethrow; } @@ -297,7 +605,7 @@ void localSpatialAudioEngineSmokeTestCases() { ); testWidgets( - 'setRemoteAudioAttenuation', + 'LocalSpatialAudioEngine.muteRemoteAudioStream', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -307,8 +615,52 @@ void localSpatialAudioEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const int uid = 10; + const bool mute = true; + await localSpatialAudioEngine.muteRemoteAudioStream( + uid: uid, + mute: mute, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.muteRemoteAudioStream] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.setRemoteAudioAttenuation', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { const int uid = 10; @@ -321,7 +673,131 @@ void localSpatialAudioEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteAudioAttenuation] error: ${e.toString()}'); + debugPrint( + '[LocalSpatialAudioEngine.setRemoteAudioAttenuation] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.setZones', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const List zones = []; + const int zoneCount = 10; + await localSpatialAudioEngine.setZones( + zones: zones, + zoneCount: zoneCount, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.setZones] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.setPlayerAttenuation', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + const int playerId = 10; + const double attenuation = 10.0; + const bool forceSet = true; + await localSpatialAudioEngine.setPlayerAttenuation( + playerId: playerId, + attenuation: attenuation, + forceSet: forceSet, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.setPlayerAttenuation] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await localSpatialAudioEngine.release(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'LocalSpatialAudioEngine.clearRemotePositions', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); + + try { + await localSpatialAudioEngine.clearRemotePositions(); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[LocalSpatialAudioEngine.clearRemotePositions] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaengine_audioframeobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaengine_audioframeobserver_testcases.generated.dart index 438d89065..adbe7aae3 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaengine_audioframeobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaengine_audioframeobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onPlaybackAudioFrameBeforeMixing', + 'AudioFrameObserver.onPlaybackAudioFrameBeforeMixing', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); final onPlaybackAudioFrameBeforeMixingCompleter = Completer(); @@ -50,6 +53,7 @@ void generatedTestCases(IrisTester irisTester) { const int audioFrameRenderTimeMs = 10; const int audioFrameAvsyncType = 10; const int audioFramePresentationMs = 10; + const int audioFrameAudioTrackNumber = 10; final AudioFrame audioFrame = AudioFrame( type: audioFrameType, samplesPerChannel: audioFrameSamplesPerChannel, @@ -60,6 +64,7 @@ void generatedTestCases(IrisTester irisTester) { renderTimeMs: audioFrameRenderTimeMs, avsyncType: audioFrameAvsyncType, presentationMs: audioFramePresentationMs, + audioTrackNumber: audioFrameAudioTrackNumber, ); final eventJson = { @@ -68,18 +73,15 @@ void generatedTestCases(IrisTester irisTester) { 'audioFrame': audioFrame.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'AudioFrameObserver_onPlaybackAudioFrameBeforeMixing', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioFrameObserver_onPlaybackAudioFrameBeforeMixing', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'AudioFrameObserver_onPlaybackAudioFrameBeforeMixing'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPlaybackAudioFrameBeforeMixingCompleter.isCompleted) { onPlaybackAudioFrameBeforeMixingCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart index cdf0cbf1d..3bd20c3f4 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaengine_fake_test.generated.dart @@ -12,7 +12,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void mediaEngineSmokeTestCases() { testWidgets( - 'registerAudioFrameObserver', + 'MediaEngine.registerAudioFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -22,6 +22,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -39,7 +40,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerAudioFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.registerAudioFrameObserver] error: ${e.toString()}'); rethrow; } @@ -56,7 +58,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'registerVideoFrameObserver', + 'MediaEngine.registerVideoFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -66,6 +68,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -86,7 +89,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerVideoFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.registerVideoFrameObserver] error: ${e.toString()}'); rethrow; } @@ -103,7 +107,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'registerVideoEncodedFrameObserver', + 'MediaEngine.registerVideoEncodedFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -113,6 +117,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -127,7 +132,7 @@ void mediaEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[registerVideoEncodedFrameObserver] error: ${e.toString()}'); + '[MediaEngine.registerVideoEncodedFrameObserver] error: ${e.toString()}'); rethrow; } @@ -144,7 +149,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'pushAudioFrame', + 'MediaEngine.pushAudioFrame', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -154,6 +159,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -168,6 +174,7 @@ void mediaEngineSmokeTestCases() { const int frameRenderTimeMs = 10; const int frameAvsyncType = 10; const int framePresentationMs = 10; + const int frameAudioTrackNumber = 10; final AudioFrame frame = AudioFrame( type: frameType, samplesPerChannel: frameSamplesPerChannel, @@ -178,6 +185,7 @@ void mediaEngineSmokeTestCases() { renderTimeMs: frameRenderTimeMs, avsyncType: frameAvsyncType, presentationMs: framePresentationMs, + audioTrackNumber: frameAudioTrackNumber, ); const int trackId = 10; await mediaEngine.pushAudioFrame( @@ -186,7 +194,7 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pushAudioFrame] error: ${e.toString()}'); + debugPrint('[MediaEngine.pushAudioFrame] error: ${e.toString()}'); rethrow; } @@ -203,7 +211,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'pullAudioFrame', + 'MediaEngine.pullAudioFrame', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -213,6 +221,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -227,6 +236,7 @@ void mediaEngineSmokeTestCases() { const int frameRenderTimeMs = 10; const int frameAvsyncType = 10; const int framePresentationMs = 10; + const int frameAudioTrackNumber = 10; final AudioFrame frame = AudioFrame( type: frameType, samplesPerChannel: frameSamplesPerChannel, @@ -237,13 +247,14 @@ void mediaEngineSmokeTestCases() { renderTimeMs: frameRenderTimeMs, avsyncType: frameAvsyncType, presentationMs: framePresentationMs, + audioTrackNumber: frameAudioTrackNumber, ); await mediaEngine.pullAudioFrame( frame, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pullAudioFrame] error: ${e.toString()}'); + debugPrint('[MediaEngine.pullAudioFrame] error: ${e.toString()}'); rethrow; } @@ -260,7 +271,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'setExternalVideoSource', + 'MediaEngine.setExternalVideoSource', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -270,6 +281,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -295,7 +307,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setExternalVideoSource] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.setExternalVideoSource] error: ${e.toString()}'); rethrow; } @@ -312,7 +325,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'setExternalAudioSource', + 'MediaEngine.setExternalAudioSource', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -322,6 +335,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -340,7 +354,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setExternalAudioSource] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.setExternalAudioSource] error: ${e.toString()}'); rethrow; } @@ -357,7 +372,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'destroyCustomAudioTrack', + 'MediaEngine.destroyCustomAudioTrack', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -367,6 +382,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -377,7 +393,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[destroyCustomAudioTrack] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.destroyCustomAudioTrack] error: ${e.toString()}'); rethrow; } @@ -394,7 +411,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'setExternalAudioSink', + 'MediaEngine.setExternalAudioSink', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -404,6 +421,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -418,7 +436,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setExternalAudioSink] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.setExternalAudioSink] error: ${e.toString()}'); rethrow; } @@ -435,7 +454,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'enableCustomAudioLocalPlayback', + 'MediaEngine.enableCustomAudioLocalPlayback', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -445,6 +464,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -457,7 +477,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableCustomAudioLocalPlayback] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.enableCustomAudioLocalPlayback] error: ${e.toString()}'); rethrow; } @@ -474,7 +495,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'pushVideoFrame', + 'MediaEngine.pushVideoFrame', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -484,6 +505,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -533,7 +555,7 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pushVideoFrame] error: ${e.toString()}'); + debugPrint('[MediaEngine.pushVideoFrame] error: ${e.toString()}'); rethrow; } @@ -550,7 +572,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'pushEncodedVideoImage', + 'MediaEngine.pushEncodedVideoImage', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -560,6 +582,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -574,15 +597,16 @@ void mediaEngineSmokeTestCases() { VideoOrientation.videoOrientation0; const VideoStreamType videoEncodedFrameInfoStreamType = VideoStreamType.videoStreamHigh; + const int videoEncodedFrameInfoUid = 10; const int videoEncodedFrameInfoWidth = 10; const int videoEncodedFrameInfoHeight = 10; const int videoEncodedFrameInfoFramesPerSecond = 10; const int videoEncodedFrameInfoTrackId = 10; const int videoEncodedFrameInfoCaptureTimeMs = 10; const int videoEncodedFrameInfoDecodeTimeMs = 10; - const int videoEncodedFrameInfoUid = 10; const EncodedVideoFrameInfo videoEncodedFrameInfo = EncodedVideoFrameInfo( + uid: videoEncodedFrameInfoUid, codecType: videoEncodedFrameInfoCodecType, width: videoEncodedFrameInfoWidth, height: videoEncodedFrameInfoHeight, @@ -592,7 +616,6 @@ void mediaEngineSmokeTestCases() { trackId: videoEncodedFrameInfoTrackId, captureTimeMs: videoEncodedFrameInfoCaptureTimeMs, decodeTimeMs: videoEncodedFrameInfoDecodeTimeMs, - uid: videoEncodedFrameInfoUid, streamType: videoEncodedFrameInfoStreamType, ); const int videoTrackId = 10; @@ -604,7 +627,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pushEncodedVideoImage] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.pushEncodedVideoImage] error: ${e.toString()}'); rethrow; } @@ -621,7 +645,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'release', + 'MediaEngine.release', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -631,6 +655,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -638,7 +663,7 @@ void mediaEngineSmokeTestCases() { await mediaEngine.release(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[release] error: ${e.toString()}'); + debugPrint('[MediaEngine.release] error: ${e.toString()}'); rethrow; } @@ -655,7 +680,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'unregisterAudioFrameObserver', + 'MediaEngine.unregisterAudioFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -665,6 +690,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -682,7 +708,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unregisterAudioFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.unregisterAudioFrameObserver] error: ${e.toString()}'); rethrow; } @@ -699,7 +726,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'unregisterVideoFrameObserver', + 'MediaEngine.unregisterVideoFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -709,6 +736,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -729,7 +757,8 @@ void mediaEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unregisterVideoFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaEngine.unregisterVideoFrameObserver] error: ${e.toString()}'); rethrow; } @@ -746,7 +775,7 @@ void mediaEngineSmokeTestCases() { ); testWidgets( - 'unregisterVideoEncodedFrameObserver', + 'MediaEngine.unregisterVideoEncodedFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -756,6 +785,7 @@ void mediaEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -770,7 +800,7 @@ void mediaEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[unregisterVideoEncodedFrameObserver] error: ${e.toString()}'); + '[MediaEngine.unregisterVideoEncodedFrameObserver] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaengine_videoencodedframeobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaengine_videoencodedframeobserver_testcases.generated.dart index 218259295..b00258db0 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaengine_videoencodedframeobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaengine_videoencodedframeobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onEncodedVideoFrameReceived', + 'VideoEncodedFrameObserver.onEncodedVideoFrameReceived', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); final onEncodedVideoFrameReceivedCompleter = Completer(); @@ -49,15 +52,16 @@ void generatedTestCases(IrisTester irisTester) { VideoOrientation.videoOrientation0; const VideoStreamType videoEncodedFrameInfoStreamType = VideoStreamType.videoStreamHigh; + const int videoEncodedFrameInfoUid = 10; const int videoEncodedFrameInfoWidth = 10; const int videoEncodedFrameInfoHeight = 10; const int videoEncodedFrameInfoFramesPerSecond = 10; const int videoEncodedFrameInfoTrackId = 10; const int videoEncodedFrameInfoCaptureTimeMs = 10; const int videoEncodedFrameInfoDecodeTimeMs = 10; - const int videoEncodedFrameInfoUid = 10; const EncodedVideoFrameInfo videoEncodedFrameInfo = EncodedVideoFrameInfo( + uid: videoEncodedFrameInfoUid, codecType: videoEncodedFrameInfoCodecType, width: videoEncodedFrameInfoWidth, height: videoEncodedFrameInfoHeight, @@ -67,7 +71,6 @@ void generatedTestCases(IrisTester irisTester) { trackId: videoEncodedFrameInfoTrackId, captureTimeMs: videoEncodedFrameInfoCaptureTimeMs, decodeTimeMs: videoEncodedFrameInfoDecodeTimeMs, - uid: videoEncodedFrameInfoUid, streamType: videoEncodedFrameInfoStreamType, ); @@ -78,18 +81,15 @@ void generatedTestCases(IrisTester irisTester) { 'videoEncodedFrameInfo': videoEncodedFrameInfo.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'VideoEncodedFrameObserver_onEncodedVideoFrameReceived', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'VideoEncodedFrameObserver_onEncodedVideoFrameReceived', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'VideoEncodedFrameObserver_onEncodedVideoFrameReceived'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onEncodedVideoFrameReceivedCompleter.isCompleted) { onEncodedVideoFrameReceivedCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaengine_videoframeobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaengine_videoframeobserver_testcases.generated.dart index 9bde32f5c..26726a41f 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaengine_videoframeobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaengine_videoframeobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onCaptureVideoFrame', + 'VideoFrameObserver.onCaptureVideoFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); final onCaptureVideoFrameCompleter = Completer(); @@ -42,6 +45,7 @@ void generatedTestCases(IrisTester irisTester) { VideoSourceType.videoSourceCameraPrimary; const VideoPixelFormat videoFrameType = VideoPixelFormat.videoPixelDefault; + const VideoFrameMetaInfo? videoFrameMetaInfo = null; const int videoFrameWidth = 10; const int videoFrameHeight = 10; const int videoFrameYStride = 10; @@ -79,6 +83,7 @@ void generatedTestCases(IrisTester irisTester) { matrix: videoFrameMatrix, alphaBuffer: videoFrameAlphaBuffer, pixelBuffer: videoFramePixelBuffer, + metaInfo: videoFrameMetaInfo, ); final eventJson = { @@ -86,17 +91,14 @@ void generatedTestCases(IrisTester irisTester) { 'videoFrame': videoFrame.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('VideoFrameObserver_onCaptureVideoFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'VideoFrameObserver_onCaptureVideoFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['VideoFrameObserver_onCaptureVideoFrame'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onCaptureVideoFrameCompleter.isCompleted) { onCaptureVideoFrameCompleter.complete(true); } @@ -121,13 +123,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPreEncodeVideoFrame', + 'VideoFrameObserver.onPreEncodeVideoFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); final onPreEncodeVideoFrameCompleter = Completer(); @@ -150,6 +153,7 @@ void generatedTestCases(IrisTester irisTester) { VideoSourceType.videoSourceCameraPrimary; const VideoPixelFormat videoFrameType = VideoPixelFormat.videoPixelDefault; + const VideoFrameMetaInfo? videoFrameMetaInfo = null; const int videoFrameWidth = 10; const int videoFrameHeight = 10; const int videoFrameYStride = 10; @@ -187,6 +191,7 @@ void generatedTestCases(IrisTester irisTester) { matrix: videoFrameMatrix, alphaBuffer: videoFrameAlphaBuffer, pixelBuffer: videoFramePixelBuffer, + metaInfo: videoFrameMetaInfo, ); final eventJson = { @@ -194,17 +199,14 @@ void generatedTestCases(IrisTester irisTester) { 'videoFrame': videoFrame.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('VideoFrameObserver_onPreEncodeVideoFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'VideoFrameObserver_onPreEncodeVideoFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['VideoFrameObserver_onPreEncodeVideoFrame'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPreEncodeVideoFrameCompleter.isCompleted) { onPreEncodeVideoFrameCompleter.complete(true); } @@ -229,13 +231,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onMediaPlayerVideoFrame', + 'VideoFrameObserver.onMediaPlayerVideoFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); final onMediaPlayerVideoFrameCompleter = Completer(); @@ -255,6 +258,7 @@ void generatedTestCases(IrisTester irisTester) { { const VideoPixelFormat videoFrameType = VideoPixelFormat.videoPixelDefault; + const VideoFrameMetaInfo? videoFrameMetaInfo = null; const int videoFrameWidth = 10; const int videoFrameHeight = 10; const int videoFrameYStride = 10; @@ -292,6 +296,7 @@ void generatedTestCases(IrisTester irisTester) { matrix: videoFrameMatrix, alphaBuffer: videoFrameAlphaBuffer, pixelBuffer: videoFramePixelBuffer, + metaInfo: videoFrameMetaInfo, ); const int mediaPlayerId = 10; @@ -300,17 +305,14 @@ void generatedTestCases(IrisTester irisTester) { 'mediaPlayerId': mediaPlayerId, }; - if (!kIsWeb) { - irisTester.fireEvent('VideoFrameObserver_onMediaPlayerVideoFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'VideoFrameObserver_onMediaPlayerVideoFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['VideoFrameObserver_onMediaPlayerVideoFrame'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onMediaPlayerVideoFrameCompleter.isCompleted) { onMediaPlayerVideoFrameCompleter.complete(true); } @@ -335,13 +337,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRenderVideoFrame', + 'VideoFrameObserver.onRenderVideoFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); final onRenderVideoFrameCompleter = Completer(); @@ -364,6 +367,7 @@ void generatedTestCases(IrisTester irisTester) { const int remoteUid = 10; const VideoPixelFormat videoFrameType = VideoPixelFormat.videoPixelDefault; + const VideoFrameMetaInfo? videoFrameMetaInfo = null; const int videoFrameWidth = 10; const int videoFrameHeight = 10; const int videoFrameYStride = 10; @@ -401,6 +405,7 @@ void generatedTestCases(IrisTester irisTester) { matrix: videoFrameMatrix, alphaBuffer: videoFrameAlphaBuffer, pixelBuffer: videoFramePixelBuffer, + metaInfo: videoFrameMetaInfo, ); final eventJson = { @@ -409,17 +414,14 @@ void generatedTestCases(IrisTester irisTester) { 'videoFrame': videoFrame.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('VideoFrameObserver_onRenderVideoFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'VideoFrameObserver_onRenderVideoFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['VideoFrameObserver_onRenderVideoFrame'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRenderVideoFrameCompleter.isCompleted) { onRenderVideoFrameCompleter.complete(true); } @@ -444,13 +446,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onTranscodedVideoFrame', + 'VideoFrameObserver.onTranscodedVideoFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); final onTranscodedVideoFrameCompleter = Completer(); @@ -470,6 +473,7 @@ void generatedTestCases(IrisTester irisTester) { { const VideoPixelFormat videoFrameType = VideoPixelFormat.videoPixelDefault; + const VideoFrameMetaInfo? videoFrameMetaInfo = null; const int videoFrameWidth = 10; const int videoFrameHeight = 10; const int videoFrameYStride = 10; @@ -507,23 +511,21 @@ void generatedTestCases(IrisTester irisTester) { matrix: videoFrameMatrix, alphaBuffer: videoFrameAlphaBuffer, pixelBuffer: videoFramePixelBuffer, + metaInfo: videoFrameMetaInfo, ); final eventJson = { 'videoFrame': videoFrame.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('VideoFrameObserver_onTranscodedVideoFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'VideoFrameObserver_onTranscodedVideoFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['VideoFrameObserver_onTranscodedVideoFrame'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onTranscodedVideoFrameCompleter.isCompleted) { onTranscodedVideoFrameCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiopcmframesink_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiopcmframesink_testcases.generated.dart index 927f26acb..15216a2f6 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiopcmframesink_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiopcmframesink_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onFrame', + 'AudioPcmFrameSink.onFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); MediaPlayerController mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -63,15 +66,13 @@ void generatedTestCases(IrisTester irisTester) { 'frame': frame.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('AudioPcmFrameSink_onFrame', params: eventJson); - } else { - final ret = irisTester.fireEvent('AudioPcmFrameSink_onFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping['AudioPcmFrameSink_onFrame'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onFrameCompleter.isCompleted) { onFrameCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiospectrumobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiospectrumobserver_testcases.generated.dart index ea096a42f..371bf28b1 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiospectrumobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaplayer_audiospectrumobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onLocalAudioSpectrum', + 'AudioSpectrumObserver.onLocalAudioSpectrum', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); MediaPlayerController mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -53,17 +56,14 @@ void generatedTestCases(IrisTester irisTester) { 'data': data.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('AudioSpectrumObserver_onLocalAudioSpectrum', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioSpectrumObserver_onLocalAudioSpectrum', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['AudioSpectrumObserver_onLocalAudioSpectrum'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLocalAudioSpectrumCompleter.isCompleted) { onLocalAudioSpectrumCompleter.complete(true); } @@ -88,13 +88,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteAudioSpectrum', + 'AudioSpectrumObserver.onRemoteAudioSpectrum', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); MediaPlayerController mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -125,17 +126,15 @@ void generatedTestCases(IrisTester irisTester) { 'spectrumNumber': spectrumNumber, }; - if (!kIsWeb) { - irisTester.fireEvent('AudioSpectrumObserver_onRemoteAudioSpectrum', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioSpectrumObserver_onRemoteAudioSpectrum', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['AudioSpectrumObserver_onRemoteAudioSpectrum'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteAudioSpectrumCompleter.isCompleted) { onRemoteAudioSpectrumCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaplayer_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaplayer_fake_test.generated.dart index babc3b35e..97f004b42 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaplayer_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaplayer_fake_test.generated.dart @@ -12,7 +12,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void mediaPlayerControllerSmokeTestCases() { testWidgets( - 'getMediaPlayerId', + 'MediaPlayer.getMediaPlayerId', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -22,6 +22,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -31,7 +32,7 @@ void mediaPlayerControllerSmokeTestCases() { mediaPlayerController.getMediaPlayerId(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getMediaPlayerId] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getMediaPlayerId] error: ${e.toString()}'); rethrow; } @@ -48,7 +49,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'open', + 'MediaPlayer.open', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -58,6 +59,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -72,7 +74,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[open] error: ${e.toString()}'); + debugPrint('[MediaPlayer.open] error: ${e.toString()}'); rethrow; } @@ -89,7 +91,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'openWithMediaSource', + 'MediaPlayer.openWithMediaSource', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -99,6 +101,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -110,6 +113,7 @@ void mediaPlayerControllerSmokeTestCases() { const int sourceStartPos = 10; const bool sourceAutoPlay = true; const bool sourceEnableCache = true; + const bool sourceEnableMultiAudioTrack = true; const bool sourceIsAgoraSource = true; const bool sourceIsLiveSource = true; const MediaSource source = MediaSource( @@ -118,6 +122,7 @@ void mediaPlayerControllerSmokeTestCases() { startPos: sourceStartPos, autoPlay: sourceAutoPlay, enableCache: sourceEnableCache, + enableMultiAudioTrack: sourceEnableMultiAudioTrack, isAgoraSource: sourceIsAgoraSource, isLiveSource: sourceIsLiveSource, ); @@ -126,7 +131,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[openWithMediaSource] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.openWithMediaSource] error: ${e.toString()}'); rethrow; } @@ -143,7 +149,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'play', + 'MediaPlayer.play', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -153,6 +159,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -162,7 +169,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.play(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[play] error: ${e.toString()}'); + debugPrint('[MediaPlayer.play] error: ${e.toString()}'); rethrow; } @@ -179,7 +186,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'pause', + 'MediaPlayer.pause', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -189,6 +196,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -198,7 +206,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.pause(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pause] error: ${e.toString()}'); + debugPrint('[MediaPlayer.pause] error: ${e.toString()}'); rethrow; } @@ -215,7 +223,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'stop', + 'MediaPlayer.stop', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -225,6 +233,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -234,7 +243,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.stop(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stop] error: ${e.toString()}'); + debugPrint('[MediaPlayer.stop] error: ${e.toString()}'); rethrow; } @@ -251,7 +260,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'resume', + 'MediaPlayer.resume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -261,6 +270,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -270,7 +280,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.resume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[resume] error: ${e.toString()}'); + debugPrint('[MediaPlayer.resume] error: ${e.toString()}'); rethrow; } @@ -287,7 +297,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'seek', + 'MediaPlayer.seek', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -297,6 +307,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -309,7 +320,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[seek] error: ${e.toString()}'); + debugPrint('[MediaPlayer.seek] error: ${e.toString()}'); rethrow; } @@ -326,7 +337,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setAudioPitch', + 'MediaPlayer.setAudioPitch', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -336,6 +347,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -348,7 +360,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioPitch] error: ${e.toString()}'); + debugPrint('[MediaPlayer.setAudioPitch] error: ${e.toString()}'); rethrow; } @@ -365,7 +377,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getDuration', + 'MediaPlayer.getDuration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -375,6 +387,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -384,7 +397,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getDuration(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getDuration] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getDuration] error: ${e.toString()}'); rethrow; } @@ -401,7 +414,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getPlayPosition', + 'MediaPlayer.getPlayPosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -411,6 +424,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -420,7 +434,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getPlayPosition(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlayPosition] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getPlayPosition] error: ${e.toString()}'); rethrow; } @@ -437,7 +451,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getStreamCount', + 'MediaPlayer.getStreamCount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -447,6 +461,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -456,7 +471,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getStreamCount(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getStreamCount] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getStreamCount] error: ${e.toString()}'); rethrow; } @@ -473,7 +488,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getStreamInfo', + 'MediaPlayer.getStreamInfo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -483,6 +498,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -495,7 +511,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getStreamInfo] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getStreamInfo] error: ${e.toString()}'); rethrow; } @@ -512,7 +528,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setLoopCount', + 'MediaPlayer.setLoopCount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -522,6 +538,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -534,7 +551,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLoopCount] error: ${e.toString()}'); + debugPrint('[MediaPlayer.setLoopCount] error: ${e.toString()}'); rethrow; } @@ -551,7 +568,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setPlaybackSpeed', + 'MediaPlayer.setPlaybackSpeed', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -561,6 +578,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -573,7 +591,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setPlaybackSpeed] error: ${e.toString()}'); + debugPrint('[MediaPlayer.setPlaybackSpeed] error: ${e.toString()}'); rethrow; } @@ -590,7 +608,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'selectAudioTrack', + 'MediaPlayer.selectAudioTrack', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -600,6 +618,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -612,7 +631,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[selectAudioTrack] error: ${e.toString()}'); + debugPrint('[MediaPlayer.selectAudioTrack] error: ${e.toString()}'); rethrow; } @@ -629,7 +648,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setPlayerOptionInInt', + 'MediaPlayer.selectMultiAudioTrack', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -639,6 +658,50 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final mediaPlayerController = MediaPlayerController( + rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); + await mediaPlayerController.initialize(); + + try { + const int playoutTrackIndex = 10; + const int publishTrackIndex = 10; + await mediaPlayerController.selectMultiAudioTrack( + playoutTrackIndex: playoutTrackIndex, + publishTrackIndex: publishTrackIndex, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[MediaPlayer.selectMultiAudioTrack] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await mediaPlayerController.dispose(); + await rtcEngine.release(); + }, +// skip: !(), + ); + + testWidgets( + 'MediaPlayer.setPlayerOptionInInt', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -653,7 +716,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setPlayerOptionInInt] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.setPlayerOptionInInt] error: ${e.toString()}'); rethrow; } @@ -670,7 +734,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setPlayerOptionInString', + 'MediaPlayer.setPlayerOptionInString', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -680,6 +744,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -694,7 +759,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setPlayerOptionInString] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.setPlayerOptionInString] error: ${e.toString()}'); rethrow; } @@ -711,7 +777,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'takeScreenshot', + 'MediaPlayer.takeScreenshot', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -721,6 +787,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -733,7 +800,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[takeScreenshot] error: ${e.toString()}'); + debugPrint('[MediaPlayer.takeScreenshot] error: ${e.toString()}'); rethrow; } @@ -750,7 +817,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'selectInternalSubtitle', + 'MediaPlayer.selectInternalSubtitle', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -760,6 +827,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -772,7 +840,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[selectInternalSubtitle] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.selectInternalSubtitle] error: ${e.toString()}'); rethrow; } @@ -789,7 +858,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setExternalSubtitle', + 'MediaPlayer.setExternalSubtitle', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -799,6 +868,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -811,7 +881,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setExternalSubtitle] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.setExternalSubtitle] error: ${e.toString()}'); rethrow; } @@ -828,7 +899,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getState', + 'MediaPlayer.getState', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -838,6 +909,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -847,7 +919,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getState(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getState] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getState] error: ${e.toString()}'); rethrow; } @@ -864,7 +936,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'mute', + 'MediaPlayer.mute', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -874,6 +946,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -886,7 +959,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[mute] error: ${e.toString()}'); + debugPrint('[MediaPlayer.mute] error: ${e.toString()}'); rethrow; } @@ -903,7 +976,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getMute', + 'MediaPlayer.getMute', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -913,6 +986,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -922,7 +996,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getMute(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getMute] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getMute] error: ${e.toString()}'); rethrow; } @@ -939,7 +1013,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'adjustPlayoutVolume', + 'MediaPlayer.adjustPlayoutVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -949,6 +1023,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -961,7 +1036,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustPlayoutVolume] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.adjustPlayoutVolume] error: ${e.toString()}'); rethrow; } @@ -978,7 +1054,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getPlayoutVolume', + 'MediaPlayer.getPlayoutVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -988,6 +1064,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -997,7 +1074,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getPlayoutVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlayoutVolume] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getPlayoutVolume] error: ${e.toString()}'); rethrow; } @@ -1014,7 +1091,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'adjustPublishSignalVolume', + 'MediaPlayer.adjustPublishSignalVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1024,6 +1101,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1036,7 +1114,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustPublishSignalVolume] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.adjustPublishSignalVolume] error: ${e.toString()}'); rethrow; } @@ -1053,7 +1132,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getPublishSignalVolume', + 'MediaPlayer.getPublishSignalVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1063,6 +1142,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1072,7 +1152,8 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getPublishSignalVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPublishSignalVolume] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.getPublishSignalVolume] error: ${e.toString()}'); rethrow; } @@ -1089,7 +1170,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setView', + 'MediaPlayer.setView', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1099,6 +1180,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1111,7 +1193,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setView] error: ${e.toString()}'); + debugPrint('[MediaPlayer.setView] error: ${e.toString()}'); rethrow; } @@ -1128,7 +1210,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setRenderMode', + 'MediaPlayer.setRenderMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1138,6 +1220,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1150,7 +1233,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRenderMode] error: ${e.toString()}'); + debugPrint('[MediaPlayer.setRenderMode] error: ${e.toString()}'); rethrow; } @@ -1167,7 +1250,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'registerPlayerSourceObserver', + 'MediaPlayer.registerPlayerSourceObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1177,6 +1260,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1185,8 +1269,8 @@ void mediaPlayerControllerSmokeTestCases() { try { final MediaPlayerSourceObserver observer = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) {}, - onPositionChanged: (int positionMs) {}, + (MediaPlayerState state, MediaPlayerReason reason) {}, + onPositionChanged: (int positionMs, int timestampMs) {}, onPlayerEvent: (MediaPlayerEvent eventCode, int elapsedTime, String message) {}, onMetaData: (Uint8List data, int length) {}, @@ -1196,6 +1280,8 @@ void mediaPlayerControllerSmokeTestCases() { onAgoraCDNTokenWillExpire: () {}, onPlayerSrcInfoChanged: (SrcInfo from, SrcInfo to) {}, onPlayerInfoUpdated: (PlayerUpdatedInfo info) {}, + onPlayerCacheStats: (CacheStatistics stats) {}, + onPlayerPlaybackStats: (PlayerPlaybackStats stats) {}, onAudioVolumeIndication: (int volume) {}, ); mediaPlayerController.registerPlayerSourceObserver( @@ -1203,7 +1289,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerPlayerSourceObserver] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.registerPlayerSourceObserver] error: ${e.toString()}'); rethrow; } @@ -1220,7 +1307,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'unregisterPlayerSourceObserver', + 'MediaPlayer.unregisterPlayerSourceObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1230,6 +1317,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1238,8 +1326,8 @@ void mediaPlayerControllerSmokeTestCases() { try { final MediaPlayerSourceObserver observer = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) {}, - onPositionChanged: (int positionMs) {}, + (MediaPlayerState state, MediaPlayerReason reason) {}, + onPositionChanged: (int positionMs, int timestampMs) {}, onPlayerEvent: (MediaPlayerEvent eventCode, int elapsedTime, String message) {}, onMetaData: (Uint8List data, int length) {}, @@ -1249,6 +1337,8 @@ void mediaPlayerControllerSmokeTestCases() { onAgoraCDNTokenWillExpire: () {}, onPlayerSrcInfoChanged: (SrcInfo from, SrcInfo to) {}, onPlayerInfoUpdated: (PlayerUpdatedInfo info) {}, + onPlayerCacheStats: (CacheStatistics stats) {}, + onPlayerPlaybackStats: (PlayerPlaybackStats stats) {}, onAudioVolumeIndication: (int volume) {}, ); mediaPlayerController.unregisterPlayerSourceObserver( @@ -1256,7 +1346,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unregisterPlayerSourceObserver] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.unregisterPlayerSourceObserver] error: ${e.toString()}'); rethrow; } @@ -1273,7 +1364,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'registerAudioFrameObserver', + 'MediaPlayer.registerAudioFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1283,6 +1374,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1300,7 +1392,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerAudioFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.registerAudioFrameObserver] error: ${e.toString()}'); rethrow; } @@ -1317,7 +1410,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'unregisterAudioFrameObserver', + 'MediaPlayer.unregisterAudioFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1327,6 +1420,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1341,7 +1435,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unregisterAudioFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.unregisterAudioFrameObserver] error: ${e.toString()}'); rethrow; } @@ -1358,7 +1453,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'registerVideoFrameObserver', + 'MediaPlayer.registerVideoFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1368,6 +1463,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1383,7 +1479,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerVideoFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.registerVideoFrameObserver] error: ${e.toString()}'); rethrow; } @@ -1400,7 +1497,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'unregisterVideoFrameObserver', + 'MediaPlayer.unregisterVideoFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1410,6 +1507,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1425,7 +1523,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unregisterVideoFrameObserver] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.unregisterVideoFrameObserver] error: ${e.toString()}'); rethrow; } @@ -1442,7 +1541,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'registerMediaPlayerAudioSpectrumObserver', + 'MediaPlayer.registerMediaPlayerAudioSpectrumObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1452,6 +1551,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1470,7 +1570,7 @@ void mediaPlayerControllerSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[registerMediaPlayerAudioSpectrumObserver] error: ${e.toString()}'); + '[MediaPlayer.registerMediaPlayerAudioSpectrumObserver] error: ${e.toString()}'); rethrow; } @@ -1487,7 +1587,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'unregisterMediaPlayerAudioSpectrumObserver', + 'MediaPlayer.unregisterMediaPlayerAudioSpectrumObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1497,6 +1597,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1513,7 +1614,7 @@ void mediaPlayerControllerSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[unregisterMediaPlayerAudioSpectrumObserver] error: ${e.toString()}'); + '[MediaPlayer.unregisterMediaPlayerAudioSpectrumObserver] error: ${e.toString()}'); rethrow; } @@ -1530,7 +1631,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setAudioDualMonoMode', + 'MediaPlayer.setAudioDualMonoMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1540,6 +1641,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1552,7 +1654,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioDualMonoMode] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.setAudioDualMonoMode] error: ${e.toString()}'); rethrow; } @@ -1569,7 +1672,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getPlayerSdkVersion', + 'MediaPlayer.getPlayerSdkVersion', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1579,6 +1682,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1588,7 +1692,8 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getPlayerSdkVersion(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlayerSdkVersion] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.getPlayerSdkVersion] error: ${e.toString()}'); rethrow; } @@ -1605,7 +1710,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getPlaySrc', + 'MediaPlayer.getPlaySrc', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1615,6 +1720,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1624,7 +1730,7 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getPlaySrc(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getPlaySrc] error: ${e.toString()}'); + debugPrint('[MediaPlayer.getPlaySrc] error: ${e.toString()}'); rethrow; } @@ -1641,7 +1747,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'openWithAgoraCDNSrc', + 'MediaPlayer.openWithAgoraCDNSrc', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1651,6 +1757,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1665,7 +1772,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[openWithAgoraCDNSrc] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.openWithAgoraCDNSrc] error: ${e.toString()}'); rethrow; } @@ -1682,7 +1790,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getAgoraCDNLineCount', + 'MediaPlayer.getAgoraCDNLineCount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1692,6 +1800,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1701,7 +1810,8 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getAgoraCDNLineCount(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAgoraCDNLineCount] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.getAgoraCDNLineCount] error: ${e.toString()}'); rethrow; } @@ -1718,7 +1828,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'switchAgoraCDNLineByIndex', + 'MediaPlayer.switchAgoraCDNLineByIndex', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1728,6 +1838,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1740,7 +1851,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[switchAgoraCDNLineByIndex] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.switchAgoraCDNLineByIndex] error: ${e.toString()}'); rethrow; } @@ -1757,7 +1869,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'getCurrentAgoraCDNIndex', + 'MediaPlayer.getCurrentAgoraCDNIndex', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1767,6 +1879,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1776,7 +1889,8 @@ void mediaPlayerControllerSmokeTestCases() { await mediaPlayerController.getCurrentAgoraCDNIndex(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getCurrentAgoraCDNIndex] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.getCurrentAgoraCDNIndex] error: ${e.toString()}'); rethrow; } @@ -1793,7 +1907,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'enableAutoSwitchAgoraCDN', + 'MediaPlayer.enableAutoSwitchAgoraCDN', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1803,6 +1917,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1815,7 +1930,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableAutoSwitchAgoraCDN] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.enableAutoSwitchAgoraCDN] error: ${e.toString()}'); rethrow; } @@ -1832,7 +1948,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'renewAgoraCDNSrcToken', + 'MediaPlayer.renewAgoraCDNSrcToken', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1842,6 +1958,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1856,7 +1973,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[renewAgoraCDNSrcToken] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.renewAgoraCDNSrcToken] error: ${e.toString()}'); rethrow; } @@ -1873,7 +1991,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'switchAgoraCDNSrc', + 'MediaPlayer.switchAgoraCDNSrc', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1883,6 +2001,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1897,7 +2016,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[switchAgoraCDNSrc] error: ${e.toString()}'); + debugPrint('[MediaPlayer.switchAgoraCDNSrc] error: ${e.toString()}'); rethrow; } @@ -1914,7 +2033,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'switchSrc', + 'MediaPlayer.switchSrc', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1924,6 +2043,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1938,7 +2058,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[switchSrc] error: ${e.toString()}'); + debugPrint('[MediaPlayer.switchSrc] error: ${e.toString()}'); rethrow; } @@ -1955,7 +2075,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'preloadSrc', + 'MediaPlayer.preloadSrc', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1965,6 +2085,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -1979,7 +2100,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[preloadSrc] error: ${e.toString()}'); + debugPrint('[MediaPlayer.preloadSrc] error: ${e.toString()}'); rethrow; } @@ -1996,7 +2117,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'playPreloadedSrc', + 'MediaPlayer.playPreloadedSrc', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2006,6 +2127,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -2018,7 +2140,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[playPreloadedSrc] error: ${e.toString()}'); + debugPrint('[MediaPlayer.playPreloadedSrc] error: ${e.toString()}'); rethrow; } @@ -2035,7 +2157,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'unloadSrc', + 'MediaPlayer.unloadSrc', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2045,6 +2167,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -2057,7 +2180,7 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unloadSrc] error: ${e.toString()}'); + debugPrint('[MediaPlayer.unloadSrc] error: ${e.toString()}'); rethrow; } @@ -2074,7 +2197,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setSpatialAudioParams', + 'MediaPlayer.setSpatialAudioParams', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2084,6 +2207,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -2113,7 +2237,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setSpatialAudioParams] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.setSpatialAudioParams] error: ${e.toString()}'); rethrow; } @@ -2130,7 +2255,7 @@ void mediaPlayerControllerSmokeTestCases() { ); testWidgets( - 'setSoundPositionParams', + 'MediaPlayer.setSoundPositionParams', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2140,6 +2265,7 @@ void mediaPlayerControllerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -2154,7 +2280,8 @@ void mediaPlayerControllerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setSoundPositionParams] error: ${e.toString()}'); + debugPrint( + '[MediaPlayer.setSoundPositionParams] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayersourceobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayersourceobserver_testcases.generated.dart index f1790b310..05cf3b944 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayersourceobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayersourceobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onPlayerSourceStateChanged', + 'MediaPlayerSourceObserver.onPlayerSourceStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -27,7 +30,7 @@ void generatedTestCases(IrisTester irisTester) { final onPlayerSourceStateChangedCompleter = Completer(); final theMediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) { + (MediaPlayerState state, MediaPlayerReason reason) { onPlayerSourceStateChangedCompleter.complete(true); }, ); @@ -41,25 +44,22 @@ void generatedTestCases(IrisTester irisTester) { { const MediaPlayerState state = MediaPlayerState.playerStateIdle; - const MediaPlayerError ec = MediaPlayerError.playerErrorNone; + const MediaPlayerReason reason = MediaPlayerReason.playerReasonNone; final eventJson = { 'state': state.value(), - 'ec': ec.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPlayerSourceStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPlayerSourceStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'MediaPlayerSourceObserver_onPlayerSourceStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPlayerSourceStateChangedCompleter.isCompleted) { onPlayerSourceStateChangedCompleter.complete(true); } @@ -84,20 +84,21 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPositionChanged', + 'MediaPlayerSourceObserver.onPositionChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); final onPositionChangedCompleter = Completer(); final theMediaPlayerSourceObserver = MediaPlayerSourceObserver( - onPositionChanged: (int positionMs) { + onPositionChanged: (int positionMs, int timestampMs) { onPositionChangedCompleter.complete(true); }, ); @@ -111,22 +112,22 @@ void generatedTestCases(IrisTester irisTester) { { const int positionMs = 10; + const int timestampMs = 10; final eventJson = { 'positionMs': positionMs, + 'timestampMs': timestampMs, }; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerSourceObserver_onPositionChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPositionChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onPositionChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPositionChangedCompleter.isCompleted) { onPositionChangedCompleter.complete(true); } @@ -151,13 +152,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPlayerEvent', + 'MediaPlayerSourceObserver.onPlayerEvent', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -189,17 +191,14 @@ void generatedTestCases(IrisTester irisTester) { 'message': message, }; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerSourceObserver_onPlayerEvent', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPlayerEvent', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onPlayerEvent'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPlayerEventCompleter.isCompleted) { onPlayerEventCompleter.complete(true); } @@ -224,13 +223,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onMetaData', + 'MediaPlayerSourceObserver.onMetaData', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -258,17 +258,14 @@ void generatedTestCases(IrisTester irisTester) { 'length': length, }; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerSourceObserver_onMetaData', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onMetaData', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onMetaData'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onMetaDataCompleter.isCompleted) { onMetaDataCompleter.complete(true); } @@ -293,13 +290,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPlayBufferUpdated', + 'MediaPlayerSourceObserver.onPlayBufferUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -325,17 +323,15 @@ void generatedTestCases(IrisTester irisTester) { 'playCachedBuffer': playCachedBuffer, }; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerSourceObserver_onPlayBufferUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPlayBufferUpdated', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onPlayBufferUpdated'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPlayBufferUpdatedCompleter.isCompleted) { onPlayBufferUpdatedCompleter.complete(true); } @@ -360,13 +356,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPreloadEvent', + 'MediaPlayerSourceObserver.onPreloadEvent', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -395,17 +392,14 @@ void generatedTestCases(IrisTester irisTester) { 'event': event.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerSourceObserver_onPreloadEvent', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPreloadEvent', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onPreloadEvent'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPreloadEventCompleter.isCompleted) { onPreloadEventCompleter.complete(true); } @@ -430,13 +424,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onCompleted', + 'MediaPlayerSourceObserver.onCompleted', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -458,17 +453,14 @@ void generatedTestCases(IrisTester irisTester) { { final eventJson = {}; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerSourceObserver_onCompleted', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onCompleted', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onCompleted'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onCompletedCompleter.isCompleted) { onCompletedCompleter.complete(true); } @@ -493,13 +485,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAgoraCDNTokenWillExpire', + 'MediaPlayerSourceObserver.onAgoraCDNTokenWillExpire', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -521,18 +514,15 @@ void generatedTestCases(IrisTester irisTester) { { final eventJson = {}; - if (!kIsWeb) { - irisTester.fireEvent( - 'MediaPlayerSourceObserver_onAgoraCDNTokenWillExpire', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onAgoraCDNTokenWillExpire', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'MediaPlayerSourceObserver_onAgoraCDNTokenWillExpire'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAgoraCDNTokenWillExpireCompleter.isCompleted) { onAgoraCDNTokenWillExpireCompleter.complete(true); } @@ -557,13 +547,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPlayerSrcInfoChanged', + 'MediaPlayerSourceObserver.onPlayerSrcInfoChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -601,18 +592,15 @@ void generatedTestCases(IrisTester irisTester) { 'to': to.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPlayerSrcInfoChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPlayerSrcInfoChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'MediaPlayerSourceObserver_onPlayerSrcInfoChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPlayerSrcInfoChangedCompleter.isCompleted) { onPlayerSrcInfoChangedCompleter.complete(true); } @@ -637,13 +625,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPlayerInfoUpdated', + 'MediaPlayerSourceObserver.onPlayerInfoUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -663,37 +652,36 @@ void generatedTestCases(IrisTester irisTester) { await Future.delayed(const Duration(milliseconds: 500)); { - const int cacheStatisticsFileSize = 10; - const int cacheStatisticsCacheSize = 10; - const int cacheStatisticsDownloadSize = 10; - const CacheStatistics infoCacheStatistics = CacheStatistics( - fileSize: cacheStatisticsFileSize, - cacheSize: cacheStatisticsCacheSize, - downloadSize: cacheStatisticsDownloadSize, - ); - const String infoPlayerId = "hello"; + const String infoInternalPlayerUuid = "hello"; const String infoDeviceId = "hello"; + const int infoVideoHeight = 10; + const int infoVideoWidth = 10; + const int infoAudioSampleRate = 10; + const int infoAudioChannels = 10; + const int infoAudioBitsPerSample = 10; const PlayerUpdatedInfo info = PlayerUpdatedInfo( - playerId: infoPlayerId, + internalPlayerUuid: infoInternalPlayerUuid, deviceId: infoDeviceId, - cacheStatistics: infoCacheStatistics, + videoHeight: infoVideoHeight, + videoWidth: infoVideoWidth, + audioSampleRate: infoAudioSampleRate, + audioChannels: infoAudioChannels, + audioBitsPerSample: infoAudioBitsPerSample, ); final eventJson = { 'info': info.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerSourceObserver_onPlayerInfoUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onPlayerInfoUpdated', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onPlayerInfoUpdated'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPlayerInfoUpdatedCompleter.isCompleted) { onPlayerInfoUpdatedCompleter.complete(true); } @@ -718,13 +706,162 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioVolumeIndication', + 'MediaPlayerSourceObserver.onPlayerCacheStats', + (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + final mediaPlayerController = MediaPlayerController( + rtcEngine: rtcEngine, canvas: const VideoCanvas()); + await mediaPlayerController.initialize(); + + final onPlayerCacheStatsCompleter = Completer(); + final theMediaPlayerSourceObserver = MediaPlayerSourceObserver( + onPlayerCacheStats: (CacheStatistics stats) { + onPlayerCacheStatsCompleter.complete(true); + }, + ); + + mediaPlayerController.registerPlayerSourceObserver( + theMediaPlayerSourceObserver, + ); + +// Delay 500 milliseconds to ensure the registerPlayerSourceObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const int statsFileSize = 10; + const int statsCacheSize = 10; + const int statsDownloadSize = 10; + const CacheStatistics stats = CacheStatistics( + fileSize: statsFileSize, + cacheSize: statsCacheSize, + downloadSize: statsDownloadSize, + ); + + final eventJson = { + 'stats': stats.toJson(), + }; + + final eventIds = + eventIdsMapping['MediaPlayerSourceObserver_onPlayerCacheStats'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onPlayerCacheStatsCompleter.isCompleted) { + onPlayerCacheStatsCompleter.complete(true); + } + } + } + } + + final eventCalled = await onPlayerCacheStatsCompleter.future; + expect(eventCalled, isTrue); + + { + mediaPlayerController.unregisterPlayerSourceObserver( + theMediaPlayerSourceObserver, + ); + } +// Delay 500 milliseconds to ensure the unregisterPlayerSourceObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), + ); + + testWidgets( + 'MediaPlayerSourceObserver.onPlayerPlaybackStats', + (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + final mediaPlayerController = MediaPlayerController( + rtcEngine: rtcEngine, canvas: const VideoCanvas()); + await mediaPlayerController.initialize(); + + final onPlayerPlaybackStatsCompleter = Completer(); + final theMediaPlayerSourceObserver = MediaPlayerSourceObserver( + onPlayerPlaybackStats: (PlayerPlaybackStats stats) { + onPlayerPlaybackStatsCompleter.complete(true); + }, + ); + + mediaPlayerController.registerPlayerSourceObserver( + theMediaPlayerSourceObserver, + ); + +// Delay 500 milliseconds to ensure the registerPlayerSourceObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const int statsVideoFps = 10; + const int statsVideoBitrateInKbps = 10; + const int statsAudioBitrateInKbps = 10; + const int statsTotalBitrateInKbps = 10; + const PlayerPlaybackStats stats = PlayerPlaybackStats( + videoFps: statsVideoFps, + videoBitrateInKbps: statsVideoBitrateInKbps, + audioBitrateInKbps: statsAudioBitrateInKbps, + totalBitrateInKbps: statsTotalBitrateInKbps, + ); + + final eventJson = { + 'stats': stats.toJson(), + }; + + final eventIds = eventIdsMapping[ + 'MediaPlayerSourceObserver_onPlayerPlaybackStats'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onPlayerPlaybackStatsCompleter.isCompleted) { + onPlayerPlaybackStatsCompleter.complete(true); + } + } + } + } + + final eventCalled = await onPlayerPlaybackStatsCompleter.future; + expect(eventCalled, isTrue); + + { + mediaPlayerController.unregisterPlayerSourceObserver( + theMediaPlayerSourceObserver, + ); + } +// Delay 500 milliseconds to ensure the unregisterPlayerSourceObserver call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), + ); + + testWidgets( + 'MediaPlayerSourceObserver.onAudioVolumeIndication', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -750,18 +887,15 @@ void generatedTestCases(IrisTester irisTester) { 'volume': volume, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'MediaPlayerSourceObserver_onAudioVolumeIndication', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerSourceObserver_onAudioVolumeIndication', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'MediaPlayerSourceObserver_onAudioVolumeIndication'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioVolumeIndicationCompleter.isCompleted) { onAudioVolumeIndicationCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayervideoframeobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayervideoframeobserver_testcases.generated.dart index 7431a2311..448db927f 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayervideoframeobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediaplayer_mediaplayervideoframeobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onFrame', + 'MediaPlayerVideoFrameObserver.onFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); MediaPlayerController mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -40,6 +43,7 @@ void generatedTestCases(IrisTester irisTester) { { const VideoPixelFormat frameType = VideoPixelFormat.videoPixelDefault; + const VideoFrameMetaInfo? frameMetaInfo = null; const int frameWidth = 10; const int frameHeight = 10; const int frameYStride = 10; @@ -76,23 +80,21 @@ void generatedTestCases(IrisTester irisTester) { matrix: frameMatrix, alphaBuffer: frameAlphaBuffer, pixelBuffer: framePixelBuffer, + metaInfo: frameMetaInfo, ); final eventJson = { 'frame': frame.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('MediaPlayerVideoFrameObserver_onFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaPlayerVideoFrameObserver_onFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaPlayerVideoFrameObserver_onFrame'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onFrameCompleter.isCompleted) { onFrameCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/mediarecorder_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediarecorder_fake_test.generated.dart index 801027bd0..cb46afd71 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediarecorder_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediarecorder_fake_test.generated.dart @@ -11,7 +11,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void mediaRecorderSmokeTestCases() { testWidgets( - 'setMediaRecorderObserver', + 'MediaRecorder.setMediaRecorderObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -21,6 +21,7 @@ void mediaRecorderSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaRecorder = (await rtcEngine.createMediaRecorder( RecorderStreamInfo(channelId: 'hello', uid: 0)))!; @@ -28,7 +29,7 @@ void mediaRecorderSmokeTestCases() { try { final MediaRecorderObserver callback = MediaRecorderObserver( onRecorderStateChanged: (String channelId, int uid, - RecorderState state, RecorderErrorCode error) {}, + RecorderState state, RecorderReasonCode reason) {}, onRecorderInfoUpdated: (String channelId, int uid, RecorderInfo info) {}, ); @@ -37,7 +38,8 @@ void mediaRecorderSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setMediaRecorderObserver] error: ${e.toString()}'); + debugPrint( + '[MediaRecorder.setMediaRecorderObserver] error: ${e.toString()}'); rethrow; } @@ -54,7 +56,7 @@ void mediaRecorderSmokeTestCases() { ); testWidgets( - 'startRecording', + 'MediaRecorder.startRecording', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -64,6 +66,7 @@ void mediaRecorderSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaRecorder = (await rtcEngine.createMediaRecorder( RecorderStreamInfo(channelId: 'hello', uid: 0)))!; @@ -88,7 +91,7 @@ void mediaRecorderSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startRecording] error: ${e.toString()}'); + debugPrint('[MediaRecorder.startRecording] error: ${e.toString()}'); rethrow; } @@ -105,7 +108,7 @@ void mediaRecorderSmokeTestCases() { ); testWidgets( - 'stopRecording', + 'MediaRecorder.stopRecording', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -115,6 +118,7 @@ void mediaRecorderSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaRecorder = (await rtcEngine.createMediaRecorder( RecorderStreamInfo(channelId: 'hello', uid: 0)))!; @@ -123,7 +127,7 @@ void mediaRecorderSmokeTestCases() { await mediaRecorder.stopRecording(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopRecording] error: ${e.toString()}'); + debugPrint('[MediaRecorder.stopRecording] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/mediarecorder_mediarecorderobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/mediarecorder_mediarecorderobserver_testcases.generated.dart index d6d31e1ae..5848892b2 100644 --- a/test_shard/fake_test_app/integration_test/generated/mediarecorder_mediarecorderobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/mediarecorder_mediarecorderobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onRecorderStateChanged', + 'MediaRecorderObserver.onRecorderStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaRecorder = (await rtcEngine.createMediaRecorder( RecorderStreamInfo(channelId: 'hello', uid: 0)))!; @@ -27,7 +30,7 @@ void generatedTestCases(IrisTester irisTester) { final onRecorderStateChangedCompleter = Completer(); final theMediaRecorderObserver = MediaRecorderObserver( onRecorderStateChanged: (String channelId, int uid, RecorderState state, - RecorderErrorCode error) { + RecorderReasonCode reason) { onRecorderStateChangedCompleter.complete(true); }, ); @@ -43,26 +46,24 @@ void generatedTestCases(IrisTester irisTester) { const String channelId = "hello"; const int uid = 10; const RecorderState state = RecorderState.recorderStateError; - const RecorderErrorCode error = RecorderErrorCode.recorderErrorNone; + const RecorderReasonCode reason = RecorderReasonCode.recorderReasonNone; final eventJson = { 'channelId': channelId, 'uid': uid, 'state': state.value(), - 'error': error.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('MediaRecorderObserver_onRecorderStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaRecorderObserver_onRecorderStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaRecorderObserver_onRecorderStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRecorderStateChangedCompleter.isCompleted) { onRecorderStateChangedCompleter.complete(true); } @@ -84,13 +85,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRecorderInfoUpdated', + 'MediaRecorderObserver.onRecorderInfoUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaRecorder = (await rtcEngine.createMediaRecorder( RecorderStreamInfo(channelId: 'hello', uid: 0)))!; @@ -127,17 +129,15 @@ void generatedTestCases(IrisTester irisTester) { 'info': info.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('MediaRecorderObserver_onRecorderInfoUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MediaRecorderObserver_onRecorderInfoUpdated', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MediaRecorderObserver_onRecorderInfoUpdated'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRecorderInfoUpdatedCompleter.isCompleted) { onRecorderInfoUpdatedCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart index 98eb43f8f..5d170e6e8 100644 --- a/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_fake_test.generated.dart @@ -11,7 +11,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void musicContentCenterSmokeTestCases() { testWidgets( - 'initialize', + 'MusicContentCenter.initialize', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -21,6 +21,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -43,7 +44,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[initialize] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.initialize] error: ${e.toString()}'); rethrow; } @@ -60,7 +61,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'renewToken', + 'MusicContentCenter.renewToken', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -70,6 +71,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -80,7 +82,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[renewToken] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.renewToken] error: ${e.toString()}'); rethrow; } @@ -97,7 +99,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'release', + 'MusicContentCenter.release', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -107,6 +109,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -114,7 +117,7 @@ void musicContentCenterSmokeTestCases() { await musicContentCenter.release(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[release] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.release] error: ${e.toString()}'); rethrow; } @@ -131,7 +134,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'registerEventHandler', + 'MusicContentCenter.registerEventHandler', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -141,6 +144,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -148,26 +152,27 @@ void musicContentCenterSmokeTestCases() { final MusicContentCenterEventHandler eventHandler = MusicContentCenterEventHandler( onMusicChartsResult: (String requestId, List result, - MusicContentCenterStatusCode errorCode) {}, + MusicContentCenterStateReason reason) {}, onMusicCollectionResult: (String requestId, MusicCollection result, - MusicContentCenterStatusCode errorCode) {}, + MusicContentCenterStateReason reason) {}, onLyricResult: (String requestId, int songCode, String lyricUrl, - MusicContentCenterStatusCode errorCode) {}, + MusicContentCenterStateReason reason) {}, onSongSimpleInfoResult: (String requestId, int songCode, - String simpleInfo, MusicContentCenterStatusCode errorCode) {}, + String simpleInfo, MusicContentCenterStateReason reason) {}, onPreLoadEvent: (String requestId, int songCode, int percent, String lyricUrl, - PreloadStatusCode status, - MusicContentCenterStatusCode errorCode) {}, + PreloadState state, + MusicContentCenterStateReason reason) {}, ); musicContentCenter.registerEventHandler( eventHandler, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerEventHandler] error: ${e.toString()}'); + debugPrint( + '[MusicContentCenter.registerEventHandler] error: ${e.toString()}'); rethrow; } @@ -184,7 +189,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'unregisterEventHandler', + 'MusicContentCenter.unregisterEventHandler', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -194,6 +199,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -201,7 +207,8 @@ void musicContentCenterSmokeTestCases() { musicContentCenter.unregisterEventHandler(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unregisterEventHandler] error: ${e.toString()}'); + debugPrint( + '[MusicContentCenter.unregisterEventHandler] error: ${e.toString()}'); rethrow; } @@ -218,7 +225,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'getMusicCharts', + 'MusicContentCenter.getMusicCharts', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -228,6 +235,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -235,7 +243,8 @@ void musicContentCenterSmokeTestCases() { await musicContentCenter.getMusicCharts(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getMusicCharts] error: ${e.toString()}'); + debugPrint( + '[MusicContentCenter.getMusicCharts] error: ${e.toString()}'); rethrow; } @@ -252,7 +261,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'getMusicCollectionByMusicChartId', + 'MusicContentCenter.getMusicCollectionByMusicChartId', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -262,6 +271,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -279,7 +289,7 @@ void musicContentCenterSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[getMusicCollectionByMusicChartId] error: ${e.toString()}'); + '[MusicContentCenter.getMusicCollectionByMusicChartId] error: ${e.toString()}'); rethrow; } @@ -296,7 +306,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'searchMusic', + 'MusicContentCenter.searchMusic', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -306,6 +316,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -322,7 +333,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[searchMusic] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.searchMusic] error: ${e.toString()}'); rethrow; } @@ -339,7 +350,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'preload', + 'MusicContentCenter.preload', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -349,6 +360,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -359,7 +371,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[preload] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.preload] error: ${e.toString()}'); rethrow; } @@ -376,7 +388,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'removeCache', + 'MusicContentCenter.removeCache', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -386,6 +398,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -396,7 +409,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[removeCache] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.removeCache] error: ${e.toString()}'); rethrow; } @@ -413,7 +426,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'getCaches', + 'MusicContentCenter.getCaches', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -423,6 +436,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -433,7 +447,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getCaches] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.getCaches] error: ${e.toString()}'); rethrow; } @@ -450,7 +464,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'isPreloaded', + 'MusicContentCenter.isPreloaded', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -460,6 +474,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -470,7 +485,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isPreloaded] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.isPreloaded] error: ${e.toString()}'); rethrow; } @@ -487,7 +502,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'getLyric', + 'MusicContentCenter.getLyric', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -497,6 +512,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -509,7 +525,7 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getLyric] error: ${e.toString()}'); + debugPrint('[MusicContentCenter.getLyric] error: ${e.toString()}'); rethrow; } @@ -526,7 +542,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'getSongSimpleInfo', + 'MusicContentCenter.getSongSimpleInfo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -536,6 +552,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -546,7 +563,8 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getSongSimpleInfo] error: ${e.toString()}'); + debugPrint( + '[MusicContentCenter.getSongSimpleInfo] error: ${e.toString()}'); rethrow; } @@ -563,7 +581,7 @@ void musicContentCenterSmokeTestCases() { ); testWidgets( - 'getInternalSongCode', + 'MusicContentCenter.getInternalSongCode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -573,6 +591,7 @@ void musicContentCenterSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); @@ -585,7 +604,8 @@ void musicContentCenterSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getInternalSongCode] error: ${e.toString()}'); + debugPrint( + '[MusicContentCenter.getInternalSongCode] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_musiccontentcentereventhandler_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_musiccontentcentereventhandler_testcases.generated.dart index 4cd06067c..91a10ae02 100644 --- a/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_musiccontentcentereventhandler_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/musiccontentcenter_musiccontentcentereventhandler_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onMusicChartsResult', + 'MusicContentCenterEventHandler.onMusicChartsResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); const musicContentCenterConfiguration = MusicContentCenterConfiguration( @@ -29,7 +32,7 @@ void generatedTestCases(IrisTester irisTester) { final onMusicChartsResultCompleter = Completer(); final theMusicContentCenterEventHandler = MusicContentCenterEventHandler( onMusicChartsResult: (String requestId, List result, - MusicContentCenterStatusCode errorCode) { + MusicContentCenterStateReason reason) { onMusicChartsResultCompleter.complete(true); }, ); @@ -44,27 +47,24 @@ void generatedTestCases(IrisTester irisTester) { { const String requestId = "hello"; const List result = []; - const MusicContentCenterStatusCode errorCode = - MusicContentCenterStatusCode.kMusicContentCenterStatusOk; + const MusicContentCenterStateReason reason = + MusicContentCenterStateReason.kMusicContentCenterReasonOk; final eventJson = { 'requestId': requestId, 'result': result, - 'errorCode': errorCode.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'MusicContentCenterEventHandler_onMusicChartsResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MusicContentCenterEventHandler_onMusicChartsResult', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'MusicContentCenterEventHandler_onMusicChartsResult'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onMusicChartsResultCompleter.isCompleted) { onMusicChartsResultCompleter.complete(true); } @@ -88,13 +88,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onMusicCollectionResult', + 'MusicContentCenterEventHandler.onMusicCollectionResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); const musicContentCenterConfiguration = MusicContentCenterConfiguration( @@ -104,7 +105,7 @@ void generatedTestCases(IrisTester irisTester) { final onMusicCollectionResultCompleter = Completer(); final theMusicContentCenterEventHandler = MusicContentCenterEventHandler( onMusicCollectionResult: (String requestId, MusicCollection result, - MusicContentCenterStatusCode errorCode) { + MusicContentCenterStateReason reason) { onMusicCollectionResultCompleter.complete(true); }, ); @@ -118,26 +119,24 @@ void generatedTestCases(IrisTester irisTester) { { const String requestId = "hello"; - const MusicContentCenterStatusCode errorCode = - MusicContentCenterStatusCode.kMusicContentCenterStatusOk; + const MusicCollection? result = null; + const MusicContentCenterStateReason reason = + MusicContentCenterStateReason.kMusicContentCenterReasonOk; final eventJson = { 'requestId': requestId, - 'errorCode': errorCode.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'MusicContentCenterEventHandler_onMusicCollectionResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MusicContentCenterEventHandler_onMusicCollectionResult', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'MusicContentCenterEventHandler_onMusicCollectionResult'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onMusicCollectionResultCompleter.isCompleted) { onMusicCollectionResultCompleter.complete(true); } @@ -161,13 +160,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLyricResult', + 'MusicContentCenterEventHandler.onLyricResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); const musicContentCenterConfiguration = MusicContentCenterConfiguration( @@ -177,7 +177,7 @@ void generatedTestCases(IrisTester irisTester) { final onLyricResultCompleter = Completer(); final theMusicContentCenterEventHandler = MusicContentCenterEventHandler( onLyricResult: (String requestId, int songCode, String lyricUrl, - MusicContentCenterStatusCode errorCode) { + MusicContentCenterStateReason reason) { onLyricResultCompleter.complete(true); }, ); @@ -193,27 +193,25 @@ void generatedTestCases(IrisTester irisTester) { const String requestId = "hello"; const int songCode = 10; const String lyricUrl = "hello"; - const MusicContentCenterStatusCode errorCode = - MusicContentCenterStatusCode.kMusicContentCenterStatusOk; + const MusicContentCenterStateReason reason = + MusicContentCenterStateReason.kMusicContentCenterReasonOk; final eventJson = { 'requestId': requestId, 'songCode': songCode, 'lyricUrl': lyricUrl, - 'errorCode': errorCode.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('MusicContentCenterEventHandler_onLyricResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MusicContentCenterEventHandler_onLyricResult', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MusicContentCenterEventHandler_onLyricResult'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLyricResultCompleter.isCompleted) { onLyricResultCompleter.complete(true); } @@ -237,13 +235,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onSongSimpleInfoResult', + 'MusicContentCenterEventHandler.onSongSimpleInfoResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); const musicContentCenterConfiguration = MusicContentCenterConfiguration( @@ -253,7 +252,7 @@ void generatedTestCases(IrisTester irisTester) { final onSongSimpleInfoResultCompleter = Completer(); final theMusicContentCenterEventHandler = MusicContentCenterEventHandler( onSongSimpleInfoResult: (String requestId, int songCode, - String simpleInfo, MusicContentCenterStatusCode errorCode) { + String simpleInfo, MusicContentCenterStateReason reason) { onSongSimpleInfoResultCompleter.complete(true); }, ); @@ -269,28 +268,25 @@ void generatedTestCases(IrisTester irisTester) { const String requestId = "hello"; const int songCode = 10; const String simpleInfo = "hello"; - const MusicContentCenterStatusCode errorCode = - MusicContentCenterStatusCode.kMusicContentCenterStatusOk; + const MusicContentCenterStateReason reason = + MusicContentCenterStateReason.kMusicContentCenterReasonOk; final eventJson = { 'requestId': requestId, 'songCode': songCode, 'simpleInfo': simpleInfo, - 'errorCode': errorCode.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'MusicContentCenterEventHandler_onSongSimpleInfoResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MusicContentCenterEventHandler_onSongSimpleInfoResult', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'MusicContentCenterEventHandler_onSongSimpleInfoResult'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onSongSimpleInfoResultCompleter.isCompleted) { onSongSimpleInfoResultCompleter.complete(true); } @@ -314,13 +310,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPreLoadEvent', + 'MusicContentCenterEventHandler.onPreLoadEvent', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); const musicContentCenterConfiguration = MusicContentCenterConfiguration( @@ -333,8 +330,8 @@ void generatedTestCases(IrisTester irisTester) { int songCode, int percent, String lyricUrl, - PreloadStatusCode status, - MusicContentCenterStatusCode errorCode) { + PreloadState state, + MusicContentCenterStateReason reason) { onPreLoadEventCompleter.complete(true); }, ); @@ -351,31 +348,28 @@ void generatedTestCases(IrisTester irisTester) { const int songCode = 10; const int percent = 10; const String lyricUrl = "hello"; - const PreloadStatusCode status = - PreloadStatusCode.kPreloadStatusCompleted; - const MusicContentCenterStatusCode errorCode = - MusicContentCenterStatusCode.kMusicContentCenterStatusOk; + const PreloadState state = PreloadState.kPreloadStateCompleted; + const MusicContentCenterStateReason reason = + MusicContentCenterStateReason.kMusicContentCenterReasonOk; final eventJson = { 'requestId': requestId, 'songCode': songCode, 'percent': percent, 'lyricUrl': lyricUrl, - 'status': status.value(), - 'errorCode': errorCode.value(), + 'state': state.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('MusicContentCenterEventHandler_onPreLoadEvent', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MusicContentCenterEventHandler_onPreLoadEvent', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MusicContentCenterEventHandler_onPreLoadEvent'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPreLoadEventCompleter.isCompleted) { onPreLoadEventCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_audioencodedframeobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_audioencodedframeobserver_testcases.generated.dart index b93b13fcb..5ac1eef56 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_audioencodedframeobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_audioencodedframeobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onRecordAudioEncodedFrame', + 'AudioEncodedFrameObserver.onRecordAudioEncodedFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRecordAudioEncodedFrameCompleter = Completer(); final theAudioEncodedFrameObserver = AudioEncodedFrameObserver( @@ -81,18 +84,15 @@ void generatedTestCases(IrisTester irisTester) { 'audioEncodedFrameInfo': audioEncodedFrameInfo.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'AudioEncodedFrameObserver_onRecordAudioEncodedFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioEncodedFrameObserver_onRecordAudioEncodedFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'AudioEncodedFrameObserver_onRecordAudioEncodedFrame'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRecordAudioEncodedFrameCompleter.isCompleted) { onRecordAudioEncodedFrameCompleter.complete(true); } @@ -117,13 +117,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPlaybackAudioEncodedFrame', + 'AudioEncodedFrameObserver.onPlaybackAudioEncodedFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onPlaybackAudioEncodedFrameCompleter = Completer(); final theAudioEncodedFrameObserver = AudioEncodedFrameObserver( @@ -185,18 +186,15 @@ void generatedTestCases(IrisTester irisTester) { 'audioEncodedFrameInfo': audioEncodedFrameInfo.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'AudioEncodedFrameObserver_onPlaybackAudioEncodedFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioEncodedFrameObserver_onPlaybackAudioEncodedFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'AudioEncodedFrameObserver_onPlaybackAudioEncodedFrame'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPlaybackAudioEncodedFrameCompleter.isCompleted) { onPlaybackAudioEncodedFrameCompleter.complete(true); } @@ -221,13 +219,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onMixedAudioEncodedFrame', + 'AudioEncodedFrameObserver.onMixedAudioEncodedFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onMixedAudioEncodedFrameCompleter = Completer(); final theAudioEncodedFrameObserver = AudioEncodedFrameObserver( @@ -289,18 +288,15 @@ void generatedTestCases(IrisTester irisTester) { 'audioEncodedFrameInfo': audioEncodedFrameInfo.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'AudioEncodedFrameObserver_onMixedAudioEncodedFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioEncodedFrameObserver_onMixedAudioEncodedFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'AudioEncodedFrameObserver_onMixedAudioEncodedFrame'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onMixedAudioEncodedFrameCompleter.isCompleted) { onMixedAudioEncodedFrameCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_audiospectrumobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_audiospectrumobserver_testcases.generated.dart index e9acd3718..967f5789e 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_audiospectrumobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_audiospectrumobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onLocalAudioSpectrum', + 'AudioSpectrumObserver.onLocalAudioSpectrum', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLocalAudioSpectrumCompleter = Completer(); final theAudioSpectrumObserver = AudioSpectrumObserver( @@ -47,17 +50,14 @@ void generatedTestCases(IrisTester irisTester) { 'data': data.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('AudioSpectrumObserver_onLocalAudioSpectrum', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioSpectrumObserver_onLocalAudioSpectrum', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['AudioSpectrumObserver_onLocalAudioSpectrum'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLocalAudioSpectrumCompleter.isCompleted) { onLocalAudioSpectrumCompleter.complete(true); } @@ -82,13 +82,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteAudioSpectrum', + 'AudioSpectrumObserver.onRemoteAudioSpectrum', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRemoteAudioSpectrumCompleter = Completer(); final theAudioSpectrumObserver = AudioSpectrumObserver( @@ -113,17 +114,15 @@ void generatedTestCases(IrisTester irisTester) { 'spectrumNumber': spectrumNumber, }; - if (!kIsWeb) { - irisTester.fireEvent('AudioSpectrumObserver_onRemoteAudioSpectrum', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'AudioSpectrumObserver_onRemoteAudioSpectrum', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['AudioSpectrumObserver_onRemoteAudioSpectrum'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteAudioSpectrumCompleter.isCompleted) { onRemoteAudioSpectrumCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart index b6ca403cf..2aa8b05c6 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_fake_test.generated.dart @@ -12,40 +12,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void rtcEngineSmokeTestCases() { testWidgets( - 'release', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - try { - const bool sync = true; - await rtcEngine.release( - sync: sync, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[release] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await rtcEngine.release(); - }, - ); - - testWidgets( - 'initialize', + 'RtcEngine.initialize', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -55,6 +22,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const ChannelProfileType contextChannelProfile = @@ -94,7 +62,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[initialize] error: ${e.toString()}'); + debugPrint('[RtcEngine.initialize] error: ${e.toString()}'); rethrow; } @@ -109,7 +77,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getVersion', + 'RtcEngine.getVersion', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -119,12 +87,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getVersion(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getVersion] error: ${e.toString()}'); + debugPrint('[RtcEngine.getVersion] error: ${e.toString()}'); rethrow; } @@ -139,7 +108,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getErrorDescription', + 'RtcEngine.getErrorDescription', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -149,6 +118,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int code = 10; @@ -157,7 +127,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getErrorDescription] error: ${e.toString()}'); + debugPrint('[RtcEngine.getErrorDescription] error: ${e.toString()}'); rethrow; } @@ -172,7 +142,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'preloadChannel', + 'RtcEngine.queryDeviceScore', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -182,6 +152,38 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + try { + await rtcEngine.queryDeviceScore(); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[RtcEngine.queryDeviceScore] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + + testWidgets( + 'RtcEngine.preloadChannel', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -194,7 +196,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[preloadChannel] error: ${e.toString()}'); + debugPrint('[RtcEngine.preloadChannel] error: ${e.toString()}'); rethrow; } @@ -209,7 +211,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'preloadChannelWithUserAccount', + 'RtcEngine.preloadChannelWithUserAccount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -219,6 +221,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -231,7 +234,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[preloadChannelWithUserAccount] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.preloadChannelWithUserAccount] error: ${e.toString()}'); rethrow; } @@ -246,7 +250,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updatePreloadChannelToken', + 'RtcEngine.updatePreloadChannelToken', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -256,6 +260,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -264,7 +269,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updatePreloadChannelToken] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.updatePreloadChannelToken] error: ${e.toString()}'); rethrow; } @@ -279,7 +285,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'joinChannel', + 'RtcEngine.joinChannel', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -289,6 +295,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -320,6 +327,7 @@ void rtcEngineSmokeTestCases() { const bool optionsPublishMediaPlayerAudioTrack = true; const bool optionsPublishMediaPlayerVideoTrack = true; const bool optionsPublishTranscodedVideoTrack = true; + const bool optionsPublishMixedAudioTrack = true; const bool optionsAutoSubscribeAudio = true; const bool optionsAutoSubscribeVideo = true; const bool optionsEnableAudioRecordingOrPlayout = true; @@ -351,6 +359,7 @@ void rtcEngineSmokeTestCases() { publishMediaPlayerAudioTrack: optionsPublishMediaPlayerAudioTrack, publishMediaPlayerVideoTrack: optionsPublishMediaPlayerVideoTrack, publishTranscodedVideoTrack: optionsPublishTranscodedVideoTrack, + publishMixedAudioTrack: optionsPublishMixedAudioTrack, autoSubscribeAudio: optionsAutoSubscribeAudio, autoSubscribeVideo: optionsAutoSubscribeVideo, enableAudioRecordingOrPlayout: optionsEnableAudioRecordingOrPlayout, @@ -376,7 +385,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[joinChannel] error: ${e.toString()}'); + debugPrint('[RtcEngine.joinChannel] error: ${e.toString()}'); rethrow; } @@ -391,7 +400,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updateChannelMediaOptions', + 'RtcEngine.updateChannelMediaOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -401,6 +410,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const ClientRoleType optionsClientRoleType = @@ -429,6 +439,7 @@ void rtcEngineSmokeTestCases() { const bool optionsPublishMediaPlayerAudioTrack = true; const bool optionsPublishMediaPlayerVideoTrack = true; const bool optionsPublishTranscodedVideoTrack = true; + const bool optionsPublishMixedAudioTrack = true; const bool optionsAutoSubscribeAudio = true; const bool optionsAutoSubscribeVideo = true; const bool optionsEnableAudioRecordingOrPlayout = true; @@ -460,6 +471,7 @@ void rtcEngineSmokeTestCases() { publishMediaPlayerAudioTrack: optionsPublishMediaPlayerAudioTrack, publishMediaPlayerVideoTrack: optionsPublishMediaPlayerVideoTrack, publishTranscodedVideoTrack: optionsPublishTranscodedVideoTrack, + publishMixedAudioTrack: optionsPublishMixedAudioTrack, autoSubscribeAudio: optionsAutoSubscribeAudio, autoSubscribeVideo: optionsAutoSubscribeVideo, enableAudioRecordingOrPlayout: optionsEnableAudioRecordingOrPlayout, @@ -482,7 +494,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateChannelMediaOptions] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.updateChannelMediaOptions] error: ${e.toString()}'); rethrow; } @@ -497,7 +510,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'leaveChannel', + 'RtcEngine.leaveChannel', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -507,6 +520,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool optionsStopAudioMixing = true; @@ -522,7 +536,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[leaveChannel] error: ${e.toString()}'); + debugPrint('[RtcEngine.leaveChannel] error: ${e.toString()}'); rethrow; } @@ -537,7 +551,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'renewToken', + 'RtcEngine.renewToken', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -547,6 +561,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -555,7 +570,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[renewToken] error: ${e.toString()}'); + debugPrint('[RtcEngine.renewToken] error: ${e.toString()}'); rethrow; } @@ -570,7 +585,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setChannelProfile', + 'RtcEngine.setChannelProfile', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -580,6 +595,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const ChannelProfileType profile = @@ -589,7 +605,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setChannelProfile] error: ${e.toString()}'); + debugPrint('[RtcEngine.setChannelProfile] error: ${e.toString()}'); rethrow; } @@ -604,7 +620,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setClientRole', + 'RtcEngine.setClientRole', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -614,6 +630,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const ClientRoleType role = ClientRoleType.clientRoleBroadcaster; @@ -628,7 +645,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setClientRole] error: ${e.toString()}'); + debugPrint('[RtcEngine.setClientRole] error: ${e.toString()}'); rethrow; } @@ -643,7 +660,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startEchoTest', + 'RtcEngine.startEchoTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -653,6 +670,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int configView = 10; @@ -674,7 +692,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startEchoTest] error: ${e.toString()}'); + debugPrint('[RtcEngine.startEchoTest] error: ${e.toString()}'); rethrow; } @@ -689,7 +707,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopEchoTest', + 'RtcEngine.stopEchoTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -699,12 +717,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopEchoTest(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopEchoTest] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopEchoTest] error: ${e.toString()}'); rethrow; } @@ -719,7 +738,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableMultiCamera', + 'RtcEngine.enableMultiCamera', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -729,6 +748,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -756,7 +776,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableMultiCamera] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableMultiCamera] error: ${e.toString()}'); rethrow; } @@ -771,7 +791,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableVideo', + 'RtcEngine.enableVideo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -781,12 +801,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.enableVideo(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableVideo] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableVideo] error: ${e.toString()}'); rethrow; } @@ -801,7 +822,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'disableVideo', + 'RtcEngine.disableVideo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -811,12 +832,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.disableVideo(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[disableVideo] error: ${e.toString()}'); + debugPrint('[RtcEngine.disableVideo] error: ${e.toString()}'); rethrow; } @@ -831,7 +853,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startPreview', + 'RtcEngine.startPreview', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -841,6 +863,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType sourceType = @@ -850,7 +873,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startPreview] error: ${e.toString()}'); + debugPrint('[RtcEngine.startPreview] error: ${e.toString()}'); rethrow; } @@ -865,7 +888,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopPreview', + 'RtcEngine.startPreviewWithoutSourceType', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -875,6 +898,39 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + try { + await rtcEngine.startPreviewWithoutSourceType(); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[RtcEngine.startPreviewWithoutSourceType] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + + testWidgets( + 'RtcEngine.stopPreview', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType sourceType = @@ -884,7 +940,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopPreview] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopPreview] error: ${e.toString()}'); rethrow; } @@ -899,7 +955,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startLastmileProbeTest', + 'RtcEngine.startLastmileProbeTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -909,6 +965,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool configProbeUplink = true; @@ -926,7 +983,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startLastmileProbeTest] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startLastmileProbeTest] error: ${e.toString()}'); rethrow; } @@ -941,7 +999,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopLastmileProbeTest', + 'RtcEngine.stopLastmileProbeTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -951,12 +1009,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopLastmileProbeTest(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopLastmileProbeTest] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.stopLastmileProbeTest] error: ${e.toString()}'); rethrow; } @@ -971,7 +1031,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVideoEncoderConfiguration', + 'RtcEngine.setVideoEncoderConfiguration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -981,6 +1041,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoCodecType configCodecType = VideoCodecType.videoCodecNone; @@ -1023,7 +1084,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVideoEncoderConfiguration] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setVideoEncoderConfiguration] error: ${e.toString()}'); rethrow; } @@ -1038,7 +1100,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setBeautyEffectOptions', + 'RtcEngine.setBeautyEffectOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1048,6 +1110,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1072,7 +1135,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setBeautyEffectOptions] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setBeautyEffectOptions] error: ${e.toString()}'); rethrow; } @@ -1087,7 +1151,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLowlightEnhanceOptions', + 'RtcEngine.setLowlightEnhanceOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1097,6 +1161,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1116,7 +1181,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLowlightEnhanceOptions] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setLowlightEnhanceOptions] error: ${e.toString()}'); rethrow; } @@ -1131,7 +1197,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVideoDenoiserOptions', + 'RtcEngine.setVideoDenoiserOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1141,6 +1207,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1160,7 +1227,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVideoDenoiserOptions] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setVideoDenoiserOptions] error: ${e.toString()}'); rethrow; } @@ -1175,7 +1243,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setColorEnhanceOptions', + 'RtcEngine.setColorEnhanceOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1185,6 +1253,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1202,7 +1271,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setColorEnhanceOptions] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setColorEnhanceOptions] error: ${e.toString()}'); rethrow; } @@ -1217,7 +1287,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableVirtualBackground', + 'RtcEngine.enableVirtualBackground', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1227,6 +1297,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1258,7 +1329,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableVirtualBackground] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableVirtualBackground] error: ${e.toString()}'); rethrow; } @@ -1273,7 +1345,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setupRemoteVideo', + 'RtcEngine.setupRemoteVideo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1283,6 +1355,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const RenderModeType canvasRenderMode = RenderModeType.renderModeHidden; @@ -1302,14 +1375,18 @@ void rtcEngineSmokeTestCases() { width: cropAreaWidth, height: cropAreaHeight, ); - const int canvasView = 10; + const VideoModulePosition canvasPosition = + VideoModulePosition.positionPostCapturer; const int canvasUid = 10; + const int canvasSubviewUid = 10; + const int canvasView = 10; const int canvasBackgroundColor = 10; const int canvasMediaPlayerId = 10; const bool canvasEnableAlphaMask = true; const VideoCanvas canvas = VideoCanvas( - view: canvasView, uid: canvasUid, + subviewUid: canvasSubviewUid, + view: canvasView, backgroundColor: canvasBackgroundColor, renderMode: canvasRenderMode, mirrorMode: canvasMirrorMode, @@ -1318,13 +1395,14 @@ void rtcEngineSmokeTestCases() { mediaPlayerId: canvasMediaPlayerId, cropArea: canvasCropArea, enableAlphaMask: canvasEnableAlphaMask, + position: canvasPosition, ); await rtcEngine.setupRemoteVideo( canvas, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setupRemoteVideo] error: ${e.toString()}'); + debugPrint('[RtcEngine.setupRemoteVideo] error: ${e.toString()}'); rethrow; } @@ -1339,7 +1417,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setupLocalVideo', + 'RtcEngine.setupLocalVideo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1349,6 +1427,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const RenderModeType canvasRenderMode = RenderModeType.renderModeHidden; @@ -1368,14 +1447,18 @@ void rtcEngineSmokeTestCases() { width: cropAreaWidth, height: cropAreaHeight, ); - const int canvasView = 10; + const VideoModulePosition canvasPosition = + VideoModulePosition.positionPostCapturer; const int canvasUid = 10; + const int canvasSubviewUid = 10; + const int canvasView = 10; const int canvasBackgroundColor = 10; const int canvasMediaPlayerId = 10; const bool canvasEnableAlphaMask = true; const VideoCanvas canvas = VideoCanvas( - view: canvasView, uid: canvasUid, + subviewUid: canvasSubviewUid, + view: canvasView, backgroundColor: canvasBackgroundColor, renderMode: canvasRenderMode, mirrorMode: canvasMirrorMode, @@ -1384,13 +1467,14 @@ void rtcEngineSmokeTestCases() { mediaPlayerId: canvasMediaPlayerId, cropArea: canvasCropArea, enableAlphaMask: canvasEnableAlphaMask, + position: canvasPosition, ); await rtcEngine.setupLocalVideo( canvas, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setupLocalVideo] error: ${e.toString()}'); + debugPrint('[RtcEngine.setupLocalVideo] error: ${e.toString()}'); rethrow; } @@ -1405,7 +1489,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVideoScenario', + 'RtcEngine.setVideoScenario', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1415,6 +1499,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoApplicationScenarioType scenarioType = @@ -1424,7 +1509,43 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVideoScenario] error: ${e.toString()}'); + debugPrint('[RtcEngine.setVideoScenario] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + + testWidgets( + 'RtcEngine.setVideoQoEPreference', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + try { + const VideoQoePreferenceType qoePreference = + VideoQoePreferenceType.videoQoePreferenceBalance; + await rtcEngine.setVideoQoEPreference( + qoePreference, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint( + '[RtcEngine.setVideoQoEPreference] error: ${e.toString()}'); rethrow; } @@ -1439,7 +1560,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableAudio', + 'RtcEngine.enableAudio', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1449,12 +1570,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.enableAudio(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableAudio] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableAudio] error: ${e.toString()}'); rethrow; } @@ -1469,7 +1591,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'disableAudio', + 'RtcEngine.disableAudio', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1479,12 +1601,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.disableAudio(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[disableAudio] error: ${e.toString()}'); + debugPrint('[RtcEngine.disableAudio] error: ${e.toString()}'); rethrow; } @@ -1499,7 +1622,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioProfile', + 'RtcEngine.setAudioProfile', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1509,6 +1632,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioProfileType profile = AudioProfileType.audioProfileDefault; @@ -1520,7 +1644,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioProfile] error: ${e.toString()}'); + debugPrint('[RtcEngine.setAudioProfile] error: ${e.toString()}'); rethrow; } @@ -1535,7 +1659,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioScenario', + 'RtcEngine.setAudioScenario', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1545,6 +1669,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioScenarioType scenario = @@ -1554,7 +1679,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioScenario] error: ${e.toString()}'); + debugPrint('[RtcEngine.setAudioScenario] error: ${e.toString()}'); rethrow; } @@ -1569,7 +1694,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableLocalAudio', + 'RtcEngine.enableLocalAudio', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1579,6 +1704,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1587,7 +1713,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableLocalAudio] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableLocalAudio] error: ${e.toString()}'); rethrow; } @@ -1602,7 +1728,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'muteLocalAudioStream', + 'RtcEngine.muteLocalAudioStream', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1612,6 +1738,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -1620,7 +1747,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteLocalAudioStream] error: ${e.toString()}'); + debugPrint('[RtcEngine.muteLocalAudioStream] error: ${e.toString()}'); rethrow; } @@ -1635,7 +1762,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'muteAllRemoteAudioStreams', + 'RtcEngine.muteAllRemoteAudioStreams', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1645,6 +1772,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -1653,7 +1781,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteAllRemoteAudioStreams] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.muteAllRemoteAudioStreams] error: ${e.toString()}'); rethrow; } @@ -1668,7 +1797,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setDefaultMuteAllRemoteAudioStreams', + 'RtcEngine.setDefaultMuteAllRemoteAudioStreams', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1678,6 +1807,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -1687,7 +1817,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setDefaultMuteAllRemoteAudioStreams] error: ${e.toString()}'); + '[RtcEngine.setDefaultMuteAllRemoteAudioStreams] error: ${e.toString()}'); rethrow; } @@ -1702,7 +1832,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'muteRemoteAudioStream', + 'RtcEngine.muteRemoteAudioStream', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1712,6 +1842,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -1722,7 +1853,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteRemoteAudioStream] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.muteRemoteAudioStream] error: ${e.toString()}'); rethrow; } @@ -1737,7 +1869,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'muteLocalVideoStream', + 'RtcEngine.muteLocalVideoStream', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1747,6 +1879,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -1755,7 +1888,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteLocalVideoStream] error: ${e.toString()}'); + debugPrint('[RtcEngine.muteLocalVideoStream] error: ${e.toString()}'); rethrow; } @@ -1770,7 +1903,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableLocalVideo', + 'RtcEngine.enableLocalVideo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1780,6 +1913,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1788,7 +1922,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableLocalVideo] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableLocalVideo] error: ${e.toString()}'); rethrow; } @@ -1803,7 +1937,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'muteAllRemoteVideoStreams', + 'RtcEngine.muteAllRemoteVideoStreams', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1813,6 +1947,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -1821,7 +1956,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteAllRemoteVideoStreams] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.muteAllRemoteVideoStreams] error: ${e.toString()}'); rethrow; } @@ -1836,7 +1972,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setDefaultMuteAllRemoteVideoStreams', + 'RtcEngine.setDefaultMuteAllRemoteVideoStreams', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1846,6 +1982,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -1855,7 +1992,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setDefaultMuteAllRemoteVideoStreams] error: ${e.toString()}'); + '[RtcEngine.setDefaultMuteAllRemoteVideoStreams] error: ${e.toString()}'); rethrow; } @@ -1870,7 +2007,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'muteRemoteVideoStream', + 'RtcEngine.setRemoteDefaultVideoStreamType', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1880,17 +2017,17 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - const int uid = 10; - const bool mute = true; - await rtcEngine.muteRemoteVideoStream( - uid: uid, - mute: mute, + const VideoStreamType streamType = VideoStreamType.videoStreamHigh; + await rtcEngine.setRemoteDefaultVideoStreamType( + streamType, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteRemoteVideoStream] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setRemoteDefaultVideoStreamType] error: ${e.toString()}'); rethrow; } @@ -1905,7 +2042,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteVideoStreamType', + 'RtcEngine.muteRemoteVideoStream', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1915,17 +2052,19 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; - const VideoStreamType streamType = VideoStreamType.videoStreamHigh; - await rtcEngine.setRemoteVideoStreamType( + const bool mute = true; + await rtcEngine.muteRemoteVideoStream( uid: uid, - streamType: streamType, + mute: mute, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteVideoStreamType] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.muteRemoteVideoStream] error: ${e.toString()}'); rethrow; } @@ -1940,7 +2079,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteVideoSubscriptionOptions', + 'RtcEngine.setRemoteVideoStreamType', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1950,23 +2089,19 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; - const VideoStreamType optionsType = VideoStreamType.videoStreamHigh; - const bool optionsEncodedFrameOnly = true; - const VideoSubscriptionOptions options = VideoSubscriptionOptions( - type: optionsType, - encodedFrameOnly: optionsEncodedFrameOnly, - ); - await rtcEngine.setRemoteVideoSubscriptionOptions( + const VideoStreamType streamType = VideoStreamType.videoStreamHigh; + await rtcEngine.setRemoteVideoStreamType( uid: uid, - options: options, + streamType: streamType, ); } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setRemoteVideoSubscriptionOptions] error: ${e.toString()}'); + '[RtcEngine.setRemoteVideoStreamType] error: ${e.toString()}'); rethrow; } @@ -1981,7 +2116,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteDefaultVideoStreamType', + 'RtcEngine.setRemoteVideoSubscriptionOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1991,16 +2126,24 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - const VideoStreamType streamType = VideoStreamType.videoStreamHigh; - await rtcEngine.setRemoteDefaultVideoStreamType( - streamType, + const int uid = 10; + const VideoStreamType optionsType = VideoStreamType.videoStreamHigh; + const bool optionsEncodedFrameOnly = true; + const VideoSubscriptionOptions options = VideoSubscriptionOptions( + type: optionsType, + encodedFrameOnly: optionsEncodedFrameOnly, + ); + await rtcEngine.setRemoteVideoSubscriptionOptions( + uid: uid, + options: options, ); } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setRemoteDefaultVideoStreamType] error: ${e.toString()}'); + '[RtcEngine.setRemoteVideoSubscriptionOptions] error: ${e.toString()}'); rethrow; } @@ -2015,7 +2158,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableAudioVolumeIndication', + 'RtcEngine.enableAudioVolumeIndication', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2025,6 +2168,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int interval = 10; @@ -2037,7 +2181,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableAudioVolumeIndication] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableAudioVolumeIndication] error: ${e.toString()}'); rethrow; } @@ -2052,7 +2197,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startAudioRecording', + 'RtcEngine.startAudioRecording', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2062,6 +2207,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioFileRecordingType configFileRecordingType = @@ -2085,7 +2231,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startAudioRecording] error: ${e.toString()}'); + debugPrint('[RtcEngine.startAudioRecording] error: ${e.toString()}'); rethrow; } @@ -2100,7 +2246,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'registerAudioEncodedFrameObserver', + 'RtcEngine.registerAudioEncodedFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2110,6 +2256,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioEncodedFrameObserverPosition configPostionType = @@ -2137,7 +2284,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[registerAudioEncodedFrameObserver] error: ${e.toString()}'); + '[RtcEngine.registerAudioEncodedFrameObserver] error: ${e.toString()}'); rethrow; } @@ -2152,7 +2299,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopAudioRecording', + 'RtcEngine.stopAudioRecording', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2162,12 +2309,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopAudioRecording(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopAudioRecording] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopAudioRecording] error: ${e.toString()}'); rethrow; } @@ -2182,7 +2330,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startAudioMixing', + 'RtcEngine.startAudioMixing', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2192,6 +2340,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String filePath = "hello"; @@ -2206,7 +2355,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startAudioMixing] error: ${e.toString()}'); + debugPrint('[RtcEngine.startAudioMixing] error: ${e.toString()}'); rethrow; } @@ -2221,7 +2370,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopAudioMixing', + 'RtcEngine.stopAudioMixing', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2231,12 +2380,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopAudioMixing(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopAudioMixing] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopAudioMixing] error: ${e.toString()}'); rethrow; } @@ -2251,7 +2401,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'pauseAudioMixing', + 'RtcEngine.pauseAudioMixing', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2261,12 +2411,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.pauseAudioMixing(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pauseAudioMixing] error: ${e.toString()}'); + debugPrint('[RtcEngine.pauseAudioMixing] error: ${e.toString()}'); rethrow; } @@ -2281,7 +2432,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'resumeAudioMixing', + 'RtcEngine.resumeAudioMixing', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2291,12 +2442,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.resumeAudioMixing(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[resumeAudioMixing] error: ${e.toString()}'); + debugPrint('[RtcEngine.resumeAudioMixing] error: ${e.toString()}'); rethrow; } @@ -2311,7 +2463,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'selectAudioTrack', + 'RtcEngine.selectAudioTrack', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2321,6 +2473,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int index = 10; @@ -2329,7 +2482,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[selectAudioTrack] error: ${e.toString()}'); + debugPrint('[RtcEngine.selectAudioTrack] error: ${e.toString()}'); rethrow; } @@ -2344,7 +2497,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getAudioTrackCount', + 'RtcEngine.getAudioTrackCount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2354,12 +2507,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getAudioTrackCount(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAudioTrackCount] error: ${e.toString()}'); + debugPrint('[RtcEngine.getAudioTrackCount] error: ${e.toString()}'); rethrow; } @@ -2374,7 +2528,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustAudioMixingVolume', + 'RtcEngine.adjustAudioMixingVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2384,6 +2538,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; @@ -2392,7 +2547,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustAudioMixingVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustAudioMixingVolume] error: ${e.toString()}'); rethrow; } @@ -2407,7 +2563,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustAudioMixingPublishVolume', + 'RtcEngine.adjustAudioMixingPublishVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2417,6 +2573,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; @@ -2425,7 +2582,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustAudioMixingPublishVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustAudioMixingPublishVolume] error: ${e.toString()}'); rethrow; } @@ -2440,7 +2598,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getAudioMixingPublishVolume', + 'RtcEngine.getAudioMixingPublishVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2450,12 +2608,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getAudioMixingPublishVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAudioMixingPublishVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getAudioMixingPublishVolume] error: ${e.toString()}'); rethrow; } @@ -2470,7 +2630,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustAudioMixingPlayoutVolume', + 'RtcEngine.adjustAudioMixingPlayoutVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2480,6 +2640,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; @@ -2488,7 +2649,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustAudioMixingPlayoutVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustAudioMixingPlayoutVolume] error: ${e.toString()}'); rethrow; } @@ -2503,7 +2665,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getAudioMixingPlayoutVolume', + 'RtcEngine.getAudioMixingPlayoutVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2513,12 +2675,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getAudioMixingPlayoutVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAudioMixingPlayoutVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getAudioMixingPlayoutVolume] error: ${e.toString()}'); rethrow; } @@ -2533,7 +2697,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getAudioMixingDuration', + 'RtcEngine.getAudioMixingDuration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2543,12 +2707,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getAudioMixingDuration(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAudioMixingDuration] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getAudioMixingDuration] error: ${e.toString()}'); rethrow; } @@ -2563,7 +2729,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getAudioMixingCurrentPosition', + 'RtcEngine.getAudioMixingCurrentPosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2573,12 +2739,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getAudioMixingCurrentPosition(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAudioMixingCurrentPosition] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getAudioMixingCurrentPosition] error: ${e.toString()}'); rethrow; } @@ -2593,7 +2761,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioMixingPosition', + 'RtcEngine.setAudioMixingPosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2603,6 +2771,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int pos = 10; @@ -2611,7 +2780,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioMixingPosition] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setAudioMixingPosition] error: ${e.toString()}'); rethrow; } @@ -2626,7 +2796,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioMixingDualMonoMode', + 'RtcEngine.setAudioMixingDualMonoMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2636,6 +2806,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioMixingDualMonoMode mode = @@ -2645,7 +2816,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioMixingDualMonoMode] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setAudioMixingDualMonoMode] error: ${e.toString()}'); rethrow; } @@ -2660,7 +2832,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioMixingPitch', + 'RtcEngine.setAudioMixingPitch', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2670,6 +2842,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int pitch = 10; @@ -2678,7 +2851,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioMixingPitch] error: ${e.toString()}'); + debugPrint('[RtcEngine.setAudioMixingPitch] error: ${e.toString()}'); rethrow; } @@ -2693,7 +2866,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getEffectsVolume', + 'RtcEngine.getEffectsVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2703,12 +2876,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getEffectsVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getEffectsVolume] error: ${e.toString()}'); + debugPrint('[RtcEngine.getEffectsVolume] error: ${e.toString()}'); rethrow; } @@ -2723,7 +2897,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setEffectsVolume', + 'RtcEngine.setEffectsVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2733,6 +2907,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; @@ -2741,7 +2916,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setEffectsVolume] error: ${e.toString()}'); + debugPrint('[RtcEngine.setEffectsVolume] error: ${e.toString()}'); rethrow; } @@ -2756,7 +2931,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'preloadEffect', + 'RtcEngine.preloadEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2766,6 +2941,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -2778,7 +2954,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[preloadEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.preloadEffect] error: ${e.toString()}'); rethrow; } @@ -2793,7 +2969,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'playEffect', + 'RtcEngine.playEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2803,6 +2979,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -2825,7 +3002,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[playEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.playEffect] error: ${e.toString()}'); rethrow; } @@ -2840,7 +3017,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'playAllEffects', + 'RtcEngine.playAllEffects', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2850,6 +3027,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int loopCount = 10; @@ -2866,7 +3044,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[playAllEffects] error: ${e.toString()}'); + debugPrint('[RtcEngine.playAllEffects] error: ${e.toString()}'); rethrow; } @@ -2881,7 +3059,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getVolumeOfEffect', + 'RtcEngine.getVolumeOfEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2891,6 +3069,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -2899,7 +3078,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getVolumeOfEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.getVolumeOfEffect] error: ${e.toString()}'); rethrow; } @@ -2914,7 +3093,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVolumeOfEffect', + 'RtcEngine.setVolumeOfEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2924,6 +3103,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -2934,7 +3114,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVolumeOfEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.setVolumeOfEffect] error: ${e.toString()}'); rethrow; } @@ -2949,7 +3129,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'pauseEffect', + 'RtcEngine.pauseEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2959,6 +3139,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -2967,7 +3148,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pauseEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.pauseEffect] error: ${e.toString()}'); rethrow; } @@ -2982,7 +3163,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'pauseAllEffects', + 'RtcEngine.pauseAllEffects', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2992,12 +3173,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.pauseAllEffects(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pauseAllEffects] error: ${e.toString()}'); + debugPrint('[RtcEngine.pauseAllEffects] error: ${e.toString()}'); rethrow; } @@ -3012,7 +3194,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'resumeEffect', + 'RtcEngine.resumeEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3022,6 +3204,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -3030,7 +3213,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[resumeEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.resumeEffect] error: ${e.toString()}'); rethrow; } @@ -3045,7 +3228,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'resumeAllEffects', + 'RtcEngine.resumeAllEffects', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3055,12 +3238,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.resumeAllEffects(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[resumeAllEffects] error: ${e.toString()}'); + debugPrint('[RtcEngine.resumeAllEffects] error: ${e.toString()}'); rethrow; } @@ -3075,7 +3259,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopEffect', + 'RtcEngine.stopEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3085,6 +3269,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -3093,7 +3278,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopEffect] error: ${e.toString()}'); rethrow; } @@ -3108,7 +3293,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopAllEffects', + 'RtcEngine.stopAllEffects', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3118,12 +3303,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopAllEffects(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopAllEffects] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopAllEffects] error: ${e.toString()}'); rethrow; } @@ -3138,7 +3324,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'unloadEffect', + 'RtcEngine.unloadEffect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3148,6 +3334,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -3156,7 +3343,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unloadEffect] error: ${e.toString()}'); + debugPrint('[RtcEngine.unloadEffect] error: ${e.toString()}'); rethrow; } @@ -3171,7 +3358,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'unloadAllEffects', + 'RtcEngine.unloadAllEffects', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3181,12 +3368,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.unloadAllEffects(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unloadAllEffects] error: ${e.toString()}'); + debugPrint('[RtcEngine.unloadAllEffects] error: ${e.toString()}'); rethrow; } @@ -3201,7 +3389,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getEffectDuration', + 'RtcEngine.getEffectDuration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3211,6 +3399,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String filePath = "hello"; @@ -3219,7 +3408,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getEffectDuration] error: ${e.toString()}'); + debugPrint('[RtcEngine.getEffectDuration] error: ${e.toString()}'); rethrow; } @@ -3234,7 +3423,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setEffectPosition', + 'RtcEngine.setEffectPosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3244,6 +3433,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -3254,7 +3444,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setEffectPosition] error: ${e.toString()}'); + debugPrint('[RtcEngine.setEffectPosition] error: ${e.toString()}'); rethrow; } @@ -3269,7 +3459,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getEffectCurrentPosition', + 'RtcEngine.getEffectCurrentPosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3279,6 +3469,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int soundId = 10; @@ -3287,7 +3478,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getEffectCurrentPosition] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getEffectCurrentPosition] error: ${e.toString()}'); rethrow; } @@ -3302,7 +3494,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableSoundPositionIndication', + 'RtcEngine.enableSoundPositionIndication', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3312,6 +3504,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -3320,7 +3513,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableSoundPositionIndication] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableSoundPositionIndication] error: ${e.toString()}'); rethrow; } @@ -3335,7 +3529,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteVoicePosition', + 'RtcEngine.setRemoteVoicePosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3345,6 +3539,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -3357,7 +3552,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteVoicePosition] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setRemoteVoicePosition] error: ${e.toString()}'); rethrow; } @@ -3372,7 +3568,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableSpatialAudio', + 'RtcEngine.enableSpatialAudio', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3382,6 +3578,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -3390,7 +3587,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableSpatialAudio] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableSpatialAudio] error: ${e.toString()}'); rethrow; } @@ -3405,7 +3602,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteUserSpatialAudioParams', + 'RtcEngine.setRemoteUserSpatialAudioParams', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3415,6 +3612,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -3443,7 +3641,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setRemoteUserSpatialAudioParams] error: ${e.toString()}'); + '[RtcEngine.setRemoteUserSpatialAudioParams] error: ${e.toString()}'); rethrow; } @@ -3458,7 +3656,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVoiceBeautifierPreset', + 'RtcEngine.setVoiceBeautifierPreset', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3468,6 +3666,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VoiceBeautifierPreset preset = @@ -3477,7 +3676,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVoiceBeautifierPreset] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setVoiceBeautifierPreset] error: ${e.toString()}'); rethrow; } @@ -3492,7 +3692,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioEffectPreset', + 'RtcEngine.setAudioEffectPreset', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3502,6 +3702,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioEffectPreset preset = AudioEffectPreset.audioEffectOff; @@ -3510,7 +3711,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioEffectPreset] error: ${e.toString()}'); + debugPrint('[RtcEngine.setAudioEffectPreset] error: ${e.toString()}'); rethrow; } @@ -3525,7 +3726,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVoiceConversionPreset', + 'RtcEngine.setVoiceConversionPreset', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3535,6 +3736,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VoiceConversionPreset preset = @@ -3544,7 +3746,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVoiceConversionPreset] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setVoiceConversionPreset] error: ${e.toString()}'); rethrow; } @@ -3559,7 +3762,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioEffectParameters', + 'RtcEngine.setAudioEffectParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3569,6 +3772,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioEffectPreset preset = AudioEffectPreset.audioEffectOff; @@ -3581,7 +3785,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAudioEffectParameters] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setAudioEffectParameters] error: ${e.toString()}'); rethrow; } @@ -3596,7 +3801,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVoiceBeautifierParameters', + 'RtcEngine.setVoiceBeautifierParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3606,6 +3811,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VoiceBeautifierPreset preset = @@ -3619,7 +3825,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVoiceBeautifierParameters] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setVoiceBeautifierParameters] error: ${e.toString()}'); rethrow; } @@ -3634,7 +3841,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setVoiceConversionParameters', + 'RtcEngine.setVoiceConversionParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3644,6 +3851,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VoiceConversionPreset preset = @@ -3657,7 +3865,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVoiceConversionParameters] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setVoiceConversionParameters] error: ${e.toString()}'); rethrow; } @@ -3672,7 +3881,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLocalVoicePitch', + 'RtcEngine.setLocalVoicePitch', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3682,6 +3891,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const double pitch = 10.0; @@ -3690,7 +3900,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLocalVoicePitch] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLocalVoicePitch] error: ${e.toString()}'); rethrow; } @@ -3705,7 +3915,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLocalVoiceFormant', + 'RtcEngine.setLocalVoiceFormant', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3715,6 +3925,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const double formantRatio = 10.0; @@ -3723,7 +3934,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLocalVoiceFormant] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLocalVoiceFormant] error: ${e.toString()}'); rethrow; } @@ -3738,7 +3949,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLocalVoiceEqualization', + 'RtcEngine.setLocalVoiceEqualization', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3748,6 +3959,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioEqualizationBandFrequency bandFrequency = @@ -3759,7 +3971,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLocalVoiceEqualization] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setLocalVoiceEqualization] error: ${e.toString()}'); rethrow; } @@ -3774,7 +3987,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLocalVoiceReverb', + 'RtcEngine.setLocalVoiceReverb', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3784,6 +3997,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioReverbType reverbKey = AudioReverbType.audioReverbDryLevel; @@ -3794,7 +4008,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLocalVoiceReverb] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLocalVoiceReverb] error: ${e.toString()}'); rethrow; } @@ -3809,7 +4023,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setHeadphoneEQPreset', + 'RtcEngine.setHeadphoneEQPreset', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3819,6 +4033,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const HeadphoneEqualizerPreset preset = @@ -3828,7 +4043,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setHeadphoneEQPreset] error: ${e.toString()}'); + debugPrint('[RtcEngine.setHeadphoneEQPreset] error: ${e.toString()}'); rethrow; } @@ -3843,7 +4058,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setHeadphoneEQParameters', + 'RtcEngine.setHeadphoneEQParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3853,6 +4068,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int lowGain = 10; @@ -3863,7 +4079,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setHeadphoneEQParameters] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setHeadphoneEQParameters] error: ${e.toString()}'); rethrow; } @@ -3878,7 +4095,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLogFile', + 'RtcEngine.setLogFile', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3888,6 +4105,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String filePath = "hello"; @@ -3896,7 +4114,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLogFile] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLogFile] error: ${e.toString()}'); rethrow; } @@ -3911,7 +4129,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLogFilter', + 'RtcEngine.setLogFilter', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3921,6 +4139,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const LogFilterType filter = LogFilterType.logFilterOff; @@ -3929,7 +4148,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLogFilter] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLogFilter] error: ${e.toString()}'); rethrow; } @@ -3944,7 +4163,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLogLevel', + 'RtcEngine.setLogLevel', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3954,6 +4173,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const LogLevel level = LogLevel.logLevelNone; @@ -3962,7 +4182,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLogLevel] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLogLevel] error: ${e.toString()}'); rethrow; } @@ -3977,7 +4197,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLogFileSize', + 'RtcEngine.setLogFileSize', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -3987,6 +4207,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int fileSizeInKBytes = 10; @@ -3995,7 +4216,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLogFileSize] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLogFileSize] error: ${e.toString()}'); rethrow; } @@ -4010,7 +4231,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'uploadLogFile', + 'RtcEngine.uploadLogFile', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4020,12 +4241,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.uploadLogFile(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[uploadLogFile] error: ${e.toString()}'); + debugPrint('[RtcEngine.uploadLogFile] error: ${e.toString()}'); rethrow; } @@ -4040,7 +4262,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLocalRenderMode', + 'RtcEngine.setLocalRenderMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4050,6 +4272,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const RenderModeType renderMode = RenderModeType.renderModeHidden; @@ -4061,7 +4284,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLocalRenderMode] error: ${e.toString()}'); + debugPrint('[RtcEngine.setLocalRenderMode] error: ${e.toString()}'); rethrow; } @@ -4076,7 +4299,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteRenderMode', + 'RtcEngine.setRemoteRenderMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4086,6 +4309,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -4099,7 +4323,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteRenderMode] error: ${e.toString()}'); + debugPrint('[RtcEngine.setRemoteRenderMode] error: ${e.toString()}'); rethrow; } @@ -4114,7 +4338,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLocalVideoMirrorMode', + 'RtcEngine.setLocalVideoMirrorMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4124,6 +4348,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoMirrorModeType mirrorMode = @@ -4133,7 +4358,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLocalVideoMirrorMode] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setLocalVideoMirrorMode] error: ${e.toString()}'); rethrow; } @@ -4148,7 +4374,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableDualStreamMode', + 'RtcEngine.enableDualStreamMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4158,6 +4384,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -4180,7 +4407,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableDualStreamMode] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableDualStreamMode] error: ${e.toString()}'); rethrow; } @@ -4195,7 +4422,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setDualStreamMode', + 'RtcEngine.setDualStreamMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4205,6 +4432,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const SimulcastStreamMode mode = @@ -4228,7 +4456,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setDualStreamMode] error: ${e.toString()}'); + debugPrint('[RtcEngine.setDualStreamMode] error: ${e.toString()}'); rethrow; } @@ -4243,7 +4471,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableCustomAudioLocalPlayback', + 'RtcEngine.enableCustomAudioLocalPlayback', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4253,6 +4481,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int trackId = 10; @@ -4263,7 +4492,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableCustomAudioLocalPlayback] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableCustomAudioLocalPlayback] error: ${e.toString()}'); rethrow; } @@ -4278,7 +4508,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRecordingAudioFrameParameters', + 'RtcEngine.setRecordingAudioFrameParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4288,6 +4518,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int sampleRate = 10; @@ -4304,7 +4535,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setRecordingAudioFrameParameters] error: ${e.toString()}'); + '[RtcEngine.setRecordingAudioFrameParameters] error: ${e.toString()}'); rethrow; } @@ -4319,7 +4550,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setPlaybackAudioFrameParameters', + 'RtcEngine.setPlaybackAudioFrameParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4329,6 +4560,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int sampleRate = 10; @@ -4345,7 +4577,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setPlaybackAudioFrameParameters] error: ${e.toString()}'); + '[RtcEngine.setPlaybackAudioFrameParameters] error: ${e.toString()}'); rethrow; } @@ -4360,7 +4592,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setMixedAudioFrameParameters', + 'RtcEngine.setMixedAudioFrameParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4370,6 +4602,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int sampleRate = 10; @@ -4382,7 +4615,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setMixedAudioFrameParameters] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setMixedAudioFrameParameters] error: ${e.toString()}'); rethrow; } @@ -4397,7 +4631,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setEarMonitoringAudioFrameParameters', + 'RtcEngine.setEarMonitoringAudioFrameParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4407,6 +4641,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int sampleRate = 10; @@ -4423,7 +4658,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setEarMonitoringAudioFrameParameters] error: ${e.toString()}'); + '[RtcEngine.setEarMonitoringAudioFrameParameters] error: ${e.toString()}'); rethrow; } @@ -4438,7 +4673,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setPlaybackAudioFrameBeforeMixingParameters', + 'RtcEngine.setPlaybackAudioFrameBeforeMixingParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4448,6 +4683,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int sampleRate = 10; @@ -4459,7 +4695,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setPlaybackAudioFrameBeforeMixingParameters] error: ${e.toString()}'); + '[RtcEngine.setPlaybackAudioFrameBeforeMixingParameters] error: ${e.toString()}'); rethrow; } @@ -4474,7 +4710,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableAudioSpectrumMonitor', + 'RtcEngine.enableAudioSpectrumMonitor', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4484,6 +4720,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int intervalInMS = 10; @@ -4492,7 +4729,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableAudioSpectrumMonitor] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableAudioSpectrumMonitor] error: ${e.toString()}'); rethrow; } @@ -4507,7 +4745,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'disableAudioSpectrumMonitor', + 'RtcEngine.disableAudioSpectrumMonitor', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4517,12 +4755,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.disableAudioSpectrumMonitor(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[disableAudioSpectrumMonitor] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.disableAudioSpectrumMonitor] error: ${e.toString()}'); rethrow; } @@ -4537,7 +4777,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'registerAudioSpectrumObserver', + 'RtcEngine.registerAudioSpectrumObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4547,6 +4787,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final AudioSpectrumObserver observer = AudioSpectrumObserver( @@ -4558,7 +4799,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerAudioSpectrumObserver] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.registerAudioSpectrumObserver] error: ${e.toString()}'); rethrow; } @@ -4573,7 +4815,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'unregisterAudioSpectrumObserver', + 'RtcEngine.unregisterAudioSpectrumObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4583,6 +4825,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final AudioSpectrumObserver observer = AudioSpectrumObserver( @@ -4595,7 +4838,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[unregisterAudioSpectrumObserver] error: ${e.toString()}'); + '[RtcEngine.unregisterAudioSpectrumObserver] error: ${e.toString()}'); rethrow; } @@ -4610,7 +4853,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustRecordingSignalVolume', + 'RtcEngine.adjustRecordingSignalVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4620,6 +4863,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; @@ -4628,7 +4872,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustRecordingSignalVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustRecordingSignalVolume] error: ${e.toString()}'); rethrow; } @@ -4643,7 +4888,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'muteRecordingSignal', + 'RtcEngine.muteRecordingSignal', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4653,6 +4898,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -4661,7 +4907,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteRecordingSignal] error: ${e.toString()}'); + debugPrint('[RtcEngine.muteRecordingSignal] error: ${e.toString()}'); rethrow; } @@ -4676,7 +4922,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustPlaybackSignalVolume', + 'RtcEngine.adjustPlaybackSignalVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4686,6 +4932,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; @@ -4694,7 +4941,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustPlaybackSignalVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustPlaybackSignalVolume] error: ${e.toString()}'); rethrow; } @@ -4709,7 +4957,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustUserPlaybackSignalVolume', + 'RtcEngine.adjustUserPlaybackSignalVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4719,6 +4967,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -4729,7 +4978,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustUserPlaybackSignalVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustUserPlaybackSignalVolume] error: ${e.toString()}'); rethrow; } @@ -4744,7 +4994,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setLocalPublishFallbackOption', + 'RtcEngine.setLocalPublishFallbackOption', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4754,6 +5004,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const StreamFallbackOptions option = @@ -4763,7 +5014,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setLocalPublishFallbackOption] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setLocalPublishFallbackOption] error: ${e.toString()}'); rethrow; } @@ -4778,7 +5030,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteSubscribeFallbackOption', + 'RtcEngine.setRemoteSubscribeFallbackOption', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4788,6 +5040,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const StreamFallbackOptions option = @@ -4798,7 +5051,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setRemoteSubscribeFallbackOption] error: ${e.toString()}'); + '[RtcEngine.setRemoteSubscribeFallbackOption] error: ${e.toString()}'); rethrow; } @@ -4813,7 +5066,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableLoopbackRecording', + 'RtcEngine.enableExtension', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4823,17 +5076,22 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - const bool enabled = true; - const String deviceName = "hello"; - await rtcEngine.enableLoopbackRecording( - enabled: enabled, - deviceName: deviceName, + const String provider = "hello"; + const String extension = "hello"; + const bool enable = true; + const MediaSourceType type = MediaSourceType.audioPlayoutSource; + await rtcEngine.enableExtension( + provider: provider, + extension: extension, + enable: enable, + type: type, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableLoopbackRecording] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableExtension] error: ${e.toString()}'); rethrow; } @@ -4848,7 +5106,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustLoopbackSignalVolume', + 'RtcEngine.setExtensionProperty', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4858,15 +5116,24 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - const int volume = 10; - await rtcEngine.adjustLoopbackSignalVolume( - volume, + const String provider = "hello"; + const String extension = "hello"; + const String key = "hello"; + const String value = "hello"; + const MediaSourceType type = MediaSourceType.audioPlayoutSource; + await rtcEngine.setExtensionProperty( + provider: provider, + extension: extension, + key: key, + value: value, + type: type, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustLoopbackSignalVolume] error: ${e.toString()}'); + debugPrint('[RtcEngine.setExtensionProperty] error: ${e.toString()}'); rethrow; } @@ -4881,7 +5148,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getLoopbackRecordingVolume', + 'RtcEngine.getExtensionProperty', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4891,12 +5158,24 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - await rtcEngine.getLoopbackRecordingVolume(); + const String provider = "hello"; + const String extension = "hello"; + const String key = "hello"; + const int bufLen = 10; + const MediaSourceType type = MediaSourceType.audioPlayoutSource; + await rtcEngine.getExtensionProperty( + provider: provider, + extension: extension, + key: key, + bufLen: bufLen, + type: type, + ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getLoopbackRecordingVolume] error: ${e.toString()}'); + debugPrint('[RtcEngine.getExtensionProperty] error: ${e.toString()}'); rethrow; } @@ -4911,7 +5190,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableInEarMonitoring', + 'RtcEngine.enableLoopbackRecording', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4921,18 +5200,19 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; - const EarMonitoringFilterType includeAudioFilters = - EarMonitoringFilterType.earMonitoringFilterNone; - await rtcEngine.enableInEarMonitoring( + const String deviceName = "hello"; + await rtcEngine.enableLoopbackRecording( enabled: enabled, - includeAudioFilters: includeAudioFilters, + deviceName: deviceName, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableInEarMonitoring] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableLoopbackRecording] error: ${e.toString()}'); rethrow; } @@ -4947,7 +5227,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setInEarMonitoringVolume', + 'RtcEngine.adjustLoopbackSignalVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4957,15 +5237,17 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; - await rtcEngine.setInEarMonitoringVolume( + await rtcEngine.adjustLoopbackSignalVolume( volume, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setInEarMonitoringVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustLoopbackSignalVolume] error: ${e.toString()}'); rethrow; } @@ -4980,7 +5262,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'loadExtensionProvider', + 'RtcEngine.getLoopbackRecordingVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -4990,17 +5272,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - const String path = "hello"; - const bool unloadAfterUse = true; - await rtcEngine.loadExtensionProvider( - path: path, - unloadAfterUse: unloadAfterUse, - ); + await rtcEngine.getLoopbackRecordingVolume(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[loadExtensionProvider] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getLoopbackRecordingVolume] error: ${e.toString()}'); rethrow; } @@ -5015,7 +5294,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setExtensionProviderProperty', + 'RtcEngine.enableInEarMonitoring', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5025,19 +5304,20 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - const String provider = "hello"; - const String key = "hello"; - const String value = "hello"; - await rtcEngine.setExtensionProviderProperty( - provider: provider, - key: key, - value: value, + const bool enabled = true; + const EarMonitoringFilterType includeAudioFilters = + EarMonitoringFilterType.earMonitoringFilterNone; + await rtcEngine.enableInEarMonitoring( + enabled: enabled, + includeAudioFilters: includeAudioFilters, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setExtensionProviderProperty] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableInEarMonitoring] error: ${e.toString()}'); rethrow; } @@ -5052,7 +5332,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'registerExtension', + 'RtcEngine.setInEarMonitoringVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5062,19 +5342,17 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); - - try { - const String provider = "hello"; - const String extension = "hello"; - const MediaSourceType type = MediaSourceType.audioPlayoutSource; - await rtcEngine.registerExtension( - provider: provider, - extension: extension, - type: type, + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + try { + const int volume = 10; + await rtcEngine.setInEarMonitoringVolume( + volume, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerExtension] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setInEarMonitoringVolume] error: ${e.toString()}'); rethrow; } @@ -5089,7 +5367,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableExtension', + 'RtcEngine.loadExtensionProvider', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5099,21 +5377,19 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { - const String provider = "hello"; - const String extension = "hello"; - const bool enable = true; - const MediaSourceType type = MediaSourceType.audioPlayoutSource; - await rtcEngine.enableExtension( - provider: provider, - extension: extension, - enable: enable, - type: type, + const String path = "hello"; + const bool unloadAfterUse = true; + await rtcEngine.loadExtensionProvider( + path: path, + unloadAfterUse: unloadAfterUse, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableExtension] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.loadExtensionProvider] error: ${e.toString()}'); rethrow; } @@ -5128,7 +5404,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setExtensionProperty', + 'RtcEngine.setExtensionProviderProperty', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5138,23 +5414,21 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String provider = "hello"; - const String extension = "hello"; const String key = "hello"; const String value = "hello"; - const MediaSourceType type = MediaSourceType.audioPlayoutSource; - await rtcEngine.setExtensionProperty( + await rtcEngine.setExtensionProviderProperty( provider: provider, - extension: extension, key: key, value: value, - type: type, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setExtensionProperty] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setExtensionProviderProperty] error: ${e.toString()}'); rethrow; } @@ -5169,7 +5443,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getExtensionProperty', + 'RtcEngine.registerExtension', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5179,23 +5453,20 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String provider = "hello"; const String extension = "hello"; - const String key = "hello"; - const int bufLen = 10; const MediaSourceType type = MediaSourceType.audioPlayoutSource; - await rtcEngine.getExtensionProperty( + await rtcEngine.registerExtension( provider: provider, extension: extension, - key: key, - bufLen: bufLen, type: type, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getExtensionProperty] error: ${e.toString()}'); + debugPrint('[RtcEngine.registerExtension] error: ${e.toString()}'); rethrow; } @@ -5210,7 +5481,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraCapturerConfiguration', + 'RtcEngine.setCameraCapturerConfiguration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5220,6 +5491,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const CameraDirection configCameraDirection = @@ -5245,7 +5517,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setCameraCapturerConfiguration] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setCameraCapturerConfiguration] error: ${e.toString()}'); rethrow; } @@ -5260,7 +5533,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'destroyCustomVideoTrack', + 'RtcEngine.destroyCustomVideoTrack', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5270,6 +5543,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int videoTrackId = 10; @@ -5278,7 +5552,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[destroyCustomVideoTrack] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.destroyCustomVideoTrack] error: ${e.toString()}'); rethrow; } @@ -5293,7 +5568,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'destroyCustomEncodedVideoTrack', + 'RtcEngine.destroyCustomEncodedVideoTrack', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5303,6 +5578,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int videoTrackId = 10; @@ -5311,7 +5587,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[destroyCustomEncodedVideoTrack] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.destroyCustomEncodedVideoTrack] error: ${e.toString()}'); rethrow; } @@ -5326,7 +5603,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'switchCamera', + 'RtcEngine.switchCamera', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5336,12 +5613,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.switchCamera(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[switchCamera] error: ${e.toString()}'); + debugPrint('[RtcEngine.switchCamera] error: ${e.toString()}'); rethrow; } @@ -5356,7 +5634,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraZoomSupported', + 'RtcEngine.isCameraZoomSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5366,12 +5644,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraZoomSupported(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isCameraZoomSupported] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.isCameraZoomSupported] error: ${e.toString()}'); rethrow; } @@ -5386,7 +5666,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraFaceDetectSupported', + 'RtcEngine.isCameraFaceDetectSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5396,12 +5676,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraFaceDetectSupported(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isCameraFaceDetectSupported] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.isCameraFaceDetectSupported] error: ${e.toString()}'); rethrow; } @@ -5416,7 +5698,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraTorchSupported', + 'RtcEngine.isCameraTorchSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5426,12 +5708,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraTorchSupported(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isCameraTorchSupported] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.isCameraTorchSupported] error: ${e.toString()}'); rethrow; } @@ -5446,7 +5730,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraFocusSupported', + 'RtcEngine.isCameraFocusSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5456,12 +5740,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraFocusSupported(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isCameraFocusSupported] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.isCameraFocusSupported] error: ${e.toString()}'); rethrow; } @@ -5476,7 +5762,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraAutoFocusFaceModeSupported', + 'RtcEngine.isCameraAutoFocusFaceModeSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5486,13 +5772,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraAutoFocusFaceModeSupported(); } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[isCameraAutoFocusFaceModeSupported] error: ${e.toString()}'); + '[RtcEngine.isCameraAutoFocusFaceModeSupported] error: ${e.toString()}'); rethrow; } @@ -5507,7 +5794,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraZoomFactor', + 'RtcEngine.setCameraZoomFactor', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5517,6 +5804,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const double factor = 10.0; @@ -5525,7 +5813,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setCameraZoomFactor] error: ${e.toString()}'); + debugPrint('[RtcEngine.setCameraZoomFactor] error: ${e.toString()}'); rethrow; } @@ -5540,7 +5828,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableFaceDetection', + 'RtcEngine.enableFaceDetection', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5550,6 +5838,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -5558,7 +5847,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableFaceDetection] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableFaceDetection] error: ${e.toString()}'); rethrow; } @@ -5573,7 +5862,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getCameraMaxZoomFactor', + 'RtcEngine.getCameraMaxZoomFactor', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5583,12 +5872,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getCameraMaxZoomFactor(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getCameraMaxZoomFactor] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getCameraMaxZoomFactor] error: ${e.toString()}'); rethrow; } @@ -5603,7 +5894,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraFocusPositionInPreview', + 'RtcEngine.setCameraFocusPositionInPreview', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5613,6 +5904,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const double positionX = 10.0; @@ -5624,7 +5916,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setCameraFocusPositionInPreview] error: ${e.toString()}'); + '[RtcEngine.setCameraFocusPositionInPreview] error: ${e.toString()}'); rethrow; } @@ -5639,7 +5931,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraTorchOn', + 'RtcEngine.setCameraTorchOn', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5649,6 +5941,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool isOn = true; @@ -5657,7 +5950,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setCameraTorchOn] error: ${e.toString()}'); + debugPrint('[RtcEngine.setCameraTorchOn] error: ${e.toString()}'); rethrow; } @@ -5672,7 +5965,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraAutoFocusFaceModeEnabled', + 'RtcEngine.setCameraAutoFocusFaceModeEnabled', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5682,6 +5975,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -5691,7 +5985,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setCameraAutoFocusFaceModeEnabled] error: ${e.toString()}'); + '[RtcEngine.setCameraAutoFocusFaceModeEnabled] error: ${e.toString()}'); rethrow; } @@ -5706,7 +6000,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraExposurePositionSupported', + 'RtcEngine.isCameraExposurePositionSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5716,13 +6010,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraExposurePositionSupported(); } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[isCameraExposurePositionSupported] error: ${e.toString()}'); + '[RtcEngine.isCameraExposurePositionSupported] error: ${e.toString()}'); rethrow; } @@ -5737,7 +6032,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraExposurePosition', + 'RtcEngine.setCameraExposurePosition', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5747,6 +6042,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const double positionXinView = 10.0; @@ -5757,7 +6053,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setCameraExposurePosition] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setCameraExposurePosition] error: ${e.toString()}'); rethrow; } @@ -5772,7 +6069,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraExposureSupported', + 'RtcEngine.isCameraExposureSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5782,12 +6079,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraExposureSupported(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isCameraExposureSupported] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.isCameraExposureSupported] error: ${e.toString()}'); rethrow; } @@ -5802,7 +6101,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraExposureFactor', + 'RtcEngine.setCameraExposureFactor', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5812,6 +6111,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const double factor = 10.0; @@ -5820,7 +6120,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setCameraExposureFactor] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setCameraExposureFactor] error: ${e.toString()}'); rethrow; } @@ -5835,7 +6136,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isCameraAutoExposureFaceModeSupported', + 'RtcEngine.isCameraAutoExposureFaceModeSupported', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5845,13 +6146,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isCameraAutoExposureFaceModeSupported(); } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[isCameraAutoExposureFaceModeSupported] error: ${e.toString()}'); + '[RtcEngine.isCameraAutoExposureFaceModeSupported] error: ${e.toString()}'); rethrow; } @@ -5866,7 +6168,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraAutoExposureFaceModeEnabled', + 'RtcEngine.setCameraAutoExposureFaceModeEnabled', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5876,6 +6178,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -5885,7 +6188,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setCameraAutoExposureFaceModeEnabled] error: ${e.toString()}'); + '[RtcEngine.setCameraAutoExposureFaceModeEnabled] error: ${e.toString()}'); rethrow; } @@ -5900,7 +6203,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setDefaultAudioRouteToSpeakerphone', + 'RtcEngine.setDefaultAudioRouteToSpeakerphone', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5910,6 +6213,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool defaultToSpeaker = true; @@ -5919,7 +6223,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setDefaultAudioRouteToSpeakerphone] error: ${e.toString()}'); + '[RtcEngine.setDefaultAudioRouteToSpeakerphone] error: ${e.toString()}'); rethrow; } @@ -5934,7 +6238,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setEnableSpeakerphone', + 'RtcEngine.setEnableSpeakerphone', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5944,6 +6248,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool speakerOn = true; @@ -5952,7 +6257,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setEnableSpeakerphone] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setEnableSpeakerphone] error: ${e.toString()}'); rethrow; } @@ -5967,7 +6273,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isSpeakerphoneEnabled', + 'RtcEngine.isSpeakerphoneEnabled', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -5977,12 +6283,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.isSpeakerphoneEnabled(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isSpeakerphoneEnabled] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.isSpeakerphoneEnabled] error: ${e.toString()}'); rethrow; } @@ -5997,7 +6305,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRouteInCommunicationMode', + 'RtcEngine.setRouteInCommunicationMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6007,6 +6315,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int route = 10; @@ -6015,7 +6324,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRouteInCommunicationMode] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setRouteInCommunicationMode] error: ${e.toString()}'); rethrow; } @@ -6030,7 +6340,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getScreenCaptureSources', + 'RtcEngine.getScreenCaptureSources', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6040,6 +6350,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int thumbSizeWidth = 10; @@ -6062,7 +6373,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getScreenCaptureSources] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getScreenCaptureSources] error: ${e.toString()}'); rethrow; } @@ -6077,7 +6389,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAudioSessionOperationRestriction', + 'RtcEngine.setAudioSessionOperationRestriction', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6087,6 +6399,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioSessionOperationRestriction restriction = @@ -6098,7 +6411,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setAudioSessionOperationRestriction] error: ${e.toString()}'); + '[RtcEngine.setAudioSessionOperationRestriction] error: ${e.toString()}'); rethrow; } @@ -6113,7 +6426,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startScreenCaptureByDisplayId', + 'RtcEngine.startScreenCaptureByDisplayId', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6123,6 +6436,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int displayId = 10; @@ -6170,7 +6484,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startScreenCaptureByDisplayId] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startScreenCaptureByDisplayId] error: ${e.toString()}'); rethrow; } @@ -6185,7 +6500,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startScreenCaptureByScreenRect', + 'RtcEngine.startScreenCaptureByScreenRect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6195,6 +6510,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int screenRectX = 10; @@ -6251,7 +6567,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startScreenCaptureByScreenRect] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startScreenCaptureByScreenRect] error: ${e.toString()}'); rethrow; } @@ -6266,7 +6583,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getAudioDeviceInfo', + 'RtcEngine.getAudioDeviceInfo', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6276,12 +6593,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getAudioDeviceInfo(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAudioDeviceInfo] error: ${e.toString()}'); + debugPrint('[RtcEngine.getAudioDeviceInfo] error: ${e.toString()}'); rethrow; } @@ -6296,7 +6614,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startScreenCaptureByWindowId', + 'RtcEngine.startScreenCaptureByWindowId', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6306,6 +6624,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int windowId = 10; @@ -6353,7 +6672,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startScreenCaptureByWindowId] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startScreenCaptureByWindowId] error: ${e.toString()}'); rethrow; } @@ -6368,7 +6688,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setScreenCaptureContentHint', + 'RtcEngine.setScreenCaptureContentHint', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6378,6 +6698,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoContentHint contentHint = VideoContentHint.contentHintNone; @@ -6386,7 +6707,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setScreenCaptureContentHint] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setScreenCaptureContentHint] error: ${e.toString()}'); rethrow; } @@ -6401,7 +6723,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updateScreenCaptureRegion', + 'RtcEngine.updateScreenCaptureRegion', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6411,6 +6733,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int regionRectX = 10; @@ -6428,7 +6751,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateScreenCaptureRegion] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.updateScreenCaptureRegion] error: ${e.toString()}'); rethrow; } @@ -6443,7 +6767,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updateScreenCaptureParameters', + 'RtcEngine.updateScreenCaptureParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6453,6 +6777,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int dimensionsWidth = 10; @@ -6487,7 +6812,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateScreenCaptureParameters] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.updateScreenCaptureParameters] error: ${e.toString()}'); rethrow; } @@ -6502,7 +6828,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startScreenCapture', + 'RtcEngine.startScreenCapture', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6512,6 +6838,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int audioParamsSampleRate = 10; @@ -6553,7 +6880,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startScreenCapture] error: ${e.toString()}'); + debugPrint('[RtcEngine.startScreenCapture] error: ${e.toString()}'); rethrow; } @@ -6568,7 +6895,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startScreenCaptureBySourceType', + 'RtcEngine.startScreenCaptureBySourceType', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6578,6 +6905,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType sourceType = @@ -6646,7 +6974,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startScreenCaptureBySourceType] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startScreenCaptureBySourceType] error: ${e.toString()}'); rethrow; } @@ -6661,7 +6990,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updateScreenCapture', + 'RtcEngine.updateScreenCapture', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6671,6 +7000,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int audioParamsSampleRate = 10; @@ -6712,7 +7042,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateScreenCapture] error: ${e.toString()}'); + debugPrint('[RtcEngine.updateScreenCapture] error: ${e.toString()}'); rethrow; } @@ -6727,7 +7057,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'queryScreenCaptureCapability', + 'RtcEngine.queryScreenCaptureCapability', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6737,12 +7067,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.queryScreenCaptureCapability(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[queryScreenCaptureCapability] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.queryScreenCaptureCapability] error: ${e.toString()}'); rethrow; } @@ -6757,7 +7089,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setScreenCaptureScenario', + 'RtcEngine.setScreenCaptureScenario', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6767,6 +7099,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const ScreenScenarioType screenScenario = @@ -6776,7 +7109,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setScreenCaptureScenario] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setScreenCaptureScenario] error: ${e.toString()}'); rethrow; } @@ -6791,7 +7125,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopScreenCapture', + 'RtcEngine.stopScreenCapture', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6801,12 +7135,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopScreenCapture(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopScreenCapture] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopScreenCapture] error: ${e.toString()}'); rethrow; } @@ -6821,7 +7156,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopScreenCaptureBySourceType', + 'RtcEngine.stopScreenCaptureBySourceType', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6831,6 +7166,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType sourceType = @@ -6840,7 +7176,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopScreenCaptureBySourceType] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.stopScreenCaptureBySourceType] error: ${e.toString()}'); rethrow; } @@ -6855,7 +7192,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getCallId', + 'RtcEngine.getCallId', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6865,12 +7202,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getCallId(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getCallId] error: ${e.toString()}'); + debugPrint('[RtcEngine.getCallId] error: ${e.toString()}'); rethrow; } @@ -6885,7 +7223,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'rate', + 'RtcEngine.rate', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6895,6 +7233,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String callId = "hello"; @@ -6907,7 +7246,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[rate] error: ${e.toString()}'); + debugPrint('[RtcEngine.rate] error: ${e.toString()}'); rethrow; } @@ -6922,7 +7261,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'complain', + 'RtcEngine.complain', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6932,6 +7271,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String callId = "hello"; @@ -6942,7 +7282,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[complain] error: ${e.toString()}'); + debugPrint('[RtcEngine.complain] error: ${e.toString()}'); rethrow; } @@ -6957,7 +7297,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startRtmpStreamWithoutTranscoding', + 'RtcEngine.startRtmpStreamWithoutTranscoding', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -6967,6 +7307,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String url = "hello"; @@ -6976,7 +7317,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[startRtmpStreamWithoutTranscoding] error: ${e.toString()}'); + '[RtcEngine.startRtmpStreamWithoutTranscoding] error: ${e.toString()}'); rethrow; } @@ -6991,7 +7332,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startRtmpStreamWithTranscoding', + 'RtcEngine.startRtmpStreamWithTranscoding', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7001,6 +7342,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String url = "hello"; @@ -7062,7 +7404,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startRtmpStreamWithTranscoding] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startRtmpStreamWithTranscoding] error: ${e.toString()}'); rethrow; } @@ -7077,7 +7420,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updateRtmpTranscoding', + 'RtcEngine.updateRtmpTranscoding', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7087,6 +7430,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoCodecProfileType transcodingVideoCodecProfile = @@ -7146,40 +7490,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateRtmpTranscoding] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await rtcEngine.release(); - }, - ); - - testWidgets( - 'stopRtmpStream', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - try { - const String url = "hello"; - await rtcEngine.stopRtmpStream( - url, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[stopRtmpStream] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.updateRtmpTranscoding] error: ${e.toString()}'); rethrow; } @@ -7194,7 +7506,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startLocalVideoTranscoder', + 'RtcEngine.startLocalVideoTranscoder', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7204,6 +7516,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoCodecType videoOutputConfigurationCodecType = @@ -7261,7 +7574,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startLocalVideoTranscoder] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startLocalVideoTranscoder] error: ${e.toString()}'); rethrow; } @@ -7276,7 +7590,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updateLocalTranscoderConfiguration', + 'RtcEngine.updateLocalTranscoderConfiguration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7286,6 +7600,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoCodecType videoOutputConfigurationCodecType = @@ -7344,7 +7659,41 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[updateLocalTranscoderConfiguration] error: ${e.toString()}'); + '[RtcEngine.updateLocalTranscoderConfiguration] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + + testWidgets( + 'RtcEngine.stopRtmpStream', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + try { + const String url = "hello"; + await rtcEngine.stopRtmpStream( + url, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[RtcEngine.stopRtmpStream] error: ${e.toString()}'); rethrow; } @@ -7359,7 +7708,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopLocalVideoTranscoder', + 'RtcEngine.stopLocalVideoTranscoder', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7369,12 +7718,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopLocalVideoTranscoder(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopLocalVideoTranscoder] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.stopLocalVideoTranscoder] error: ${e.toString()}'); rethrow; } @@ -7389,7 +7740,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startCameraCapture', + 'RtcEngine.startCameraCapture', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7399,6 +7750,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType sourceType = @@ -7427,7 +7779,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startCameraCapture] error: ${e.toString()}'); + debugPrint('[RtcEngine.startCameraCapture] error: ${e.toString()}'); rethrow; } @@ -7442,7 +7794,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopCameraCapture', + 'RtcEngine.stopCameraCapture', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7452,6 +7804,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType sourceType = @@ -7461,7 +7814,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopCameraCapture] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopCameraCapture] error: ${e.toString()}'); rethrow; } @@ -7476,7 +7829,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCameraDeviceOrientation', + 'RtcEngine.setCameraDeviceOrientation', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7486,6 +7839,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType type = VideoSourceType.videoSourceCameraPrimary; @@ -7496,7 +7850,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setCameraDeviceOrientation] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setCameraDeviceOrientation] error: ${e.toString()}'); rethrow; } @@ -7511,7 +7866,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setScreenCaptureOrientation', + 'RtcEngine.setScreenCaptureOrientation', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7521,6 +7876,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoSourceType type = VideoSourceType.videoSourceCameraPrimary; @@ -7531,7 +7887,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setScreenCaptureOrientation] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setScreenCaptureOrientation] error: ${e.toString()}'); rethrow; } @@ -7546,7 +7903,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getConnectionState', + 'RtcEngine.getConnectionState', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7556,12 +7913,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getConnectionState(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getConnectionState] error: ${e.toString()}'); + debugPrint('[RtcEngine.getConnectionState] error: ${e.toString()}'); rethrow; } @@ -7576,7 +7934,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'registerEventHandler', + 'RtcEngine.registerEventHandler', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7586,6 +7944,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final RtcEngineEventHandler eventHandler = RtcEngineEventHandler( @@ -7627,7 +7986,7 @@ void rtcEngineSmokeTestCases() { int height, int rotation) {}, onLocalVideoStateChanged: (VideoSourceType source, - LocalVideoStreamState state, LocalVideoStreamError error) {}, + LocalVideoStreamState state, LocalVideoStreamReason reason) {}, onRemoteVideoStateChanged: (RtcConnection connection, int remoteUid, RemoteVideoState state, @@ -7649,10 +8008,10 @@ void rtcEngineSmokeTestCases() { (RtcConnection connection, int remoteUid, int state) {}, onUserEnableLocalVideo: (RtcConnection connection, int remoteUid, bool enabled) {}, - onLocalAudioStats: - (RtcConnection connection, LocalAudioStats stats) {}, onRemoteAudioStats: (RtcConnection connection, RemoteAudioStats stats) {}, + onLocalAudioStats: + (RtcConnection connection, LocalAudioStats stats) {}, onLocalVideoStats: (VideoSourceType source, LocalVideoStats stats) {}, onRemoteVideoStats: (RtcConnection connection, RemoteVideoStats stats) {}, @@ -7665,7 +8024,7 @@ void rtcEngineSmokeTestCases() { onAudioMixingStateChanged: (AudioMixingStateType state, AudioMixingReasonType reason) {}, onRhythmPlayerStateChanged: - (RhythmPlayerStateType state, RhythmPlayerErrorType errorCode) {}, + (RhythmPlayerStateType state, RhythmPlayerReason reason) {}, onConnectionLost: (RtcConnection connection) {}, onConnectionInterrupted: (RtcConnection connection) {}, onConnectionBanned: (RtcConnection connection) {}, @@ -7680,12 +8039,12 @@ void rtcEngineSmokeTestCases() { (RtcConnection connection, LicenseErrorType reason) {}, onFirstLocalAudioFramePublished: (RtcConnection connection, int elapsed) {}, - onFirstRemoteAudioFrame: - (RtcConnection connection, int userId, int elapsed) {}, onFirstRemoteAudioDecoded: (RtcConnection connection, int uid, int elapsed) {}, + onFirstRemoteAudioFrame: + (RtcConnection connection, int userId, int elapsed) {}, onLocalAudioStateChanged: (RtcConnection connection, - LocalAudioStreamState state, LocalAudioStreamError error) {}, + LocalAudioStreamState state, LocalAudioStreamReason reason) {}, onRemoteAudioStateChanged: (RtcConnection connection, int remoteUid, RemoteAudioState state, @@ -7705,14 +8064,12 @@ void rtcEngineSmokeTestCases() { onAudioDeviceVolumeChanged: (MediaDeviceType deviceType, int volume, bool muted) {}, onRtmpStreamingStateChanged: (String url, - RtmpStreamPublishState state, - RtmpStreamPublishErrorType errCode) {}, + RtmpStreamPublishState state, RtmpStreamPublishReason reason) {}, onRtmpStreamingEvent: (String url, RtmpStreamingEvent eventCode) {}, onTranscodingUpdated: () {}, onAudioRoutingChanged: (int routing) {}, onChannelMediaRelayStateChanged: (ChannelMediaRelayState state, ChannelMediaRelayError code) {}, - onChannelMediaRelayEvent: (ChannelMediaRelayEvent code) {}, onLocalPublishFallbackToAudioOnly: (bool isFallbackOrRecover) {}, onRemoteSubscribeFallbackToAudioOnly: (int uid, bool isFallbackOrRecover) {}, @@ -7732,6 +8089,14 @@ void rtcEngineSmokeTestCases() { onPermissionError: (PermissionType permissionType) {}, onLocalUserRegistered: (int uid, String userAccount) {}, onUserInfoUpdated: (int uid, UserInfo info) {}, + onUserAccountUpdated: (RtcConnection connection, int remoteUid, + String remoteUserAccount) {}, + onVideoRenderingTracingResult: (RtcConnection connection, + int uid, + MediaTraceEvent currentEvent, + VideoRenderingTracingInfo tracingInfo) {}, + onLocalVideoTranscoderError: + (TranscodingVideoStream stream, VideoTranscoderError error) {}, onUploadLogResult: (RtcConnection connection, String requestId, bool success, UploadErrorReason reason) {}, onAudioSubscribeStateChanged: (String channel, @@ -7753,27 +8118,22 @@ void rtcEngineSmokeTestCases() { StreamPublishState oldState, StreamPublishState newState, int elapseSinceLastState) {}, + onTranscodedStreamLayoutInfo: (RtcConnection connection, int uid, + int width, int height, int layoutCount, List layoutlist) {}, onExtensionEvent: (String provider, String extension, String key, String value) {}, onExtensionStarted: (String provider, String extension) {}, onExtensionStopped: (String provider, String extension) {}, onExtensionError: (String provider, String extension, int error, String message) {}, - onUserAccountUpdated: - (RtcConnection connection, int remoteUid, String userAccount) {}, - onLocalVideoTranscoderError: - (TranscodingVideoStream stream, VideoTranscoderError error) {}, - onVideoRenderingTracingResult: (RtcConnection connection, - int uid, - MediaTraceEvent currentEvent, - VideoRenderingTracingInfo tracingInfo) {}, + onSetRtmFlagResult: (RtcConnection connection, int code) {}, ); rtcEngine.registerEventHandler( eventHandler, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerEventHandler] error: ${e.toString()}'); + debugPrint('[RtcEngine.registerEventHandler] error: ${e.toString()}'); rethrow; } @@ -7788,7 +8148,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'unregisterEventHandler', + 'RtcEngine.unregisterEventHandler', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -7798,6 +8158,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final RtcEngineEventHandler eventHandler = RtcEngineEventHandler( @@ -7839,7 +8200,7 @@ void rtcEngineSmokeTestCases() { int height, int rotation) {}, onLocalVideoStateChanged: (VideoSourceType source, - LocalVideoStreamState state, LocalVideoStreamError error) {}, + LocalVideoStreamState state, LocalVideoStreamReason reason) {}, onRemoteVideoStateChanged: (RtcConnection connection, int remoteUid, RemoteVideoState state, @@ -7861,10 +8222,10 @@ void rtcEngineSmokeTestCases() { (RtcConnection connection, int remoteUid, int state) {}, onUserEnableLocalVideo: (RtcConnection connection, int remoteUid, bool enabled) {}, - onLocalAudioStats: - (RtcConnection connection, LocalAudioStats stats) {}, onRemoteAudioStats: (RtcConnection connection, RemoteAudioStats stats) {}, + onLocalAudioStats: + (RtcConnection connection, LocalAudioStats stats) {}, onLocalVideoStats: (VideoSourceType source, LocalVideoStats stats) {}, onRemoteVideoStats: (RtcConnection connection, RemoteVideoStats stats) {}, @@ -7877,7 +8238,7 @@ void rtcEngineSmokeTestCases() { onAudioMixingStateChanged: (AudioMixingStateType state, AudioMixingReasonType reason) {}, onRhythmPlayerStateChanged: - (RhythmPlayerStateType state, RhythmPlayerErrorType errorCode) {}, + (RhythmPlayerStateType state, RhythmPlayerReason reason) {}, onConnectionLost: (RtcConnection connection) {}, onConnectionInterrupted: (RtcConnection connection) {}, onConnectionBanned: (RtcConnection connection) {}, @@ -7892,12 +8253,12 @@ void rtcEngineSmokeTestCases() { (RtcConnection connection, LicenseErrorType reason) {}, onFirstLocalAudioFramePublished: (RtcConnection connection, int elapsed) {}, - onFirstRemoteAudioFrame: - (RtcConnection connection, int userId, int elapsed) {}, onFirstRemoteAudioDecoded: (RtcConnection connection, int uid, int elapsed) {}, + onFirstRemoteAudioFrame: + (RtcConnection connection, int userId, int elapsed) {}, onLocalAudioStateChanged: (RtcConnection connection, - LocalAudioStreamState state, LocalAudioStreamError error) {}, + LocalAudioStreamState state, LocalAudioStreamReason reason) {}, onRemoteAudioStateChanged: (RtcConnection connection, int remoteUid, RemoteAudioState state, @@ -7917,14 +8278,12 @@ void rtcEngineSmokeTestCases() { onAudioDeviceVolumeChanged: (MediaDeviceType deviceType, int volume, bool muted) {}, onRtmpStreamingStateChanged: (String url, - RtmpStreamPublishState state, - RtmpStreamPublishErrorType errCode) {}, + RtmpStreamPublishState state, RtmpStreamPublishReason reason) {}, onRtmpStreamingEvent: (String url, RtmpStreamingEvent eventCode) {}, onTranscodingUpdated: () {}, onAudioRoutingChanged: (int routing) {}, onChannelMediaRelayStateChanged: (ChannelMediaRelayState state, ChannelMediaRelayError code) {}, - onChannelMediaRelayEvent: (ChannelMediaRelayEvent code) {}, onLocalPublishFallbackToAudioOnly: (bool isFallbackOrRecover) {}, onRemoteSubscribeFallbackToAudioOnly: (int uid, bool isFallbackOrRecover) {}, @@ -7944,6 +8303,14 @@ void rtcEngineSmokeTestCases() { onPermissionError: (PermissionType permissionType) {}, onLocalUserRegistered: (int uid, String userAccount) {}, onUserInfoUpdated: (int uid, UserInfo info) {}, + onUserAccountUpdated: (RtcConnection connection, int remoteUid, + String remoteUserAccount) {}, + onVideoRenderingTracingResult: (RtcConnection connection, + int uid, + MediaTraceEvent currentEvent, + VideoRenderingTracingInfo tracingInfo) {}, + onLocalVideoTranscoderError: + (TranscodingVideoStream stream, VideoTranscoderError error) {}, onUploadLogResult: (RtcConnection connection, String requestId, bool success, UploadErrorReason reason) {}, onAudioSubscribeStateChanged: (String channel, @@ -7965,27 +8332,23 @@ void rtcEngineSmokeTestCases() { StreamPublishState oldState, StreamPublishState newState, int elapseSinceLastState) {}, + onTranscodedStreamLayoutInfo: (RtcConnection connection, int uid, + int width, int height, int layoutCount, List layoutlist) {}, onExtensionEvent: (String provider, String extension, String key, String value) {}, onExtensionStarted: (String provider, String extension) {}, onExtensionStopped: (String provider, String extension) {}, onExtensionError: (String provider, String extension, int error, String message) {}, - onUserAccountUpdated: - (RtcConnection connection, int remoteUid, String userAccount) {}, - onLocalVideoTranscoderError: - (TranscodingVideoStream stream, VideoTranscoderError error) {}, - onVideoRenderingTracingResult: (RtcConnection connection, - int uid, - MediaTraceEvent currentEvent, - VideoRenderingTracingInfo tracingInfo) {}, + onSetRtmFlagResult: (RtcConnection connection, int code) {}, ); rtcEngine.unregisterEventHandler( eventHandler, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[unregisterEventHandler] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.unregisterEventHandler] error: ${e.toString()}'); rethrow; } @@ -8000,7 +8363,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setRemoteUserPriority', + 'RtcEngine.setRemoteUserPriority', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8010,6 +8373,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -8020,7 +8384,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteUserPriority] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setRemoteUserPriority] error: ${e.toString()}'); rethrow; } @@ -8035,7 +8400,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setEncryptionMode', + 'RtcEngine.setEncryptionMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8045,6 +8410,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String encryptionMode = "hello"; @@ -8053,7 +8419,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setEncryptionMode] error: ${e.toString()}'); + debugPrint('[RtcEngine.setEncryptionMode] error: ${e.toString()}'); rethrow; } @@ -8068,7 +8434,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setEncryptionSecret', + 'RtcEngine.setEncryptionSecret', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8078,6 +8444,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String secret = "hello"; @@ -8086,7 +8453,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setEncryptionSecret] error: ${e.toString()}'); + debugPrint('[RtcEngine.setEncryptionSecret] error: ${e.toString()}'); rethrow; } @@ -8101,7 +8468,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableEncryption', + 'RtcEngine.enableEncryption', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8111,6 +8478,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -8128,7 +8496,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableEncryption] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableEncryption] error: ${e.toString()}'); rethrow; } @@ -8143,7 +8511,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'sendStreamMessage', + 'RtcEngine.sendStreamMessage', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8153,6 +8521,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int streamId = 10; @@ -8165,7 +8534,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[sendStreamMessage] error: ${e.toString()}'); + debugPrint('[RtcEngine.sendStreamMessage] error: ${e.toString()}'); rethrow; } @@ -8180,7 +8549,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'addVideoWatermark', + 'RtcEngine.addVideoWatermark', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8190,6 +8559,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String watermarkUrl = "hello"; @@ -8237,7 +8607,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[addVideoWatermark] error: ${e.toString()}'); + debugPrint('[RtcEngine.addVideoWatermark] error: ${e.toString()}'); rethrow; } @@ -8252,7 +8622,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'clearVideoWatermarks', + 'RtcEngine.clearVideoWatermarks', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8262,12 +8632,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.clearVideoWatermarks(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[clearVideoWatermarks] error: ${e.toString()}'); + debugPrint('[RtcEngine.clearVideoWatermarks] error: ${e.toString()}'); rethrow; } @@ -8282,7 +8653,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'pauseAudio', + 'RtcEngine.pauseAudio', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8292,12 +8663,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.pauseAudio(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pauseAudio] error: ${e.toString()}'); + debugPrint('[RtcEngine.pauseAudio] error: ${e.toString()}'); rethrow; } @@ -8312,7 +8684,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'resumeAudio', + 'RtcEngine.resumeAudio', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8322,12 +8694,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.resumeAudio(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[resumeAudio] error: ${e.toString()}'); + debugPrint('[RtcEngine.resumeAudio] error: ${e.toString()}'); rethrow; } @@ -8342,7 +8715,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableWebSdkInteroperability', + 'RtcEngine.enableWebSdkInteroperability', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8352,6 +8725,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -8360,7 +8734,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableWebSdkInteroperability] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableWebSdkInteroperability] error: ${e.toString()}'); rethrow; } @@ -8375,7 +8750,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'sendCustomReportMessage', + 'RtcEngine.sendCustomReportMessage', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8385,6 +8760,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String id = "hello"; @@ -8401,7 +8777,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[sendCustomReportMessage] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.sendCustomReportMessage] error: ${e.toString()}'); rethrow; } @@ -8416,7 +8793,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'registerMediaMetadataObserver', + 'RtcEngine.registerMediaMetadataObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8426,6 +8803,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final MetadataObserver observer = MetadataObserver( @@ -8438,7 +8816,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerMediaMetadataObserver] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.registerMediaMetadataObserver] error: ${e.toString()}'); rethrow; } @@ -8453,7 +8832,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'unregisterMediaMetadataObserver', + 'RtcEngine.unregisterMediaMetadataObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8463,6 +8842,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final MetadataObserver observer = MetadataObserver( @@ -8476,7 +8856,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[unregisterMediaMetadataObserver] error: ${e.toString()}'); + '[RtcEngine.unregisterMediaMetadataObserver] error: ${e.toString()}'); rethrow; } @@ -8491,7 +8871,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startAudioFrameDump', + 'RtcEngine.startAudioFrameDump', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8501,10 +8881,11 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String channelId = "hello"; - const int userId = 10; + const int uid = 10; const String location = "hello"; const String uuid = "hello"; const String passwd = "hello"; @@ -8512,7 +8893,7 @@ void rtcEngineSmokeTestCases() { const bool autoUpload = true; await rtcEngine.startAudioFrameDump( channelId: channelId, - userId: userId, + uid: uid, location: location, uuid: uuid, passwd: passwd, @@ -8521,7 +8902,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startAudioFrameDump] error: ${e.toString()}'); + debugPrint('[RtcEngine.startAudioFrameDump] error: ${e.toString()}'); rethrow; } @@ -8536,7 +8917,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopAudioFrameDump', + 'RtcEngine.stopAudioFrameDump', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8546,19 +8927,20 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String channelId = "hello"; - const int userId = 10; + const int uid = 10; const String location = "hello"; await rtcEngine.stopAudioFrameDump( channelId: channelId, - userId: userId, + uid: uid, location: location, ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopAudioFrameDump] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopAudioFrameDump] error: ${e.toString()}'); rethrow; } @@ -8573,7 +8955,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAINSMode', + 'RtcEngine.setAINSMode', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8583,6 +8965,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -8593,7 +8976,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAINSMode] error: ${e.toString()}'); + debugPrint('[RtcEngine.setAINSMode] error: ${e.toString()}'); rethrow; } @@ -8608,7 +8991,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'registerLocalUserAccount', + 'RtcEngine.registerLocalUserAccount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8618,6 +9001,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String appId = "hello"; @@ -8628,7 +9012,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[registerLocalUserAccount] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.registerLocalUserAccount] error: ${e.toString()}'); rethrow; } @@ -8643,7 +9028,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'joinChannelWithUserAccount', + 'RtcEngine.joinChannelWithUserAccount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8653,6 +9038,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -8684,6 +9070,7 @@ void rtcEngineSmokeTestCases() { const bool optionsPublishMediaPlayerAudioTrack = true; const bool optionsPublishMediaPlayerVideoTrack = true; const bool optionsPublishTranscodedVideoTrack = true; + const bool optionsPublishMixedAudioTrack = true; const bool optionsAutoSubscribeAudio = true; const bool optionsAutoSubscribeVideo = true; const bool optionsEnableAudioRecordingOrPlayout = true; @@ -8715,6 +9102,7 @@ void rtcEngineSmokeTestCases() { publishMediaPlayerAudioTrack: optionsPublishMediaPlayerAudioTrack, publishMediaPlayerVideoTrack: optionsPublishMediaPlayerVideoTrack, publishTranscodedVideoTrack: optionsPublishTranscodedVideoTrack, + publishMixedAudioTrack: optionsPublishMixedAudioTrack, autoSubscribeAudio: optionsAutoSubscribeAudio, autoSubscribeVideo: optionsAutoSubscribeVideo, enableAudioRecordingOrPlayout: optionsEnableAudioRecordingOrPlayout, @@ -8740,7 +9128,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[joinChannelWithUserAccount] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.joinChannelWithUserAccount] error: ${e.toString()}'); rethrow; } @@ -8755,7 +9144,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'joinChannelWithUserAccountEx', + 'RtcEngine.joinChannelWithUserAccountEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8765,6 +9154,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -8796,6 +9186,7 @@ void rtcEngineSmokeTestCases() { const bool optionsPublishMediaPlayerAudioTrack = true; const bool optionsPublishMediaPlayerVideoTrack = true; const bool optionsPublishTranscodedVideoTrack = true; + const bool optionsPublishMixedAudioTrack = true; const bool optionsAutoSubscribeAudio = true; const bool optionsAutoSubscribeVideo = true; const bool optionsEnableAudioRecordingOrPlayout = true; @@ -8827,6 +9218,7 @@ void rtcEngineSmokeTestCases() { publishMediaPlayerAudioTrack: optionsPublishMediaPlayerAudioTrack, publishMediaPlayerVideoTrack: optionsPublishMediaPlayerVideoTrack, publishTranscodedVideoTrack: optionsPublishTranscodedVideoTrack, + publishMixedAudioTrack: optionsPublishMixedAudioTrack, autoSubscribeAudio: optionsAutoSubscribeAudio, autoSubscribeVideo: optionsAutoSubscribeVideo, enableAudioRecordingOrPlayout: optionsEnableAudioRecordingOrPlayout, @@ -8852,7 +9244,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[joinChannelWithUserAccountEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.joinChannelWithUserAccountEx] error: ${e.toString()}'); rethrow; } @@ -8867,7 +9260,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getUserInfoByUserAccount', + 'RtcEngine.getUserInfoByUserAccount', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8877,6 +9270,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String userAccount = "hello"; @@ -8885,7 +9279,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getUserInfoByUserAccount] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getUserInfoByUserAccount] error: ${e.toString()}'); rethrow; } @@ -8900,7 +9295,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getUserInfoByUid', + 'RtcEngine.getUserInfoByUid', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8910,6 +9305,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -8918,7 +9314,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getUserInfoByUid] error: ${e.toString()}'); + debugPrint('[RtcEngine.getUserInfoByUid] error: ${e.toString()}'); rethrow; } @@ -8933,7 +9329,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopChannelMediaRelay', + 'RtcEngine.stopChannelMediaRelay', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8943,12 +9339,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopChannelMediaRelay(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopChannelMediaRelay] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.stopChannelMediaRelay] error: ${e.toString()}'); rethrow; } @@ -8963,7 +9361,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'pauseAllChannelMediaRelay', + 'RtcEngine.pauseAllChannelMediaRelay', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -8973,12 +9371,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.pauseAllChannelMediaRelay(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pauseAllChannelMediaRelay] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.pauseAllChannelMediaRelay] error: ${e.toString()}'); rethrow; } @@ -8993,7 +9393,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'resumeAllChannelMediaRelay', + 'RtcEngine.resumeAllChannelMediaRelay', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9003,12 +9403,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.resumeAllChannelMediaRelay(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[resumeAllChannelMediaRelay] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.resumeAllChannelMediaRelay] error: ${e.toString()}'); rethrow; } @@ -9023,7 +9425,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setDirectCdnStreamingAudioConfiguration', + 'RtcEngine.setDirectCdnStreamingAudioConfiguration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9033,6 +9435,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const AudioProfileType profile = AudioProfileType.audioProfileDefault; @@ -9042,7 +9445,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setDirectCdnStreamingAudioConfiguration] error: ${e.toString()}'); + '[RtcEngine.setDirectCdnStreamingAudioConfiguration] error: ${e.toString()}'); rethrow; } @@ -9057,7 +9460,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setDirectCdnStreamingVideoConfiguration', + 'RtcEngine.setDirectCdnStreamingVideoConfiguration', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9067,6 +9470,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoCodecType configCodecType = VideoCodecType.videoCodecNone; @@ -9110,7 +9514,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setDirectCdnStreamingVideoConfiguration] error: ${e.toString()}'); + '[RtcEngine.setDirectCdnStreamingVideoConfiguration] error: ${e.toString()}'); rethrow; } @@ -9125,7 +9529,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startDirectCdnStreaming', + 'RtcEngine.startDirectCdnStreaming', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9135,12 +9539,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final DirectCdnStreamingEventHandler eventHandler = DirectCdnStreamingEventHandler( onDirectCdnStreamingStateChanged: (DirectCdnStreamingState state, - DirectCdnStreamingError error, String message) {}, + DirectCdnStreamingReason reason, String message) {}, onDirectCdnStreamingStats: (DirectCdnStreamingStats stats) {}, ); const String publishUrl = "hello"; @@ -9168,7 +9573,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startDirectCdnStreaming] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startDirectCdnStreaming] error: ${e.toString()}'); rethrow; } @@ -9183,7 +9589,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopDirectCdnStreaming', + 'RtcEngine.stopDirectCdnStreaming', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9193,12 +9599,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopDirectCdnStreaming(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopDirectCdnStreaming] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.stopDirectCdnStreaming] error: ${e.toString()}'); rethrow; } @@ -9213,7 +9621,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'updateDirectCdnStreamingMediaOptions', + 'RtcEngine.updateDirectCdnStreamingMediaOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9223,6 +9631,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool optionsPublishCameraTrack = true; @@ -9248,7 +9657,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[updateDirectCdnStreamingMediaOptions] error: ${e.toString()}'); + '[RtcEngine.updateDirectCdnStreamingMediaOptions] error: ${e.toString()}'); rethrow; } @@ -9263,7 +9672,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startRhythmPlayer', + 'RtcEngine.startRhythmPlayer', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9273,6 +9682,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String sound1 = "hello"; @@ -9290,7 +9700,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startRhythmPlayer] error: ${e.toString()}'); + debugPrint('[RtcEngine.startRhythmPlayer] error: ${e.toString()}'); rethrow; } @@ -9305,7 +9715,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'stopRhythmPlayer', + 'RtcEngine.stopRhythmPlayer', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9315,12 +9725,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.stopRhythmPlayer(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopRhythmPlayer] error: ${e.toString()}'); + debugPrint('[RtcEngine.stopRhythmPlayer] error: ${e.toString()}'); rethrow; } @@ -9335,7 +9746,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'configRhythmPlayer', + 'RtcEngine.configRhythmPlayer', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9345,6 +9756,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int configBeatsPerMeasure = 10; @@ -9358,7 +9770,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[configRhythmPlayer] error: ${e.toString()}'); + debugPrint('[RtcEngine.configRhythmPlayer] error: ${e.toString()}'); rethrow; } @@ -9373,7 +9785,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'takeSnapshot', + 'RtcEngine.takeSnapshot', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9383,6 +9795,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -9393,7 +9806,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[takeSnapshot] error: ${e.toString()}'); + debugPrint('[RtcEngine.takeSnapshot] error: ${e.toString()}'); rethrow; } @@ -9408,7 +9821,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableContentInspect', + 'RtcEngine.enableContentInspect', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9418,6 +9831,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -9437,7 +9851,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableContentInspect] error: ${e.toString()}'); + debugPrint('[RtcEngine.enableContentInspect] error: ${e.toString()}'); rethrow; } @@ -9452,7 +9866,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustCustomAudioPublishVolume', + 'RtcEngine.adjustCustomAudioPublishVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9462,6 +9876,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int trackId = 10; @@ -9472,7 +9887,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustCustomAudioPublishVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustCustomAudioPublishVolume] error: ${e.toString()}'); rethrow; } @@ -9487,7 +9903,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'adjustCustomAudioPlayoutVolume', + 'RtcEngine.adjustCustomAudioPlayoutVolume', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9497,6 +9913,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int trackId = 10; @@ -9507,7 +9924,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustCustomAudioPlayoutVolume] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.adjustCustomAudioPlayoutVolume] error: ${e.toString()}'); rethrow; } @@ -9522,7 +9940,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setCloudProxy', + 'RtcEngine.setCloudProxy', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9532,6 +9950,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const CloudProxyType proxyType = CloudProxyType.noneProxy; @@ -9540,7 +9959,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setCloudProxy] error: ${e.toString()}'); + debugPrint('[RtcEngine.setCloudProxy] error: ${e.toString()}'); rethrow; } @@ -9555,7 +9974,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAdvancedAudioOptions', + 'RtcEngine.setAdvancedAudioOptions', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9565,6 +9984,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int optionsAudioProcessingChannels = 10; @@ -9578,7 +9998,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAdvancedAudioOptions] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.setAdvancedAudioOptions] error: ${e.toString()}'); rethrow; } @@ -9593,7 +10014,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setAVSyncSource', + 'RtcEngine.setAVSyncSource', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9603,6 +10024,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String channelId = "hello"; @@ -9613,7 +10035,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setAVSyncSource] error: ${e.toString()}'); + debugPrint('[RtcEngine.setAVSyncSource] error: ${e.toString()}'); rethrow; } @@ -9628,7 +10050,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableVideoImageSource', + 'RtcEngine.enableVideoImageSource', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9638,6 +10060,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enable = true; @@ -9656,7 +10079,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableVideoImageSource] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableVideoImageSource] error: ${e.toString()}'); rethrow; } @@ -9671,7 +10095,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getCurrentMonotonicTimeInMs', + 'RtcEngine.getCurrentMonotonicTimeInMs', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9681,12 +10105,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getCurrentMonotonicTimeInMs(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getCurrentMonotonicTimeInMs] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getCurrentMonotonicTimeInMs] error: ${e.toString()}'); rethrow; } @@ -9701,7 +10127,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableWirelessAccelerate', + 'RtcEngine.enableWirelessAccelerate', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9711,6 +10137,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -9719,7 +10146,8 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableWirelessAccelerate] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableWirelessAccelerate] error: ${e.toString()}'); rethrow; } @@ -9734,7 +10162,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getNetworkType', + 'RtcEngine.getNetworkType', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9744,12 +10172,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getNetworkType(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getNetworkType] error: ${e.toString()}'); + debugPrint('[RtcEngine.getNetworkType] error: ${e.toString()}'); rethrow; } @@ -9764,7 +10193,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setParameters', + 'RtcEngine.setParameters', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9774,6 +10203,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const String parameters = "hello"; @@ -9782,7 +10212,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setParameters] error: ${e.toString()}'); + debugPrint('[RtcEngine.setParameters] error: ${e.toString()}'); rethrow; } @@ -9797,7 +10227,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'startMediaRenderingTracing', + 'RtcEngine.startMediaRenderingTracing', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9807,12 +10237,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.startMediaRenderingTracing(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startMediaRenderingTracing] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.startMediaRenderingTracing] error: ${e.toString()}'); rethrow; } @@ -9827,7 +10259,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'enableInstantMediaRendering', + 'RtcEngine.enableInstantMediaRendering', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9837,12 +10269,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.enableInstantMediaRendering(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableInstantMediaRendering] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.enableInstantMediaRendering] error: ${e.toString()}'); rethrow; } @@ -9857,7 +10291,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getNtpWallTimeInMs', + 'RtcEngine.getNtpWallTimeInMs', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9867,12 +10301,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getNtpWallTimeInMs(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getNtpWallTimeInMs] error: ${e.toString()}'); + debugPrint('[RtcEngine.getNtpWallTimeInMs] error: ${e.toString()}'); rethrow; } @@ -9887,7 +10322,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'isFeatureAvailableOnDevice', + 'RtcEngine.isFeatureAvailableOnDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9897,6 +10332,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const FeatureType type = FeatureType.videoVirtualBackground; @@ -9905,7 +10341,42 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[isFeatureAvailableOnDevice] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.isFeatureAvailableOnDevice] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + + testWidgets( + 'RtcEngine.release', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + try { + const bool sync = true; + await rtcEngine.release( + sync: sync, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[RtcEngine.release] error: ${e.toString()}'); rethrow; } @@ -9920,7 +10391,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getAudioDeviceManager', + 'RtcEngine.getAudioDeviceManager', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9930,12 +10401,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { rtcEngine.getAudioDeviceManager(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getAudioDeviceManager] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getAudioDeviceManager] error: ${e.toString()}'); rethrow; } @@ -9950,7 +10423,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getVideoDeviceManager', + 'RtcEngine.getVideoDeviceManager', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9960,12 +10433,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { rtcEngine.getVideoDeviceManager(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getVideoDeviceManager] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getVideoDeviceManager] error: ${e.toString()}'); rethrow; } @@ -9980,7 +10455,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getMusicContentCenter', + 'RtcEngine.getMusicContentCenter', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -9990,12 +10465,14 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { rtcEngine.getMusicContentCenter(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getMusicContentCenter] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getMusicContentCenter] error: ${e.toString()}'); rethrow; } @@ -10010,7 +10487,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getMediaEngine', + 'RtcEngine.getMediaEngine', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -10020,12 +10497,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { rtcEngine.getMediaEngine(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getMediaEngine] error: ${e.toString()}'); + debugPrint('[RtcEngine.getMediaEngine] error: ${e.toString()}'); rethrow; } @@ -10040,7 +10518,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getLocalSpatialAudioEngine', + 'RtcEngine.getLocalSpatialAudioEngine', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -10050,12 +10528,45 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { rtcEngine.getLocalSpatialAudioEngine(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getLocalSpatialAudioEngine] error: ${e.toString()}'); + debugPrint( + '[RtcEngine.getLocalSpatialAudioEngine] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngine.release(); + }, + ); + + testWidgets( + 'RtcEngine.getH265Transcoder', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + try { + rtcEngine.getH265Transcoder(); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[RtcEngine.getH265Transcoder] error: ${e.toString()}'); rethrow; } @@ -10070,7 +10581,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'sendMetaData', + 'RtcEngine.sendMetaData', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -10080,6 +10591,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int metadataUid = 10; @@ -10100,7 +10612,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[sendMetaData] error: ${e.toString()}'); + debugPrint('[RtcEngine.sendMetaData] error: ${e.toString()}'); rethrow; } @@ -10115,7 +10627,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'setMaxMetadataSize', + 'RtcEngine.setMaxMetadataSize', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -10125,6 +10637,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { const int size = 10; @@ -10133,7 +10646,7 @@ void rtcEngineSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setMaxMetadataSize] error: ${e.toString()}'); + debugPrint('[RtcEngine.setMaxMetadataSize] error: ${e.toString()}'); rethrow; } @@ -10148,7 +10661,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'unregisterAudioEncodedFrameObserver', + 'RtcEngine.unregisterAudioEncodedFrameObserver', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -10158,6 +10671,7 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { final AudioEncodedFrameObserver observer = AudioEncodedFrameObserver( @@ -10174,7 +10688,7 @@ void rtcEngineSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[unregisterAudioEncodedFrameObserver] error: ${e.toString()}'); + '[RtcEngine.unregisterAudioEncodedFrameObserver] error: ${e.toString()}'); rethrow; } @@ -10189,7 +10703,7 @@ void rtcEngineSmokeTestCases() { ); testWidgets( - 'getNativeHandle', + 'RtcEngine.getNativeHandle', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -10199,12 +10713,13 @@ void rtcEngineSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { await rtcEngine.getNativeHandle(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getNativeHandle] error: ${e.toString()}'); + debugPrint('[RtcEngine.getNativeHandle] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_metadataobserver_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_metadataobserver_testcases.generated.dart index 6ce5952ad..57d65ec41 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_metadataobserver_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_metadataobserver_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onMetadataReceived', + 'MetadataObserver.onMetadataReceived', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onMetadataReceivedCompleter = Completer(); final theMetadataObserver = MetadataObserver( @@ -54,17 +57,14 @@ void generatedTestCases(IrisTester irisTester) { 'metadata': metadata.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('MetadataObserver_onMetadataReceived', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'MetadataObserver_onMetadataReceived', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['MetadataObserver_onMetadataReceived'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onMetadataReceivedCompleter.isCompleted) { onMetadataReceivedCompleter.complete(true); } diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart index 804353a81..1b49161b1 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengine_rtcengineeventhandler_testcases.generated.dart @@ -11,15 +11,18 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { testWidgets( - 'onJoinChannelSuccess', + 'RtcEngineEventHandler.onJoinChannelSuccess', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onJoinChannelSuccessCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -49,19 +52,14 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onJoinChannelSuccess', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onJoinChannelSuccess', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onJoinChannelSuccessEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onJoinChannelSuccess'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onJoinChannelSuccessCompleter.isCompleted) { onJoinChannelSuccessCompleter.complete(true); } @@ -86,13 +84,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRejoinChannelSuccess', + 'RtcEngineEventHandler.onRejoinChannelSuccess', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRejoinChannelSuccessCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -122,19 +121,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onRejoinChannelSuccess', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onRejoinChannelSuccess', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRejoinChannelSuccessEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onRejoinChannelSuccess'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRejoinChannelSuccessCompleter.isCompleted) { onRejoinChannelSuccessCompleter.complete(true); } @@ -159,13 +154,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onProxyConnected', + 'RtcEngineEventHandler.onProxyConnected', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onProxyConnectedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -197,19 +193,14 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onProxyConnected', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onProxyConnected', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onProxyConnected', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onProxyConnected'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onProxyConnectedCompleter.isCompleted) { onProxyConnectedCompleter.complete(true); } @@ -234,13 +225,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onError', + 'RtcEngineEventHandler.onError', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onErrorCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -265,18 +257,13 @@ void generatedTestCases(IrisTester irisTester) { 'msg': msg, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onError', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onError', - params: eventJson); - } else { - final ret = irisTester.fireEvent('RtcEngineEventHandler_onError', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping['RtcEngineEventHandler_onError'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onErrorCompleter.isCompleted) { onErrorCompleter.complete(true); } @@ -301,13 +288,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioQuality', + 'RtcEngineEventHandler.onAudioQuality', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioQualityCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -344,19 +332,14 @@ void generatedTestCases(IrisTester irisTester) { 'lost': lost, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onAudioQuality', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onAudioQuality', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioQualityEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onAudioQuality'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioQualityCompleter.isCompleted) { onAudioQualityCompleter.complete(true); } @@ -381,13 +364,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLastmileProbeResult', + 'RtcEngineEventHandler.onLastmileProbeResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLastmileProbeResultCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -436,19 +420,15 @@ void generatedTestCases(IrisTester irisTester) { 'result': result.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLastmileProbeResult', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onLastmileProbeResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLastmileProbeResult', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLastmileProbeResult'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLastmileProbeResultCompleter.isCompleted) { onLastmileProbeResultCompleter.complete(true); } @@ -473,13 +453,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioVolumeIndication', + 'RtcEngineEventHandler.onAudioVolumeIndication', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioVolumeIndicationCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -514,20 +495,15 @@ void generatedTestCases(IrisTester irisTester) { 'totalVolume': totalVolume, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onAudioVolumeIndication', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onAudioVolumeIndication', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioVolumeIndicationEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onAudioVolumeIndication'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioVolumeIndicationCompleter.isCompleted) { onAudioVolumeIndicationCompleter.complete(true); } @@ -552,13 +528,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLeaveChannel', + 'RtcEngineEventHandler.onLeaveChannel', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLeaveChannelCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -662,19 +639,14 @@ void generatedTestCases(IrisTester irisTester) { 'stats': stats.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLeaveChannel', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onLeaveChannel', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLeaveChannelEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLeaveChannel'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLeaveChannelCompleter.isCompleted) { onLeaveChannelCompleter.complete(true); } @@ -699,13 +671,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRtcStats', + 'RtcEngineEventHandler.onRtcStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRtcStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -809,18 +782,14 @@ void generatedTestCases(IrisTester irisTester) { 'stats': stats.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onRtcStats', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onRtcStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent('RtcEngineEventHandler_onRtcStatsEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onRtcStats'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRtcStatsCompleter.isCompleted) { onRtcStatsCompleter.complete(true); } @@ -845,13 +814,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioDeviceStateChanged', + 'RtcEngineEventHandler.onAudioDeviceStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioDeviceStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -880,21 +850,15 @@ void generatedTestCases(IrisTester irisTester) { 'deviceState': deviceState.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioDeviceStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onAudioDeviceStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioDeviceStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onAudioDeviceStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioDeviceStateChangedCompleter.isCompleted) { onAudioDeviceStateChangedCompleter.complete(true); } @@ -919,13 +883,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioMixingPositionChanged', + 'RtcEngineEventHandler.onAudioMixingPositionChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioMixingPositionChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -948,21 +913,15 @@ void generatedTestCases(IrisTester irisTester) { 'position': position, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioMixingPositionChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onAudioMixingPositionChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioMixingPositionChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onAudioMixingPositionChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioMixingPositionChangedCompleter.isCompleted) { onAudioMixingPositionChangedCompleter.complete(true); } @@ -987,13 +946,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioMixingFinished', + 'RtcEngineEventHandler.onAudioMixingFinished', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioMixingFinishedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1012,19 +972,15 @@ void generatedTestCases(IrisTester irisTester) { { final eventJson = {}; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onAudioMixingFinished', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onAudioMixingFinished', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioMixingFinished', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onAudioMixingFinished'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioMixingFinishedCompleter.isCompleted) { onAudioMixingFinishedCompleter.complete(true); } @@ -1049,13 +1005,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioEffectFinished', + 'RtcEngineEventHandler.onAudioEffectFinished', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioEffectFinishedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1078,19 +1035,15 @@ void generatedTestCases(IrisTester irisTester) { 'soundId': soundId, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onAudioEffectFinished', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onAudioEffectFinished', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioEffectFinished', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onAudioEffectFinished'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioEffectFinishedCompleter.isCompleted) { onAudioEffectFinishedCompleter.complete(true); } @@ -1115,13 +1068,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onVideoDeviceStateChanged', + 'RtcEngineEventHandler.onVideoDeviceStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onVideoDeviceStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1150,21 +1104,15 @@ void generatedTestCases(IrisTester irisTester) { 'deviceState': deviceState.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoDeviceStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onVideoDeviceStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoDeviceStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onVideoDeviceStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onVideoDeviceStateChangedCompleter.isCompleted) { onVideoDeviceStateChangedCompleter.complete(true); } @@ -1189,13 +1137,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onNetworkQuality', + 'RtcEngineEventHandler.onNetworkQuality', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onNetworkQualityCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1230,19 +1179,14 @@ void generatedTestCases(IrisTester irisTester) { 'rxQuality': rxQuality.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onNetworkQuality', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onNetworkQuality', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onNetworkQualityEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onNetworkQuality'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onNetworkQualityCompleter.isCompleted) { onNetworkQualityCompleter.complete(true); } @@ -1267,13 +1211,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onIntraRequestReceived', + 'RtcEngineEventHandler.onIntraRequestReceived', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onIntraRequestReceivedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1301,19 +1246,15 @@ void generatedTestCases(IrisTester irisTester) { 'connection': connection.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onIntraRequestReceived', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onIntraRequestReceived', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onIntraRequestReceivedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onIntraRequestReceived'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onIntraRequestReceivedCompleter.isCompleted) { onIntraRequestReceivedCompleter.complete(true); } @@ -1338,13 +1279,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUplinkNetworkInfoUpdated', + 'RtcEngineEventHandler.onUplinkNetworkInfoUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUplinkNetworkInfoUpdatedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1370,21 +1312,15 @@ void generatedTestCases(IrisTester irisTester) { 'info': info.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onUplinkNetworkInfoUpdated', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onUplinkNetworkInfoUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUplinkNetworkInfoUpdated', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onUplinkNetworkInfoUpdated'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUplinkNetworkInfoUpdatedCompleter.isCompleted) { onUplinkNetworkInfoUpdatedCompleter.complete(true); } @@ -1409,13 +1345,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onDownlinkNetworkInfoUpdated', + 'RtcEngineEventHandler.onDownlinkNetworkInfoUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onDownlinkNetworkInfoUpdatedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1449,21 +1386,15 @@ void generatedTestCases(IrisTester irisTester) { 'info': info.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onDownlinkNetworkInfoUpdated', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onDownlinkNetworkInfoUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onDownlinkNetworkInfoUpdated', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onDownlinkNetworkInfoUpdated'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onDownlinkNetworkInfoUpdatedCompleter.isCompleted) { onDownlinkNetworkInfoUpdatedCompleter.complete(true); } @@ -1488,13 +1419,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLastmileQuality', + 'RtcEngineEventHandler.onLastmileQuality', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLastmileQualityCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1517,19 +1449,14 @@ void generatedTestCases(IrisTester irisTester) { 'quality': quality.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLastmileQuality', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onLastmileQuality', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLastmileQuality', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLastmileQuality'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLastmileQualityCompleter.isCompleted) { onLastmileQualityCompleter.complete(true); } @@ -1554,13 +1481,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onFirstLocalVideoFrame', + 'RtcEngineEventHandler.onFirstLocalVideoFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onFirstLocalVideoFrameCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1590,19 +1518,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onFirstLocalVideoFrame', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onFirstLocalVideoFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstLocalVideoFrame', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onFirstLocalVideoFrame'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onFirstLocalVideoFrameCompleter.isCompleted) { onFirstLocalVideoFrameCompleter.complete(true); } @@ -1627,13 +1551,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onFirstLocalVideoFramePublished', + 'RtcEngineEventHandler.onFirstLocalVideoFramePublished', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onFirstLocalVideoFramePublishedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1658,21 +1583,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstLocalVideoFramePublished', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onFirstLocalVideoFramePublished', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstLocalVideoFramePublished', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onFirstLocalVideoFramePublished'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onFirstLocalVideoFramePublishedCompleter.isCompleted) { onFirstLocalVideoFramePublishedCompleter.complete(true); } @@ -1697,13 +1616,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onFirstRemoteVideoDecoded', + 'RtcEngineEventHandler.onFirstRemoteVideoDecoded', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onFirstRemoteVideoDecodedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1740,21 +1660,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstRemoteVideoDecoded', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onFirstRemoteVideoDecoded', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstRemoteVideoDecodedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onFirstRemoteVideoDecoded'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onFirstRemoteVideoDecodedCompleter.isCompleted) { onFirstRemoteVideoDecodedCompleter.complete(true); } @@ -1779,13 +1693,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onVideoSizeChanged', + 'RtcEngineEventHandler.onVideoSizeChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onVideoSizeChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1829,19 +1744,14 @@ void generatedTestCases(IrisTester irisTester) { 'rotation': rotation, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onVideoSizeChanged', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onVideoSizeChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoSizeChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onVideoSizeChanged'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onVideoSizeChangedCompleter.isCompleted) { onVideoSizeChangedCompleter.complete(true); } @@ -1866,18 +1776,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLocalVideoStateChanged', + 'RtcEngineEventHandler.onLocalVideoStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLocalVideoStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( onLocalVideoStateChanged: (VideoSourceType source, - LocalVideoStreamState state, LocalVideoStreamError error) { + LocalVideoStreamState state, LocalVideoStreamReason reason) { onLocalVideoStateChangedCompleter.complete(true); }, ); @@ -1893,29 +1804,24 @@ void generatedTestCases(IrisTester irisTester) { const VideoSourceType source = VideoSourceType.videoSourceCameraPrimary; const LocalVideoStreamState state = LocalVideoStreamState.localVideoStreamStateStopped; - const LocalVideoStreamError error = - LocalVideoStreamError.localVideoStreamErrorOk; + const LocalVideoStreamReason reason = + LocalVideoStreamReason.localVideoStreamReasonOk; final eventJson = { 'source': source.value(), 'state': state.value(), - 'error': error.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLocalVideoStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onLocalVideoStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalVideoStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLocalVideoStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLocalVideoStateChangedCompleter.isCompleted) { onLocalVideoStateChangedCompleter.complete(true); } @@ -1940,13 +1846,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteVideoStateChanged', + 'RtcEngineEventHandler.onRemoteVideoStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRemoteVideoStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -1987,21 +1894,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteVideoStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onRemoteVideoStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteVideoStateChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onRemoteVideoStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteVideoStateChangedCompleter.isCompleted) { onRemoteVideoStateChangedCompleter.complete(true); } @@ -2026,13 +1927,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onFirstRemoteVideoFrame', + 'RtcEngineEventHandler.onFirstRemoteVideoFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onFirstRemoteVideoFrameCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2069,20 +1971,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onFirstRemoteVideoFrame', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onFirstRemoteVideoFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstRemoteVideoFrameEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onFirstRemoteVideoFrame'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onFirstRemoteVideoFrameCompleter.isCompleted) { onFirstRemoteVideoFrameCompleter.complete(true); } @@ -2107,13 +2004,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserJoined', + 'RtcEngineEventHandler.onUserJoined', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserJoinedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2145,19 +2043,14 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserJoined', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserJoined', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserJoinedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserJoined'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserJoinedCompleter.isCompleted) { onUserJoinedCompleter.complete(true); } @@ -2182,13 +2075,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserOffline', + 'RtcEngineEventHandler.onUserOffline', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserOfflineCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2222,19 +2116,14 @@ void generatedTestCases(IrisTester irisTester) { 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserOffline', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserOffline', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserOfflineEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserOffline'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserOfflineCompleter.isCompleted) { onUserOfflineCompleter.complete(true); } @@ -2259,13 +2148,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserMuteAudio', + 'RtcEngineEventHandler.onUserMuteAudio', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserMuteAudioCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2297,19 +2187,14 @@ void generatedTestCases(IrisTester irisTester) { 'muted': muted, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserMuteAudio', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserMuteAudio', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserMuteAudioEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserMuteAudio'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserMuteAudioCompleter.isCompleted) { onUserMuteAudioCompleter.complete(true); } @@ -2334,13 +2219,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserMuteVideo', + 'RtcEngineEventHandler.onUserMuteVideo', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserMuteVideoCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2372,19 +2258,14 @@ void generatedTestCases(IrisTester irisTester) { 'muted': muted, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserMuteVideo', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserMuteVideo', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserMuteVideoEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserMuteVideo'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserMuteVideoCompleter.isCompleted) { onUserMuteVideoCompleter.complete(true); } @@ -2409,13 +2290,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserEnableVideo', + 'RtcEngineEventHandler.onUserEnableVideo', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserEnableVideoCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2448,19 +2330,14 @@ void generatedTestCases(IrisTester irisTester) { 'enabled': enabled, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserEnableVideo', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserEnableVideo', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserEnableVideoEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserEnableVideo'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserEnableVideoCompleter.isCompleted) { onUserEnableVideoCompleter.complete(true); } @@ -2485,13 +2362,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserStateChanged', + 'RtcEngineEventHandler.onUserStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2524,19 +2402,14 @@ void generatedTestCases(IrisTester irisTester) { 'state': state, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserStateChanged', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserStateChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserStateChanged'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserStateChangedCompleter.isCompleted) { onUserStateChangedCompleter.complete(true); } @@ -2561,13 +2434,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserEnableLocalVideo', + 'RtcEngineEventHandler.onUserEnableLocalVideo', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserEnableLocalVideoCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2600,19 +2474,15 @@ void generatedTestCases(IrisTester irisTester) { 'enabled': enabled, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserEnableLocalVideo', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserEnableLocalVideo', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserEnableLocalVideoEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserEnableLocalVideo'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserEnableLocalVideoCompleter.isCompleted) { onUserEnableLocalVideoCompleter.complete(true); } @@ -2637,18 +2507,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLocalAudioStats', + 'RtcEngineEventHandler.onRemoteAudioStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onLocalAudioStatsCompleter = Completer(); + final onRemoteAudioStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onLocalAudioStats: (RtcConnection connection, LocalAudioStats stats) { - onLocalAudioStatsCompleter.complete(true); + onRemoteAudioStats: (RtcConnection connection, RemoteAudioStats stats) { + onRemoteAudioStatsCompleter.complete(true); }, ); @@ -2666,19 +2537,43 @@ void generatedTestCases(IrisTester irisTester) { channelId: connectionChannelId, localUid: connectionLocalUid, ); + const int statsUid = 10; + const int statsQuality = 10; + const int statsNetworkTransportDelay = 10; + const int statsJitterBufferDelay = 10; + const int statsAudioLossRate = 10; const int statsNumChannels = 10; - const int statsSentSampleRate = 10; - const int statsSentBitrate = 10; - const int statsInternalCodec = 10; - const int statsTxPacketLossRate = 10; - const int statsAudioDeviceDelay = 10; - const LocalAudioStats stats = LocalAudioStats( + const int statsReceivedSampleRate = 10; + const int statsReceivedBitrate = 10; + const int statsTotalFrozenTime = 10; + const int statsFrozenRate = 10; + const int statsMosValue = 10; + const int statsFrozenRateByCustomPlcCount = 10; + const int statsPlcCount = 10; + const int statsTotalActiveTime = 10; + const int statsPublishDuration = 10; + const int statsQoeQuality = 10; + const int statsQualityChangedReason = 10; + const int statsRxAudioBytes = 10; + const RemoteAudioStats stats = RemoteAudioStats( + uid: statsUid, + quality: statsQuality, + networkTransportDelay: statsNetworkTransportDelay, + jitterBufferDelay: statsJitterBufferDelay, + audioLossRate: statsAudioLossRate, numChannels: statsNumChannels, - sentSampleRate: statsSentSampleRate, - sentBitrate: statsSentBitrate, - internalCodec: statsInternalCodec, - txPacketLossRate: statsTxPacketLossRate, - audioDeviceDelay: statsAudioDeviceDelay, + receivedSampleRate: statsReceivedSampleRate, + receivedBitrate: statsReceivedBitrate, + totalFrozenTime: statsTotalFrozenTime, + frozenRate: statsFrozenRate, + mosValue: statsMosValue, + frozenRateByCustomPlcCount: statsFrozenRateByCustomPlcCount, + plcCount: statsPlcCount, + totalActiveTime: statsTotalActiveTime, + publishDuration: statsPublishDuration, + qoeQuality: statsQoeQuality, + qualityChangedReason: statsQualityChangedReason, + rxAudioBytes: statsRxAudioBytes, ); final eventJson = { @@ -2686,27 +2581,22 @@ void generatedTestCases(IrisTester irisTester) { 'stats': stats.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLocalAudioStats', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onLocalAudioStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalAudioStatsEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onRemoteAudioStats'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onLocalAudioStatsCompleter.isCompleted) { - onLocalAudioStatsCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onRemoteAudioStatsCompleter.isCompleted) { + onRemoteAudioStatsCompleter.complete(true); } } } } - final eventCalled = await onLocalAudioStatsCompleter.future; + final eventCalled = await onRemoteAudioStatsCompleter.future; expect(eventCalled, isTrue); { @@ -2723,18 +2613,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteAudioStats', + 'RtcEngineEventHandler.onLocalAudioStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onRemoteAudioStatsCompleter = Completer(); + final onLocalAudioStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onRemoteAudioStats: (RtcConnection connection, RemoteAudioStats stats) { - onRemoteAudioStatsCompleter.complete(true); + onLocalAudioStats: (RtcConnection connection, LocalAudioStats stats) { + onLocalAudioStatsCompleter.complete(true); }, ); @@ -2752,43 +2643,25 @@ void generatedTestCases(IrisTester irisTester) { channelId: connectionChannelId, localUid: connectionLocalUid, ); - const int statsUid = 10; - const int statsQuality = 10; - const int statsNetworkTransportDelay = 10; - const int statsJitterBufferDelay = 10; - const int statsAudioLossRate = 10; const int statsNumChannels = 10; - const int statsReceivedSampleRate = 10; - const int statsReceivedBitrate = 10; - const int statsTotalFrozenTime = 10; - const int statsFrozenRate = 10; - const int statsMosValue = 10; - const int statsFrozenRateByCustomPlcCount = 10; - const int statsPlcCount = 10; - const int statsTotalActiveTime = 10; - const int statsPublishDuration = 10; - const int statsQoeQuality = 10; - const int statsQualityChangedReason = 10; - const int statsRxAudioBytes = 10; - const RemoteAudioStats stats = RemoteAudioStats( - uid: statsUid, - quality: statsQuality, - networkTransportDelay: statsNetworkTransportDelay, - jitterBufferDelay: statsJitterBufferDelay, - audioLossRate: statsAudioLossRate, + const int statsSentSampleRate = 10; + const int statsSentBitrate = 10; + const int statsInternalCodec = 10; + const int statsTxPacketLossRate = 10; + const int statsAudioDeviceDelay = 10; + const int statsAudioPlayoutDelay = 10; + const int statsEarMonitorDelay = 10; + const int statsAecEstimatedDelay = 10; + const LocalAudioStats stats = LocalAudioStats( numChannels: statsNumChannels, - receivedSampleRate: statsReceivedSampleRate, - receivedBitrate: statsReceivedBitrate, - totalFrozenTime: statsTotalFrozenTime, - frozenRate: statsFrozenRate, - mosValue: statsMosValue, - frozenRateByCustomPlcCount: statsFrozenRateByCustomPlcCount, - plcCount: statsPlcCount, - totalActiveTime: statsTotalActiveTime, - publishDuration: statsPublishDuration, - qoeQuality: statsQoeQuality, - qualityChangedReason: statsQualityChangedReason, - rxAudioBytes: statsRxAudioBytes, + sentSampleRate: statsSentSampleRate, + sentBitrate: statsSentBitrate, + internalCodec: statsInternalCodec, + txPacketLossRate: statsTxPacketLossRate, + audioDeviceDelay: statsAudioDeviceDelay, + audioPlayoutDelay: statsAudioPlayoutDelay, + earMonitorDelay: statsEarMonitorDelay, + aecEstimatedDelay: statsAecEstimatedDelay, ); final eventJson = { @@ -2796,27 +2669,22 @@ void generatedTestCases(IrisTester irisTester) { 'stats': stats.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onRemoteAudioStats', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onRemoteAudioStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteAudioStatsEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLocalAudioStats'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onRemoteAudioStatsCompleter.isCompleted) { - onRemoteAudioStatsCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onLocalAudioStatsCompleter.isCompleted) { + onLocalAudioStatsCompleter.complete(true); } } } } - final eventCalled = await onRemoteAudioStatsCompleter.future; + final eventCalled = await onLocalAudioStatsCompleter.future; expect(eventCalled, isTrue); { @@ -2833,13 +2701,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLocalVideoStats', + 'RtcEngineEventHandler.onLocalVideoStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLocalVideoStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -2913,19 +2782,14 @@ void generatedTestCases(IrisTester irisTester) { 'stats': stats.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLocalVideoStats', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onLocalVideoStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalVideoStats', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLocalVideoStats'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLocalVideoStatsCompleter.isCompleted) { onLocalVideoStatsCompleter.complete(true); } @@ -2950,13 +2814,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteVideoStats', + 'RtcEngineEventHandler.onRemoteVideoStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRemoteVideoStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3024,19 +2889,14 @@ void generatedTestCases(IrisTester irisTester) { 'stats': stats.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onRemoteVideoStats', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onRemoteVideoStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteVideoStatsEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onRemoteVideoStats'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteVideoStatsCompleter.isCompleted) { onRemoteVideoStatsCompleter.complete(true); } @@ -3061,13 +2921,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onCameraReady', + 'RtcEngineEventHandler.onCameraReady', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onCameraReadyCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3086,19 +2947,14 @@ void generatedTestCases(IrisTester irisTester) { { final eventJson = {}; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onCameraReady', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onCameraReady', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onCameraReady', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onCameraReady'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onCameraReadyCompleter.isCompleted) { onCameraReadyCompleter.complete(true); } @@ -3123,13 +2979,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onCameraFocusAreaChanged', + 'RtcEngineEventHandler.onCameraFocusAreaChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onCameraFocusAreaChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3158,20 +3015,15 @@ void generatedTestCases(IrisTester irisTester) { 'height': height, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onCameraFocusAreaChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onCameraFocusAreaChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onCameraFocusAreaChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onCameraFocusAreaChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onCameraFocusAreaChangedCompleter.isCompleted) { onCameraFocusAreaChangedCompleter.complete(true); } @@ -3196,13 +3048,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onCameraExposureAreaChanged', + 'RtcEngineEventHandler.onCameraExposureAreaChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onCameraExposureAreaChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3231,21 +3084,15 @@ void generatedTestCases(IrisTester irisTester) { 'height': height, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onCameraExposureAreaChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onCameraExposureAreaChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onCameraExposureAreaChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onCameraExposureAreaChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onCameraExposureAreaChangedCompleter.isCompleted) { onCameraExposureAreaChangedCompleter.complete(true); } @@ -3270,13 +3117,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onVideoStopped', + 'RtcEngineEventHandler.onVideoStopped', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onVideoStoppedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3295,19 +3143,14 @@ void generatedTestCases(IrisTester irisTester) { { final eventJson = {}; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onVideoStopped', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onVideoStopped', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoStopped', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onVideoStopped'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onVideoStoppedCompleter.isCompleted) { onVideoStoppedCompleter.complete(true); } @@ -3332,13 +3175,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioMixingStateChanged', + 'RtcEngineEventHandler.onAudioMixingStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioMixingStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3366,21 +3210,15 @@ void generatedTestCases(IrisTester irisTester) { 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioMixingStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onAudioMixingStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioMixingStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onAudioMixingStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioMixingStateChangedCompleter.isCompleted) { onAudioMixingStateChangedCompleter.complete(true); } @@ -3405,18 +3243,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRhythmPlayerStateChanged', + 'RtcEngineEventHandler.onRhythmPlayerStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRhythmPlayerStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( onRhythmPlayerStateChanged: - (RhythmPlayerStateType state, RhythmPlayerErrorType errorCode) { + (RhythmPlayerStateType state, RhythmPlayerReason reason) { onRhythmPlayerStateChangedCompleter.complete(true); }, ); @@ -3431,29 +3270,23 @@ void generatedTestCases(IrisTester irisTester) { { const RhythmPlayerStateType state = RhythmPlayerStateType.rhythmPlayerStateIdle; - const RhythmPlayerErrorType errorCode = - RhythmPlayerErrorType.rhythmPlayerErrorOk; + const RhythmPlayerReason reason = + RhythmPlayerReason.rhythmPlayerReasonOk; final eventJson = { 'state': state.value(), - 'errorCode': errorCode.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onRhythmPlayerStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onRhythmPlayerStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRhythmPlayerStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onRhythmPlayerStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRhythmPlayerStateChangedCompleter.isCompleted) { onRhythmPlayerStateChangedCompleter.complete(true); } @@ -3478,13 +3311,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onConnectionLost', + 'RtcEngineEventHandler.onConnectionLost', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onConnectionLostCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3512,19 +3346,14 @@ void generatedTestCases(IrisTester irisTester) { 'connection': connection.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onConnectionLost', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onConnectionLost', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onConnectionLostEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onConnectionLost'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onConnectionLostCompleter.isCompleted) { onConnectionLostCompleter.complete(true); } @@ -3549,13 +3378,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onConnectionInterrupted', + 'RtcEngineEventHandler.onConnectionInterrupted', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onConnectionInterruptedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3583,20 +3413,15 @@ void generatedTestCases(IrisTester irisTester) { 'connection': connection.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onConnectionInterrupted', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onConnectionInterrupted', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onConnectionInterruptedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onConnectionInterrupted'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onConnectionInterruptedCompleter.isCompleted) { onConnectionInterruptedCompleter.complete(true); } @@ -3621,13 +3446,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onConnectionBanned', + 'RtcEngineEventHandler.onConnectionBanned', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onConnectionBannedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3655,19 +3481,14 @@ void generatedTestCases(IrisTester irisTester) { 'connection': connection.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onConnectionBanned', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onConnectionBanned', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onConnectionBannedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onConnectionBanned'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onConnectionBannedCompleter.isCompleted) { onConnectionBannedCompleter.complete(true); } @@ -3692,13 +3513,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onStreamMessage', + 'RtcEngineEventHandler.onStreamMessage', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onStreamMessageCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3737,19 +3559,14 @@ void generatedTestCases(IrisTester irisTester) { 'sentTs': sentTs, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onStreamMessage', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onStreamMessage', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onStreamMessageEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onStreamMessage'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onStreamMessageCompleter.isCompleted) { onStreamMessageCompleter.complete(true); } @@ -3774,13 +3591,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onStreamMessageError', + 'RtcEngineEventHandler.onStreamMessageError', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onStreamMessageErrorCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3819,19 +3637,14 @@ void generatedTestCases(IrisTester irisTester) { 'cached': cached, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onStreamMessageError', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onStreamMessageError', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onStreamMessageErrorEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onStreamMessageError'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onStreamMessageErrorCompleter.isCompleted) { onStreamMessageErrorCompleter.complete(true); } @@ -3856,13 +3669,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRequestToken', + 'RtcEngineEventHandler.onRequestToken', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRequestTokenCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3890,19 +3704,14 @@ void generatedTestCases(IrisTester irisTester) { 'connection': connection.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onRequestToken', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onRequestToken', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRequestTokenEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onRequestToken'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRequestTokenCompleter.isCompleted) { onRequestTokenCompleter.complete(true); } @@ -3927,13 +3736,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onTokenPrivilegeWillExpire', + 'RtcEngineEventHandler.onTokenPrivilegeWillExpire', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onTokenPrivilegeWillExpireCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -3963,21 +3773,15 @@ void generatedTestCases(IrisTester irisTester) { 'token': token, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onTokenPrivilegeWillExpire', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onTokenPrivilegeWillExpire', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onTokenPrivilegeWillExpireEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onTokenPrivilegeWillExpire'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onTokenPrivilegeWillExpireCompleter.isCompleted) { onTokenPrivilegeWillExpireCompleter.complete(true); } @@ -4002,13 +3806,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLicenseValidationFailure', + 'RtcEngineEventHandler.onLicenseValidationFailure', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLicenseValidationFailureCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4039,21 +3844,15 @@ void generatedTestCases(IrisTester irisTester) { 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onLicenseValidationFailure', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onLicenseValidationFailure', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLicenseValidationFailureEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onLicenseValidationFailure'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLicenseValidationFailureCompleter.isCompleted) { onLicenseValidationFailureCompleter.complete(true); } @@ -4078,13 +3877,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onFirstLocalAudioFramePublished', + 'RtcEngineEventHandler.onFirstLocalAudioFramePublished', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onFirstLocalAudioFramePublishedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4115,21 +3915,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstLocalAudioFramePublished', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onFirstLocalAudioFramePublished', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstLocalAudioFramePublishedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onFirstLocalAudioFramePublished'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onFirstLocalAudioFramePublishedCompleter.isCompleted) { onFirstLocalAudioFramePublishedCompleter.complete(true); } @@ -4154,19 +3948,20 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onFirstRemoteAudioFrame', + 'RtcEngineEventHandler.onFirstRemoteAudioDecoded', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onFirstRemoteAudioFrameCompleter = Completer(); + final onFirstRemoteAudioDecodedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onFirstRemoteAudioFrame: - (RtcConnection connection, int userId, int elapsed) { - onFirstRemoteAudioFrameCompleter.complete(true); + onFirstRemoteAudioDecoded: + (RtcConnection connection, int uid, int elapsed) { + onFirstRemoteAudioDecodedCompleter.complete(true); }, ); @@ -4184,37 +3979,32 @@ void generatedTestCases(IrisTester irisTester) { channelId: connectionChannelId, localUid: connectionLocalUid, ); - const int userId = 10; + const int uid = 10; const int elapsed = 10; final eventJson = { 'connection': connection.toJson(), - 'userId': userId, + 'uid': uid, 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onFirstRemoteAudioFrame', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onFirstRemoteAudioFrame', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstRemoteAudioFrameEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onFirstRemoteAudioDecoded'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onFirstRemoteAudioFrameCompleter.isCompleted) { - onFirstRemoteAudioFrameCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onFirstRemoteAudioDecodedCompleter.isCompleted) { + onFirstRemoteAudioDecodedCompleter.complete(true); } } } } - final eventCalled = await onFirstRemoteAudioFrameCompleter.future; + final eventCalled = await onFirstRemoteAudioDecodedCompleter.future; expect(eventCalled, isTrue); { @@ -4231,19 +4021,20 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onFirstRemoteAudioDecoded', + 'RtcEngineEventHandler.onFirstRemoteAudioFrame', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onFirstRemoteAudioDecodedCompleter = Completer(); + final onFirstRemoteAudioFrameCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onFirstRemoteAudioDecoded: - (RtcConnection connection, int uid, int elapsed) { - onFirstRemoteAudioDecodedCompleter.complete(true); + onFirstRemoteAudioFrame: + (RtcConnection connection, int userId, int elapsed) { + onFirstRemoteAudioFrameCompleter.complete(true); }, ); @@ -4261,38 +4052,32 @@ void generatedTestCases(IrisTester irisTester) { channelId: connectionChannelId, localUid: connectionLocalUid, ); - const int uid = 10; + const int userId = 10; const int elapsed = 10; final eventJson = { 'connection': connection.toJson(), - 'uid': uid, + 'userId': userId, 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstRemoteAudioDecoded', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onFirstRemoteAudioDecoded', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onFirstRemoteAudioDecodedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onFirstRemoteAudioFrame'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onFirstRemoteAudioDecodedCompleter.isCompleted) { - onFirstRemoteAudioDecodedCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onFirstRemoteAudioFrameCompleter.isCompleted) { + onFirstRemoteAudioFrameCompleter.complete(true); } } } } - final eventCalled = await onFirstRemoteAudioDecodedCompleter.future; + final eventCalled = await onFirstRemoteAudioFrameCompleter.future; expect(eventCalled, isTrue); { @@ -4309,18 +4094,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLocalAudioStateChanged', + 'RtcEngineEventHandler.onLocalAudioStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLocalAudioStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( onLocalAudioStateChanged: (RtcConnection connection, - LocalAudioStreamState state, LocalAudioStreamError error) { + LocalAudioStreamState state, LocalAudioStreamReason reason) { onLocalAudioStateChangedCompleter.complete(true); }, ); @@ -4341,29 +4127,24 @@ void generatedTestCases(IrisTester irisTester) { ); const LocalAudioStreamState state = LocalAudioStreamState.localAudioStreamStateStopped; - const LocalAudioStreamError error = - LocalAudioStreamError.localAudioStreamErrorOk; + const LocalAudioStreamReason reason = + LocalAudioStreamReason.localAudioStreamReasonOk; final eventJson = { 'connection': connection.toJson(), 'state': state.value(), - 'error': error.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLocalAudioStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onLocalAudioStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalAudioStateChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLocalAudioStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLocalAudioStateChangedCompleter.isCompleted) { onLocalAudioStateChangedCompleter.complete(true); } @@ -4388,13 +4169,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteAudioStateChanged', + 'RtcEngineEventHandler.onRemoteAudioStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRemoteAudioStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4435,21 +4217,15 @@ void generatedTestCases(IrisTester irisTester) { 'elapsed': elapsed, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteAudioStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onRemoteAudioStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteAudioStateChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onRemoteAudioStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteAudioStateChangedCompleter.isCompleted) { onRemoteAudioStateChangedCompleter.complete(true); } @@ -4474,13 +4250,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onActiveSpeaker', + 'RtcEngineEventHandler.onActiveSpeaker', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onActiveSpeakerCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4510,19 +4287,14 @@ void generatedTestCases(IrisTester irisTester) { 'uid': uid, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onActiveSpeaker', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onActiveSpeaker', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onActiveSpeakerEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onActiveSpeaker'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onActiveSpeakerCompleter.isCompleted) { onActiveSpeakerCompleter.complete(true); } @@ -4547,13 +4319,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onContentInspectResult', + 'RtcEngineEventHandler.onContentInspectResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onContentInspectResultCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4577,19 +4350,15 @@ void generatedTestCases(IrisTester irisTester) { 'result': result.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onContentInspectResult', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onContentInspectResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onContentInspectResult', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onContentInspectResult'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onContentInspectResultCompleter.isCompleted) { onContentInspectResultCompleter.complete(true); } @@ -4614,13 +4383,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onSnapshotTaken', + 'RtcEngineEventHandler.onSnapshotTaken', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onSnapshotTakenCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4659,19 +4429,14 @@ void generatedTestCases(IrisTester irisTester) { 'errCode': errCode, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onSnapshotTaken', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onSnapshotTaken', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onSnapshotTakenEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onSnapshotTaken'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onSnapshotTakenCompleter.isCompleted) { onSnapshotTakenCompleter.complete(true); } @@ -4696,13 +4461,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onClientRoleChanged', + 'RtcEngineEventHandler.onClientRoleChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onClientRoleChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4741,19 +4507,14 @@ void generatedTestCases(IrisTester irisTester) { 'newRoleOptions': newRoleOptions.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onClientRoleChanged', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onClientRoleChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onClientRoleChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onClientRoleChanged'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onClientRoleChangedCompleter.isCompleted) { onClientRoleChangedCompleter.complete(true); } @@ -4778,13 +4539,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onClientRoleChangeFailed', + 'RtcEngineEventHandler.onClientRoleChangeFailed', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onClientRoleChangeFailedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4818,20 +4580,15 @@ void generatedTestCases(IrisTester irisTester) { 'currentRole': currentRole.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onClientRoleChangeFailed', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onClientRoleChangeFailed', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onClientRoleChangeFailedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onClientRoleChangeFailed'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onClientRoleChangeFailedCompleter.isCompleted) { onClientRoleChangeFailedCompleter.complete(true); } @@ -4856,13 +4613,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioDeviceVolumeChanged', + 'RtcEngineEventHandler.onAudioDeviceVolumeChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioDeviceVolumeChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -4890,21 +4648,15 @@ void generatedTestCases(IrisTester irisTester) { 'muted': muted, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioDeviceVolumeChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onAudioDeviceVolumeChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioDeviceVolumeChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onAudioDeviceVolumeChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioDeviceVolumeChangedCompleter.isCompleted) { onAudioDeviceVolumeChangedCompleter.complete(true); } @@ -4929,18 +4681,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRtmpStreamingStateChanged', + 'RtcEngineEventHandler.onRtmpStreamingStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRtmpStreamingStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( onRtmpStreamingStateChanged: (String url, RtmpStreamPublishState state, - RtmpStreamPublishErrorType errCode) { + RtmpStreamPublishReason reason) { onRtmpStreamingStateChangedCompleter.complete(true); }, ); @@ -4956,30 +4709,24 @@ void generatedTestCases(IrisTester irisTester) { const String url = "hello"; const RtmpStreamPublishState state = RtmpStreamPublishState.rtmpStreamPublishStateIdle; - const RtmpStreamPublishErrorType errCode = - RtmpStreamPublishErrorType.rtmpStreamPublishErrorOk; + const RtmpStreamPublishReason reason = + RtmpStreamPublishReason.rtmpStreamPublishReasonOk; final eventJson = { 'url': url, 'state': state.value(), - 'errCode': errCode.value(), + 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onRtmpStreamingStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onRtmpStreamingStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRtmpStreamingStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onRtmpStreamingStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRtmpStreamingStateChangedCompleter.isCompleted) { onRtmpStreamingStateChangedCompleter.complete(true); } @@ -5004,13 +4751,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRtmpStreamingEvent', + 'RtcEngineEventHandler.onRtmpStreamingEvent', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRtmpStreamingEventCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5036,19 +4784,14 @@ void generatedTestCases(IrisTester irisTester) { 'eventCode': eventCode.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onRtmpStreamingEvent', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onRtmpStreamingEvent', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRtmpStreamingEvent', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onRtmpStreamingEvent'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRtmpStreamingEventCompleter.isCompleted) { onRtmpStreamingEventCompleter.complete(true); } @@ -5073,13 +4816,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onTranscodingUpdated', + 'RtcEngineEventHandler.onTranscodingUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onTranscodingUpdatedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5098,19 +4842,14 @@ void generatedTestCases(IrisTester irisTester) { { final eventJson = {}; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onTranscodingUpdated', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onTranscodingUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onTranscodingUpdated', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onTranscodingUpdated'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onTranscodingUpdatedCompleter.isCompleted) { onTranscodingUpdatedCompleter.complete(true); } @@ -5135,13 +4874,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioRoutingChanged', + 'RtcEngineEventHandler.onAudioRoutingChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onAudioRoutingChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5164,19 +4904,15 @@ void generatedTestCases(IrisTester irisTester) { 'routing': routing, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onAudioRoutingChanged', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onAudioRoutingChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioRoutingChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onAudioRoutingChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onAudioRoutingChangedCompleter.isCompleted) { onAudioRoutingChangedCompleter.complete(true); } @@ -5201,13 +4937,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onChannelMediaRelayStateChanged', + 'RtcEngineEventHandler.onChannelMediaRelayStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onChannelMediaRelayStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5234,21 +4971,15 @@ void generatedTestCases(IrisTester irisTester) { 'code': code.value(), }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onChannelMediaRelayStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onChannelMediaRelayStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onChannelMediaRelayStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onChannelMediaRelayStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onChannelMediaRelayStateChangedCompleter.isCompleted) { onChannelMediaRelayStateChangedCompleter.complete(true); } @@ -5273,81 +5004,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onChannelMediaRelayEvent', - (WidgetTester tester) async { - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: 'app_id', - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final onChannelMediaRelayEventCompleter = Completer(); - final theRtcEngineEventHandler = RtcEngineEventHandler( - onChannelMediaRelayEvent: (ChannelMediaRelayEvent code) { - onChannelMediaRelayEventCompleter.complete(true); - }, - ); - - rtcEngine.registerEventHandler( - theRtcEngineEventHandler, - ); - -// Delay 500 milliseconds to ensure the registerEventHandler call completed. - await Future.delayed(const Duration(milliseconds: 500)); - - { - const ChannelMediaRelayEvent code = - ChannelMediaRelayEvent.relayEventNetworkDisconnected; - - final eventJson = { - 'code': code.value(), - }; - - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onChannelMediaRelayEvent', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onChannelMediaRelayEvent', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onChannelMediaRelayEvent', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. - await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onChannelMediaRelayEventCompleter.isCompleted) { - onChannelMediaRelayEventCompleter.complete(true); - } - } - } - } - - final eventCalled = await onChannelMediaRelayEventCompleter.future; - expect(eventCalled, isTrue); - - { - rtcEngine.unregisterEventHandler( - theRtcEngineEventHandler, - ); - } -// Delay 500 milliseconds to ensure the unregisterEventHandler call completed. - await Future.delayed(const Duration(milliseconds: 500)); - - await rtcEngine.release(); - }, - timeout: const Timeout(Duration(minutes: 2)), - ); - - testWidgets( - 'onLocalPublishFallbackToAudioOnly', + 'RtcEngineEventHandler.onLocalPublishFallbackToAudioOnly', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLocalPublishFallbackToAudioOnlyCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5370,21 +5034,15 @@ void generatedTestCases(IrisTester irisTester) { 'isFallbackOrRecover': isFallbackOrRecover, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalPublishFallbackToAudioOnly', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onLocalPublishFallbackToAudioOnly', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalPublishFallbackToAudioOnly', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onLocalPublishFallbackToAudioOnly'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLocalPublishFallbackToAudioOnlyCompleter.isCompleted) { onLocalPublishFallbackToAudioOnlyCompleter.complete(true); } @@ -5410,13 +5068,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteSubscribeFallbackToAudioOnly', + 'RtcEngineEventHandler.onRemoteSubscribeFallbackToAudioOnly', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRemoteSubscribeFallbackToAudioOnlyCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5442,21 +5101,15 @@ void generatedTestCases(IrisTester irisTester) { 'isFallbackOrRecover': isFallbackOrRecover, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteSubscribeFallbackToAudioOnly', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onRemoteSubscribeFallbackToAudioOnly', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteSubscribeFallbackToAudioOnly', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onRemoteSubscribeFallbackToAudioOnly'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteSubscribeFallbackToAudioOnlyCompleter.isCompleted) { onRemoteSubscribeFallbackToAudioOnlyCompleter.complete(true); } @@ -5482,13 +5135,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteAudioTransportStats', + 'RtcEngineEventHandler.onRemoteAudioTransportStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRemoteAudioTransportStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5525,21 +5179,15 @@ void generatedTestCases(IrisTester irisTester) { 'rxKBitRate': rxKBitRate, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteAudioTransportStats', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onRemoteAudioTransportStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteAudioTransportStatsEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onRemoteAudioTransportStats'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteAudioTransportStatsCompleter.isCompleted) { onRemoteAudioTransportStatsCompleter.complete(true); } @@ -5564,13 +5212,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onRemoteVideoTransportStats', + 'RtcEngineEventHandler.onRemoteVideoTransportStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onRemoteVideoTransportStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5607,21 +5256,15 @@ void generatedTestCases(IrisTester irisTester) { 'rxKBitRate': rxKBitRate, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteVideoTransportStats', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onRemoteVideoTransportStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onRemoteVideoTransportStatsEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onRemoteVideoTransportStats'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onRemoteVideoTransportStatsCompleter.isCompleted) { onRemoteVideoTransportStatsCompleter.complete(true); } @@ -5646,13 +5289,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onConnectionStateChanged', + 'RtcEngineEventHandler.onConnectionStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onConnectionStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5687,20 +5331,15 @@ void generatedTestCases(IrisTester irisTester) { 'reason': reason.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onConnectionStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onConnectionStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onConnectionStateChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onConnectionStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onConnectionStateChangedCompleter.isCompleted) { onConnectionStateChangedCompleter.complete(true); } @@ -5725,13 +5364,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onWlAccMessage', + 'RtcEngineEventHandler.onWlAccMessage', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onWlAccMessageCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5768,19 +5408,14 @@ void generatedTestCases(IrisTester irisTester) { 'wlAccMsg': wlAccMsg, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onWlAccMessage', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onWlAccMessage', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onWlAccMessageEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onWlAccMessage'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onWlAccMessageCompleter.isCompleted) { onWlAccMessageCompleter.complete(true); } @@ -5805,13 +5440,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onWlAccStats', + 'RtcEngineEventHandler.onWlAccStats', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onWlAccStatsCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5858,19 +5494,14 @@ void generatedTestCases(IrisTester irisTester) { 'averageStats': averageStats.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onWlAccStats', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onWlAccStats', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onWlAccStatsEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onWlAccStats'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onWlAccStatsCompleter.isCompleted) { onWlAccStatsCompleter.complete(true); } @@ -5895,13 +5526,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onNetworkTypeChanged', + 'RtcEngineEventHandler.onNetworkTypeChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onNetworkTypeChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -5931,19 +5563,14 @@ void generatedTestCases(IrisTester irisTester) { 'type': type.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onNetworkTypeChanged', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onNetworkTypeChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onNetworkTypeChangedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onNetworkTypeChanged'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onNetworkTypeChangedCompleter.isCompleted) { onNetworkTypeChangedCompleter.complete(true); } @@ -5968,13 +5595,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onEncryptionError', + 'RtcEngineEventHandler.onEncryptionError', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onEncryptionErrorCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -6006,19 +5634,14 @@ void generatedTestCases(IrisTester irisTester) { 'errorType': errorType.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onEncryptionError', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onEncryptionError', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onEncryptionErrorEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onEncryptionError'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onEncryptionErrorCompleter.isCompleted) { onEncryptionErrorCompleter.complete(true); } @@ -6043,13 +5666,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onPermissionError', + 'RtcEngineEventHandler.onPermissionError', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onPermissionErrorCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -6072,19 +5696,14 @@ void generatedTestCases(IrisTester irisTester) { 'permissionType': permissionType.value(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onPermissionError', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onPermissionError', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onPermissionError', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onPermissionError'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onPermissionErrorCompleter.isCompleted) { onPermissionErrorCompleter.complete(true); } @@ -6109,13 +5728,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLocalUserRegistered', + 'RtcEngineEventHandler.onLocalUserRegistered', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onLocalUserRegisteredCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -6140,19 +5760,15 @@ void generatedTestCases(IrisTester irisTester) { 'userAccount': userAccount, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onLocalUserRegistered', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onLocalUserRegistered', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalUserRegistered', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onLocalUserRegistered'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onLocalUserRegisteredCompleter.isCompleted) { onLocalUserRegisteredCompleter.complete(true); } @@ -6177,13 +5793,14 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserInfoUpdated', + 'RtcEngineEventHandler.onUserInfoUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final onUserInfoUpdatedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( @@ -6213,19 +5830,14 @@ void generatedTestCases(IrisTester irisTester) { 'info': info.toJson(), }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserInfoUpdated', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserInfoUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserInfoUpdated', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserInfoUpdated'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { if (!onUserInfoUpdatedCompleter.isCompleted) { onUserInfoUpdatedCompleter.complete(true); } @@ -6250,19 +5862,20 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUploadLogResult', + 'RtcEngineEventHandler.onUserAccountUpdated', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onUploadLogResultCompleter = Completer(); + final onUserAccountUpdatedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onUploadLogResult: (RtcConnection connection, String requestId, - bool success, UploadErrorReason reason) { - onUploadLogResultCompleter.complete(true); + onUserAccountUpdated: (RtcConnection connection, int remoteUid, + String remoteUserAccount) { + onUserAccountUpdatedCompleter.complete(true); }, ); @@ -6280,38 +5893,31 @@ void generatedTestCases(IrisTester irisTester) { channelId: connectionChannelId, localUid: connectionLocalUid, ); - const String requestId = "hello"; - const bool success = true; - const UploadErrorReason reason = UploadErrorReason.uploadSuccess; + const int remoteUid = 10; + const String remoteUserAccount = "hello"; final eventJson = { 'connection': connection.toJson(), - 'requestId': requestId, - 'success': success, - 'reason': reason.value(), + 'remoteUid': remoteUid, + 'remoteUserAccount': remoteUserAccount, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUploadLogResult', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUploadLogResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUploadLogResultEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUserAccountUpdated'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onUploadLogResultCompleter.isCompleted) { - onUploadLogResultCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onUserAccountUpdatedCompleter.isCompleted) { + onUserAccountUpdatedCompleter.complete(true); } } } } - final eventCalled = await onUploadLogResultCompleter.future; + final eventCalled = await onUserAccountUpdatedCompleter.future; expect(eventCalled, isTrue); { @@ -6328,22 +5934,22 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioSubscribeStateChanged', + 'RtcEngineEventHandler.onVideoRenderingTracingResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onAudioSubscribeStateChangedCompleter = Completer(); + final onVideoRenderingTracingResultCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onAudioSubscribeStateChanged: (String channel, + onVideoRenderingTracingResult: (RtcConnection connection, int uid, - StreamSubscribeState oldState, - StreamSubscribeState newState, - int elapseSinceLastState) { - onAudioSubscribeStateChangedCompleter.complete(true); + MediaTraceEvent currentEvent, + VideoRenderingTracingInfo tracingInfo) { + onVideoRenderingTracingResultCompleter.complete(true); }, ); @@ -6355,43 +5961,56 @@ void generatedTestCases(IrisTester irisTester) { await Future.delayed(const Duration(milliseconds: 500)); { - const String channel = "hello"; + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); const int uid = 10; - const StreamSubscribeState oldState = StreamSubscribeState.subStateIdle; - const StreamSubscribeState newState = StreamSubscribeState.subStateIdle; - const int elapseSinceLastState = 10; - - final eventJson = { - 'channel': channel, - 'uid': uid, - 'oldState': oldState.value(), - 'newState': newState.value(), - 'elapseSinceLastState': elapseSinceLastState, - }; - - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioSubscribeStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onAudioSubscribeStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioSubscribeStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. - await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onAudioSubscribeStateChangedCompleter.isCompleted) { - onAudioSubscribeStateChangedCompleter.complete(true); + const MediaTraceEvent currentEvent = + MediaTraceEvent.mediaTraceEventVideoRendered; + const int tracingInfoElapsedTime = 10; + const int tracingInfoStart2JoinChannel = 10; + const int tracingInfoJoin2JoinSuccess = 10; + const int tracingInfoJoinSuccess2RemoteJoined = 10; + const int tracingInfoRemoteJoined2SetView = 10; + const int tracingInfoRemoteJoined2UnmuteVideo = 10; + const int tracingInfoRemoteJoined2PacketReceived = 10; + const VideoRenderingTracingInfo tracingInfo = VideoRenderingTracingInfo( + elapsedTime: tracingInfoElapsedTime, + start2JoinChannel: tracingInfoStart2JoinChannel, + join2JoinSuccess: tracingInfoJoin2JoinSuccess, + joinSuccess2RemoteJoined: tracingInfoJoinSuccess2RemoteJoined, + remoteJoined2SetView: tracingInfoRemoteJoined2SetView, + remoteJoined2UnmuteVideo: tracingInfoRemoteJoined2UnmuteVideo, + remoteJoined2PacketReceived: tracingInfoRemoteJoined2PacketReceived, + ); + + final eventJson = { + 'connection': connection.toJson(), + 'uid': uid, + 'currentEvent': currentEvent.value(), + 'tracingInfo': tracingInfo.toJson(), + }; + + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onVideoRenderingTracingResult'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onVideoRenderingTracingResultCompleter.isCompleted) { + onVideoRenderingTracingResultCompleter.complete(true); } } } } - final eventCalled = await onAudioSubscribeStateChangedCompleter.future; + final eventCalled = await onVideoRenderingTracingResultCompleter.future; expect(eventCalled, isTrue); { @@ -6408,22 +6027,188 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onVideoSubscribeStateChanged', + 'RtcEngineEventHandler.onLocalVideoTranscoderError', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onVideoSubscribeStateChangedCompleter = Completer(); + final onLocalVideoTranscoderErrorCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onVideoSubscribeStateChanged: (String channel, + onLocalVideoTranscoderError: + (TranscodingVideoStream stream, VideoTranscoderError error) { + onLocalVideoTranscoderErrorCompleter.complete(true); + }, + ); + + rtcEngine.registerEventHandler( + theRtcEngineEventHandler, + ); + +// Delay 500 milliseconds to ensure the registerEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const VideoSourceType streamSourceType = + VideoSourceType.videoSourceCameraPrimary; + const int streamRemoteUserUid = 10; + const String streamImageUrl = "hello"; + const int streamMediaPlayerId = 10; + const int streamX = 10; + const int streamY = 10; + const int streamWidth = 10; + const int streamHeight = 10; + const int streamZOrder = 10; + const double streamAlpha = 10.0; + const bool streamMirror = true; + const TranscodingVideoStream stream = TranscodingVideoStream( + sourceType: streamSourceType, + remoteUserUid: streamRemoteUserUid, + imageUrl: streamImageUrl, + mediaPlayerId: streamMediaPlayerId, + x: streamX, + y: streamY, + width: streamWidth, + height: streamHeight, + zOrder: streamZOrder, + alpha: streamAlpha, + mirror: streamMirror, + ); + const VideoTranscoderError error = + VideoTranscoderError.vtErrVideoSourceNotReady; + + final eventJson = { + 'stream': stream.toJson(), + 'error': error.value(), + }; + + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onLocalVideoTranscoderError'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onLocalVideoTranscoderErrorCompleter.isCompleted) { + onLocalVideoTranscoderErrorCompleter.complete(true); + } + } + } + } + + final eventCalled = await onLocalVideoTranscoderErrorCompleter.future; + expect(eventCalled, isTrue); + + { + rtcEngine.unregisterEventHandler( + theRtcEngineEventHandler, + ); + } +// Delay 500 milliseconds to ensure the unregisterEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), + ); + + testWidgets( + 'RtcEngineEventHandler.onUploadLogResult', + (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final onUploadLogResultCompleter = Completer(); + final theRtcEngineEventHandler = RtcEngineEventHandler( + onUploadLogResult: (RtcConnection connection, String requestId, + bool success, UploadErrorReason reason) { + onUploadLogResultCompleter.complete(true); + }, + ); + + rtcEngine.registerEventHandler( + theRtcEngineEventHandler, + ); + +// Delay 500 milliseconds to ensure the registerEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + { + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + const String requestId = "hello"; + const bool success = true; + const UploadErrorReason reason = UploadErrorReason.uploadSuccess; + + final eventJson = { + 'connection': connection.toJson(), + 'requestId': requestId, + 'success': success, + 'reason': reason.value(), + }; + + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onUploadLogResult'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onUploadLogResultCompleter.isCompleted) { + onUploadLogResultCompleter.complete(true); + } + } + } + } + + final eventCalled = await onUploadLogResultCompleter.future; + expect(eventCalled, isTrue); + + { + rtcEngine.unregisterEventHandler( + theRtcEngineEventHandler, + ); + } +// Delay 500 milliseconds to ensure the unregisterEventHandler call completed. + await Future.delayed(const Duration(milliseconds: 500)); + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), + ); + + testWidgets( + 'RtcEngineEventHandler.onAudioSubscribeStateChanged', + (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final onAudioSubscribeStateChangedCompleter = Completer(); + final theRtcEngineEventHandler = RtcEngineEventHandler( + onAudioSubscribeStateChanged: (String channel, int uid, StreamSubscribeState oldState, StreamSubscribeState newState, int elapseSinceLastState) { - onVideoSubscribeStateChangedCompleter.complete(true); + onAudioSubscribeStateChangedCompleter.complete(true); }, ); @@ -6449,29 +6234,23 @@ void generatedTestCases(IrisTester irisTester) { 'elapseSinceLastState': elapseSinceLastState, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoSubscribeStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onVideoSubscribeStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoSubscribeStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onAudioSubscribeStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onVideoSubscribeStateChangedCompleter.isCompleted) { - onVideoSubscribeStateChangedCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onAudioSubscribeStateChangedCompleter.isCompleted) { + onAudioSubscribeStateChangedCompleter.complete(true); } } } } - final eventCalled = await onVideoSubscribeStateChangedCompleter.future; + final eventCalled = await onAudioSubscribeStateChangedCompleter.future; expect(eventCalled, isTrue); { @@ -6488,21 +6267,23 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onAudioPublishStateChanged', + 'RtcEngineEventHandler.onVideoSubscribeStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onAudioPublishStateChangedCompleter = Completer(); + final onVideoSubscribeStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onAudioPublishStateChanged: (String channel, - StreamPublishState oldState, - StreamPublishState newState, + onVideoSubscribeStateChanged: (String channel, + int uid, + StreamSubscribeState oldState, + StreamSubscribeState newState, int elapseSinceLastState) { - onAudioPublishStateChangedCompleter.complete(true); + onVideoSubscribeStateChangedCompleter.complete(true); }, ); @@ -6515,40 +6296,36 @@ void generatedTestCases(IrisTester irisTester) { { const String channel = "hello"; - const StreamPublishState oldState = StreamPublishState.pubStateIdle; - const StreamPublishState newState = StreamPublishState.pubStateIdle; + const int uid = 10; + const StreamSubscribeState oldState = StreamSubscribeState.subStateIdle; + const StreamSubscribeState newState = StreamSubscribeState.subStateIdle; const int elapseSinceLastState = 10; final eventJson = { 'channel': channel, + 'uid': uid, 'oldState': oldState.value(), 'newState': newState.value(), 'elapseSinceLastState': elapseSinceLastState, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioPublishStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onAudioPublishStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onAudioPublishStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onVideoSubscribeStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onAudioPublishStateChangedCompleter.isCompleted) { - onAudioPublishStateChangedCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onVideoSubscribeStateChangedCompleter.isCompleted) { + onVideoSubscribeStateChangedCompleter.complete(true); } } } } - final eventCalled = await onAudioPublishStateChangedCompleter.future; + final eventCalled = await onVideoSubscribeStateChangedCompleter.future; expect(eventCalled, isTrue); { @@ -6565,22 +6342,22 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onVideoPublishStateChanged', + 'RtcEngineEventHandler.onAudioPublishStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onVideoPublishStateChangedCompleter = Completer(); + final onAudioPublishStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onVideoPublishStateChanged: (VideoSourceType source, - String channel, + onAudioPublishStateChanged: (String channel, StreamPublishState oldState, StreamPublishState newState, int elapseSinceLastState) { - onVideoPublishStateChangedCompleter.complete(true); + onAudioPublishStateChangedCompleter.complete(true); }, ); @@ -6592,43 +6369,35 @@ void generatedTestCases(IrisTester irisTester) { await Future.delayed(const Duration(milliseconds: 500)); { - const VideoSourceType source = VideoSourceType.videoSourceCameraPrimary; const String channel = "hello"; const StreamPublishState oldState = StreamPublishState.pubStateIdle; const StreamPublishState newState = StreamPublishState.pubStateIdle; const int elapseSinceLastState = 10; final eventJson = { - 'source': source.value(), 'channel': channel, 'oldState': oldState.value(), 'newState': newState.value(), 'elapseSinceLastState': elapseSinceLastState, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoPublishStateChanged', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onVideoPublishStateChanged', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoPublishStateChanged', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onAudioPublishStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onVideoPublishStateChangedCompleter.isCompleted) { - onVideoPublishStateChangedCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onAudioPublishStateChangedCompleter.isCompleted) { + onAudioPublishStateChangedCompleter.complete(true); } } } } - final eventCalled = await onVideoPublishStateChangedCompleter.future; + final eventCalled = await onAudioPublishStateChangedCompleter.future; expect(eventCalled, isTrue); { @@ -6645,19 +6414,23 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onExtensionEvent', + 'RtcEngineEventHandler.onVideoPublishStateChanged', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onExtensionEventCompleter = Completer(); + final onVideoPublishStateChangedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onExtensionEvent: - (String provider, String extension, String key, String value) { - onExtensionEventCompleter.complete(true); + onVideoPublishStateChanged: (VideoSourceType source, + String channel, + StreamPublishState oldState, + StreamPublishState newState, + int elapseSinceLastState) { + onVideoPublishStateChangedCompleter.complete(true); }, ); @@ -6669,39 +6442,37 @@ void generatedTestCases(IrisTester irisTester) { await Future.delayed(const Duration(milliseconds: 500)); { - const String provider = "hello"; - const String extension = "hello"; - const String key = "hello"; - const String value = "hello"; + const VideoSourceType source = VideoSourceType.videoSourceCameraPrimary; + const String channel = "hello"; + const StreamPublishState oldState = StreamPublishState.pubStateIdle; + const StreamPublishState newState = StreamPublishState.pubStateIdle; + const int elapseSinceLastState = 10; final eventJson = { - 'provider': provider, - 'extension': extension, - 'key': key, - 'value': value, + 'source': source.value(), + 'channel': channel, + 'oldState': oldState.value(), + 'newState': newState.value(), + 'elapseSinceLastState': elapseSinceLastState, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onExtensionEvent', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onExtensionEvent', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onExtensionEvent', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onVideoPublishStateChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onExtensionEventCompleter.isCompleted) { - onExtensionEventCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onVideoPublishStateChangedCompleter.isCompleted) { + onVideoPublishStateChangedCompleter.complete(true); } } } } - final eventCalled = await onExtensionEventCompleter.future; + final eventCalled = await onVideoPublishStateChangedCompleter.future; expect(eventCalled, isTrue); { @@ -6718,18 +6489,20 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onExtensionStarted', + 'RtcEngineEventHandler.onTranscodedStreamLayoutInfo', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onExtensionStartedCompleter = Completer(); + final onTranscodedStreamLayoutInfoCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onExtensionStarted: (String provider, String extension) { - onExtensionStartedCompleter.complete(true); + onTranscodedStreamLayoutInfo: (RtcConnection connection, int uid, + int width, int height, int layoutCount, List layoutlist) { + onTranscodedStreamLayoutInfoCompleter.complete(true); }, ); @@ -6741,35 +6514,44 @@ void generatedTestCases(IrisTester irisTester) { await Future.delayed(const Duration(milliseconds: 500)); { - const String provider = "hello"; - const String extension = "hello"; + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + const int uid = 10; + const int width = 10; + const int height = 10; + const int layoutCount = 10; + const List layoutlist = []; final eventJson = { - 'provider': provider, - 'extension': extension, + 'connection': connection.toJson(), + 'uid': uid, + 'width': width, + 'height': height, + 'layoutCount': layoutCount, + 'layoutlist': layoutlist, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onExtensionStarted', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onExtensionStarted', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onExtensionStarted', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = eventIdsMapping[ + 'RtcEngineEventHandler_onTranscodedStreamLayoutInfo'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onExtensionStartedCompleter.isCompleted) { - onExtensionStartedCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onTranscodedStreamLayoutInfoCompleter.isCompleted) { + onTranscodedStreamLayoutInfoCompleter.complete(true); } } } } - final eventCalled = await onExtensionStartedCompleter.future; + final eventCalled = await onTranscodedStreamLayoutInfoCompleter.future; expect(eventCalled, isTrue); { @@ -6786,18 +6568,20 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onExtensionStopped', + 'RtcEngineEventHandler.onExtensionEvent', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onExtensionStoppedCompleter = Completer(); + final onExtensionEventCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onExtensionStopped: (String provider, String extension) { - onExtensionStoppedCompleter.complete(true); + onExtensionEvent: + (String provider, String extension, String key, String value) { + onExtensionEventCompleter.complete(true); }, ); @@ -6811,33 +6595,32 @@ void generatedTestCases(IrisTester irisTester) { { const String provider = "hello"; const String extension = "hello"; + const String key = "hello"; + const String value = "hello"; final eventJson = { 'provider': provider, 'extension': extension, + 'key': key, + 'value': value, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onExtensionStopped', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onExtensionStopped', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onExtensionStopped', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onExtensionEvent'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onExtensionStoppedCompleter.isCompleted) { - onExtensionStoppedCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onExtensionEventCompleter.isCompleted) { + onExtensionEventCompleter.complete(true); } } } } - final eventCalled = await onExtensionStoppedCompleter.future; + final eventCalled = await onExtensionEventCompleter.future; expect(eventCalled, isTrue); { @@ -6854,19 +6637,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onExtensionError', + 'RtcEngineEventHandler.onExtensionStarted', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onExtensionErrorCompleter = Completer(); + final onExtensionStartedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onExtensionError: - (String provider, String extension, int error, String message) { - onExtensionErrorCompleter.complete(true); + onExtensionStarted: (String provider, String extension) { + onExtensionStartedCompleter.complete(true); }, ); @@ -6880,37 +6663,28 @@ void generatedTestCases(IrisTester irisTester) { { const String provider = "hello"; const String extension = "hello"; - const int error = 10; - const String message = "hello"; final eventJson = { 'provider': provider, 'extension': extension, - 'error': error, - 'message': message, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onExtensionError', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onExtensionError', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onExtensionError', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onExtensionStarted'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onExtensionErrorCompleter.isCompleted) { - onExtensionErrorCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onExtensionStartedCompleter.isCompleted) { + onExtensionStartedCompleter.complete(true); } } } } - final eventCalled = await onExtensionErrorCompleter.future; + final eventCalled = await onExtensionStartedCompleter.future; expect(eventCalled, isTrue); { @@ -6927,19 +6701,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onUserAccountUpdated', + 'RtcEngineEventHandler.onExtensionStopped', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onUserAccountUpdatedCompleter = Completer(); + final onExtensionStoppedCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onUserAccountUpdated: - (RtcConnection connection, int remoteUid, String userAccount) { - onUserAccountUpdatedCompleter.complete(true); + onExtensionStopped: (String provider, String extension) { + onExtensionStoppedCompleter.complete(true); }, ); @@ -6951,42 +6725,30 @@ void generatedTestCases(IrisTester irisTester) { await Future.delayed(const Duration(milliseconds: 500)); { - const String connectionChannelId = "hello"; - const int connectionLocalUid = 10; - const RtcConnection connection = RtcConnection( - channelId: connectionChannelId, - localUid: connectionLocalUid, - ); - const int remoteUid = 10; - const String userAccount = "hello"; + const String provider = "hello"; + const String extension = "hello"; final eventJson = { - 'connection': connection.toJson(), - 'remoteUid': remoteUid, - 'userAccount': userAccount, + 'provider': provider, + 'extension': extension, }; - if (!kIsWeb) { - irisTester.fireEvent('RtcEngineEventHandler_onUserAccountUpdated', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onUserAccountUpdated', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onUserAccountUpdatedEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onExtensionStopped'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onUserAccountUpdatedCompleter.isCompleted) { - onUserAccountUpdatedCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onExtensionStoppedCompleter.isCompleted) { + onExtensionStoppedCompleter.complete(true); } } } } - final eventCalled = await onUserAccountUpdatedCompleter.future; + final eventCalled = await onExtensionStoppedCompleter.future; expect(eventCalled, isTrue); { @@ -7003,19 +6765,20 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onLocalVideoTranscoderError', + 'RtcEngineEventHandler.onExtensionError', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onLocalVideoTranscoderErrorCompleter = Completer(); + final onExtensionErrorCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onLocalVideoTranscoderError: - (TranscodingVideoStream stream, VideoTranscoderError error) { - onLocalVideoTranscoderErrorCompleter.complete(true); + onExtensionError: + (String provider, String extension, int error, String message) { + onExtensionErrorCompleter.complete(true); }, ); @@ -7027,62 +6790,34 @@ void generatedTestCases(IrisTester irisTester) { await Future.delayed(const Duration(milliseconds: 500)); { - const VideoSourceType streamSourceType = - VideoSourceType.videoSourceCameraPrimary; - const int streamRemoteUserUid = 10; - const String streamImageUrl = "hello"; - const int streamMediaPlayerId = 10; - const int streamX = 10; - const int streamY = 10; - const int streamWidth = 10; - const int streamHeight = 10; - const int streamZOrder = 10; - const double streamAlpha = 10.0; - const bool streamMirror = true; - const TranscodingVideoStream stream = TranscodingVideoStream( - sourceType: streamSourceType, - remoteUserUid: streamRemoteUserUid, - imageUrl: streamImageUrl, - mediaPlayerId: streamMediaPlayerId, - x: streamX, - y: streamY, - width: streamWidth, - height: streamHeight, - zOrder: streamZOrder, - alpha: streamAlpha, - mirror: streamMirror, - ); - const VideoTranscoderError error = - VideoTranscoderError.vtErrVideoSourceNotReady; + const String provider = "hello"; + const String extension = "hello"; + const int error = 10; + const String message = "hello"; final eventJson = { - 'stream': stream.toJson(), - 'error': error.value(), + 'provider': provider, + 'extension': extension, + 'error': error, + 'message': message, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalVideoTranscoderError', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onLocalVideoTranscoderError', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onLocalVideoTranscoderError', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onExtensionError'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onLocalVideoTranscoderErrorCompleter.isCompleted) { - onLocalVideoTranscoderErrorCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onExtensionErrorCompleter.isCompleted) { + onExtensionErrorCompleter.complete(true); } } } } - final eventCalled = await onLocalVideoTranscoderErrorCompleter.future; + final eventCalled = await onExtensionErrorCompleter.future; expect(eventCalled, isTrue); { @@ -7099,21 +6834,19 @@ void generatedTestCases(IrisTester irisTester) { ); testWidgets( - 'onVideoRenderingTracingResult', + 'RtcEngineEventHandler.onSetRtmFlagResult', (WidgetTester tester) async { RtcEngine rtcEngine = createAgoraRtcEngine(); await rtcEngine.initialize(RtcEngineContext( appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final onVideoRenderingTracingResultCompleter = Completer(); + final onSetRtmFlagResultCompleter = Completer(); final theRtcEngineEventHandler = RtcEngineEventHandler( - onVideoRenderingTracingResult: (RtcConnection connection, - int uid, - MediaTraceEvent currentEvent, - VideoRenderingTracingInfo tracingInfo) { - onVideoRenderingTracingResultCompleter.complete(true); + onSetRtmFlagResult: (RtcConnection connection, int code) { + onSetRtmFlagResultCompleter.complete(true); }, ); @@ -7131,56 +6864,29 @@ void generatedTestCases(IrisTester irisTester) { channelId: connectionChannelId, localUid: connectionLocalUid, ); - const int uid = 10; - const MediaTraceEvent currentEvent = - MediaTraceEvent.mediaTraceEventVideoRendered; - const int tracingInfoElapsedTime = 10; - const int tracingInfoStart2JoinChannel = 10; - const int tracingInfoJoin2JoinSuccess = 10; - const int tracingInfoJoinSuccess2RemoteJoined = 10; - const int tracingInfoRemoteJoined2SetView = 10; - const int tracingInfoRemoteJoined2UnmuteVideo = 10; - const int tracingInfoRemoteJoined2PacketReceived = 10; - const VideoRenderingTracingInfo tracingInfo = VideoRenderingTracingInfo( - elapsedTime: tracingInfoElapsedTime, - start2JoinChannel: tracingInfoStart2JoinChannel, - join2JoinSuccess: tracingInfoJoin2JoinSuccess, - joinSuccess2RemoteJoined: tracingInfoJoinSuccess2RemoteJoined, - remoteJoined2SetView: tracingInfoRemoteJoined2SetView, - remoteJoined2UnmuteVideo: tracingInfoRemoteJoined2UnmuteVideo, - remoteJoined2PacketReceived: tracingInfoRemoteJoined2PacketReceived, - ); + const int code = 10; final eventJson = { 'connection': connection.toJson(), - 'uid': uid, - 'currentEvent': currentEvent.value(), - 'tracingInfo': tracingInfo.toJson(), + 'code': code, }; - if (!kIsWeb) { - irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoRenderingTracingResult', - params: eventJson); - irisTester.fireEvent( - 'RtcEngineEventHandlerEx_onVideoRenderingTracingResult', - params: eventJson); - } else { - final ret = irisTester.fireEvent( - 'RtcEngineEventHandler_onVideoRenderingTracingResultEx', - params: eventJson); -// Delay 200 milliseconds to ensure the callback is called. + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onSetRtmFlagResult'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. - if (ret) { - if (!onVideoRenderingTracingResultCompleter.isCompleted) { - onVideoRenderingTracingResultCompleter.complete(true); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onSetRtmFlagResultCompleter.isCompleted) { + onSetRtmFlagResultCompleter.complete(true); } } } } - final eventCalled = await onVideoRenderingTracingResultCompleter.future; + final eventCalled = await onSetRtmFlagResultCompleter.future; expect(eventCalled, isTrue); { diff --git a/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart index c7e31ecbe..412374946 100644 --- a/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/rtcengineex_fake_test.generated.dart @@ -12,7 +12,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void rtcEngineExSmokeTestCases() { testWidgets( - 'joinChannelEx', + 'RtcEngineEx.joinChannelEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -22,6 +22,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String token = "hello"; @@ -57,6 +58,7 @@ void rtcEngineExSmokeTestCases() { const bool optionsPublishMediaPlayerAudioTrack = true; const bool optionsPublishMediaPlayerVideoTrack = true; const bool optionsPublishTranscodedVideoTrack = true; + const bool optionsPublishMixedAudioTrack = true; const bool optionsAutoSubscribeAudio = true; const bool optionsAutoSubscribeVideo = true; const bool optionsEnableAudioRecordingOrPlayout = true; @@ -88,6 +90,7 @@ void rtcEngineExSmokeTestCases() { publishMediaPlayerAudioTrack: optionsPublishMediaPlayerAudioTrack, publishMediaPlayerVideoTrack: optionsPublishMediaPlayerVideoTrack, publishTranscodedVideoTrack: optionsPublishTranscodedVideoTrack, + publishMixedAudioTrack: optionsPublishMixedAudioTrack, autoSubscribeAudio: optionsAutoSubscribeAudio, autoSubscribeVideo: optionsAutoSubscribeVideo, enableAudioRecordingOrPlayout: optionsEnableAudioRecordingOrPlayout, @@ -112,7 +115,7 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[joinChannelEx] error: ${e.toString()}'); + debugPrint('[RtcEngineEx.joinChannelEx] error: ${e.toString()}'); rethrow; } @@ -128,7 +131,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'leaveChannelEx', + 'RtcEngineEx.leaveChannelEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -138,6 +141,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -160,7 +164,7 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[leaveChannelEx] error: ${e.toString()}'); + debugPrint('[RtcEngineEx.leaveChannelEx] error: ${e.toString()}'); rethrow; } @@ -176,7 +180,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'updateChannelMediaOptionsEx', + 'RtcEngineEx.updateChannelMediaOptionsEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -186,6 +190,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const ClientRoleType optionsClientRoleType = @@ -214,6 +219,7 @@ void rtcEngineExSmokeTestCases() { const bool optionsPublishMediaPlayerAudioTrack = true; const bool optionsPublishMediaPlayerVideoTrack = true; const bool optionsPublishTranscodedVideoTrack = true; + const bool optionsPublishMixedAudioTrack = true; const bool optionsAutoSubscribeAudio = true; const bool optionsAutoSubscribeVideo = true; const bool optionsEnableAudioRecordingOrPlayout = true; @@ -245,6 +251,7 @@ void rtcEngineExSmokeTestCases() { publishMediaPlayerAudioTrack: optionsPublishMediaPlayerAudioTrack, publishMediaPlayerVideoTrack: optionsPublishMediaPlayerVideoTrack, publishTranscodedVideoTrack: optionsPublishTranscodedVideoTrack, + publishMixedAudioTrack: optionsPublishMixedAudioTrack, autoSubscribeAudio: optionsAutoSubscribeAudio, autoSubscribeVideo: optionsAutoSubscribeVideo, enableAudioRecordingOrPlayout: optionsEnableAudioRecordingOrPlayout, @@ -274,7 +281,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateChannelMediaOptionsEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.updateChannelMediaOptionsEx] error: ${e.toString()}'); rethrow; } @@ -290,7 +298,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setVideoEncoderConfigurationEx', + 'RtcEngineEx.setVideoEncoderConfigurationEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -300,6 +308,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoCodecType configCodecType = VideoCodecType.videoCodecNone; @@ -349,7 +358,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setVideoEncoderConfigurationEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.setVideoEncoderConfigurationEx] error: ${e.toString()}'); rethrow; } @@ -365,7 +375,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setupRemoteVideoEx', + 'RtcEngineEx.setupRemoteVideoEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -375,6 +385,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const RenderModeType canvasRenderMode = RenderModeType.renderModeHidden; @@ -394,14 +405,18 @@ void rtcEngineExSmokeTestCases() { width: cropAreaWidth, height: cropAreaHeight, ); - const int canvasView = 10; + const VideoModulePosition canvasPosition = + VideoModulePosition.positionPostCapturer; const int canvasUid = 10; + const int canvasSubviewUid = 10; + const int canvasView = 10; const int canvasBackgroundColor = 10; const int canvasMediaPlayerId = 10; const bool canvasEnableAlphaMask = true; const VideoCanvas canvas = VideoCanvas( - view: canvasView, uid: canvasUid, + subviewUid: canvasSubviewUid, + view: canvasView, backgroundColor: canvasBackgroundColor, renderMode: canvasRenderMode, mirrorMode: canvasMirrorMode, @@ -410,6 +425,7 @@ void rtcEngineExSmokeTestCases() { mediaPlayerId: canvasMediaPlayerId, cropArea: canvasCropArea, enableAlphaMask: canvasEnableAlphaMask, + position: canvasPosition, ); const String connectionChannelId = "hello"; const int connectionLocalUid = 10; @@ -423,7 +439,7 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setupRemoteVideoEx] error: ${e.toString()}'); + debugPrint('[RtcEngineEx.setupRemoteVideoEx] error: ${e.toString()}'); rethrow; } @@ -439,7 +455,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'muteRemoteAudioStreamEx', + 'RtcEngineEx.muteRemoteAudioStreamEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -449,6 +465,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -466,7 +483,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteRemoteAudioStreamEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.muteRemoteAudioStreamEx] error: ${e.toString()}'); rethrow; } @@ -482,7 +500,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'muteRemoteVideoStreamEx', + 'RtcEngineEx.muteRemoteVideoStreamEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -492,6 +510,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -509,7 +528,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteRemoteVideoStreamEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.muteRemoteVideoStreamEx] error: ${e.toString()}'); rethrow; } @@ -525,7 +545,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setRemoteVideoStreamTypeEx', + 'RtcEngineEx.setRemoteVideoStreamTypeEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -535,6 +555,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -552,7 +573,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteVideoStreamTypeEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.setRemoteVideoStreamTypeEx] error: ${e.toString()}'); rethrow; } @@ -568,7 +590,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'muteLocalAudioStreamEx', + 'RtcEngineEx.muteLocalAudioStreamEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -578,6 +600,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -593,7 +616,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteLocalAudioStreamEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.muteLocalAudioStreamEx] error: ${e.toString()}'); rethrow; } @@ -609,7 +633,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'muteLocalVideoStreamEx', + 'RtcEngineEx.muteLocalVideoStreamEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -619,6 +643,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -634,7 +659,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteLocalVideoStreamEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.muteLocalVideoStreamEx] error: ${e.toString()}'); rethrow; } @@ -650,7 +676,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'muteAllRemoteAudioStreamsEx', + 'RtcEngineEx.muteAllRemoteAudioStreamsEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -660,6 +686,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -675,7 +702,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteAllRemoteAudioStreamsEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.muteAllRemoteAudioStreamsEx] error: ${e.toString()}'); rethrow; } @@ -691,7 +719,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'muteAllRemoteVideoStreamsEx', + 'RtcEngineEx.muteAllRemoteVideoStreamsEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -701,6 +729,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -716,7 +745,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteAllRemoteVideoStreamsEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.muteAllRemoteVideoStreamsEx] error: ${e.toString()}'); rethrow; } @@ -732,7 +762,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setRemoteVideoSubscriptionOptionsEx', + 'RtcEngineEx.setRemoteVideoSubscriptionOptionsEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -742,6 +772,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -765,7 +796,7 @@ void rtcEngineExSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setRemoteVideoSubscriptionOptionsEx] error: ${e.toString()}'); + '[RtcEngineEx.setRemoteVideoSubscriptionOptionsEx] error: ${e.toString()}'); rethrow; } @@ -781,7 +812,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setRemoteVoicePositionEx', + 'RtcEngineEx.setRemoteVoicePositionEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -791,6 +822,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -810,7 +842,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteVoicePositionEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.setRemoteVoicePositionEx] error: ${e.toString()}'); rethrow; } @@ -826,7 +859,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setRemoteUserSpatialAudioParamsEx', + 'RtcEngineEx.setRemoteUserSpatialAudioParamsEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -836,6 +869,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -871,7 +905,7 @@ void rtcEngineExSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[setRemoteUserSpatialAudioParamsEx] error: ${e.toString()}'); + '[RtcEngineEx.setRemoteUserSpatialAudioParamsEx] error: ${e.toString()}'); rethrow; } @@ -887,7 +921,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setRemoteRenderModeEx', + 'RtcEngineEx.setRemoteRenderModeEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -897,6 +931,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -917,7 +952,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setRemoteRenderModeEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.setRemoteRenderModeEx] error: ${e.toString()}'); rethrow; } @@ -933,7 +969,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'enableLoopbackRecordingEx', + 'RtcEngineEx.enableLoopbackRecordingEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -943,6 +979,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -960,7 +997,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableLoopbackRecordingEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.enableLoopbackRecordingEx] error: ${e.toString()}'); rethrow; } @@ -976,7 +1014,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'adjustRecordingSignalVolumeEx', + 'RtcEngineEx.adjustRecordingSignalVolumeEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -986,6 +1024,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int volume = 10; @@ -1001,7 +1040,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[adjustRecordingSignalVolumeEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.adjustRecordingSignalVolumeEx] error: ${e.toString()}'); rethrow; } @@ -1017,7 +1057,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'muteRecordingSignalEx', + 'RtcEngineEx.muteRecordingSignalEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1027,6 +1067,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const bool mute = true; @@ -1042,7 +1083,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[muteRecordingSignalEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.muteRecordingSignalEx] error: ${e.toString()}'); rethrow; } @@ -1058,7 +1100,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'adjustUserPlaybackSignalVolumeEx', + 'RtcEngineEx.adjustUserPlaybackSignalVolumeEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1068,6 +1110,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -1086,7 +1129,7 @@ void rtcEngineExSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[adjustUserPlaybackSignalVolumeEx] error: ${e.toString()}'); + '[RtcEngineEx.adjustUserPlaybackSignalVolumeEx] error: ${e.toString()}'); rethrow; } @@ -1102,7 +1145,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'getConnectionStateEx', + 'RtcEngineEx.getConnectionStateEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1112,6 +1155,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -1125,7 +1169,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getConnectionStateEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.getConnectionStateEx] error: ${e.toString()}'); rethrow; } @@ -1141,7 +1186,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'enableEncryptionEx', + 'RtcEngineEx.enableEncryptionEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1151,6 +1196,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -1175,7 +1221,7 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableEncryptionEx] error: ${e.toString()}'); + debugPrint('[RtcEngineEx.enableEncryptionEx] error: ${e.toString()}'); rethrow; } @@ -1191,7 +1237,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'sendStreamMessageEx', + 'RtcEngineEx.sendStreamMessageEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1201,6 +1247,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int streamId = 10; @@ -1220,7 +1267,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[sendStreamMessageEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.sendStreamMessageEx] error: ${e.toString()}'); rethrow; } @@ -1236,7 +1284,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'addVideoWatermarkEx', + 'RtcEngineEx.addVideoWatermarkEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1246,6 +1294,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String watermarkUrl = "hello"; @@ -1300,7 +1349,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[addVideoWatermarkEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.addVideoWatermarkEx] error: ${e.toString()}'); rethrow; } @@ -1316,7 +1366,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'clearVideoWatermarkEx', + 'RtcEngineEx.clearVideoWatermarkEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1326,6 +1376,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -1339,7 +1390,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[clearVideoWatermarkEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.clearVideoWatermarkEx] error: ${e.toString()}'); rethrow; } @@ -1355,7 +1407,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'sendCustomReportMessageEx', + 'RtcEngineEx.sendCustomReportMessageEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1365,6 +1417,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String id = "hello"; @@ -1388,7 +1441,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[sendCustomReportMessageEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.sendCustomReportMessageEx] error: ${e.toString()}'); rethrow; } @@ -1404,7 +1458,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'enableAudioVolumeIndicationEx', + 'RtcEngineEx.enableAudioVolumeIndicationEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1414,6 +1468,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int interval = 10; @@ -1433,7 +1488,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableAudioVolumeIndicationEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.enableAudioVolumeIndicationEx] error: ${e.toString()}'); rethrow; } @@ -1449,7 +1505,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'startRtmpStreamWithoutTranscodingEx', + 'RtcEngineEx.startRtmpStreamWithoutTranscodingEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1459,6 +1515,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String url = "hello"; @@ -1475,7 +1532,7 @@ void rtcEngineExSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[startRtmpStreamWithoutTranscodingEx] error: ${e.toString()}'); + '[RtcEngineEx.startRtmpStreamWithoutTranscodingEx] error: ${e.toString()}'); rethrow; } @@ -1491,7 +1548,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'startRtmpStreamWithTranscodingEx', + 'RtcEngineEx.startRtmpStreamWithTranscodingEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1501,6 +1558,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String url = "hello"; @@ -1570,7 +1628,7 @@ void rtcEngineExSmokeTestCases() { } catch (e) { if (e is! AgoraRtcException) { debugPrint( - '[startRtmpStreamWithTranscodingEx] error: ${e.toString()}'); + '[RtcEngineEx.startRtmpStreamWithTranscodingEx] error: ${e.toString()}'); rethrow; } @@ -1586,7 +1644,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'updateRtmpTranscodingEx', + 'RtcEngineEx.updateRtmpTranscodingEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1596,6 +1654,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const VideoCodecProfileType transcodingVideoCodecProfile = @@ -1662,7 +1721,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[updateRtmpTranscodingEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.updateRtmpTranscodingEx] error: ${e.toString()}'); rethrow; } @@ -1678,7 +1738,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'stopRtmpStreamEx', + 'RtcEngineEx.stopRtmpStreamEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1688,6 +1748,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String url = "hello"; @@ -1703,7 +1764,7 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopRtmpStreamEx] error: ${e.toString()}'); + debugPrint('[RtcEngineEx.stopRtmpStreamEx] error: ${e.toString()}'); rethrow; } @@ -1719,7 +1780,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'stopChannelMediaRelayEx', + 'RtcEngineEx.stopChannelMediaRelayEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1729,6 +1790,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -1742,7 +1804,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopChannelMediaRelayEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.stopChannelMediaRelayEx] error: ${e.toString()}'); rethrow; } @@ -1758,7 +1821,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'pauseAllChannelMediaRelayEx', + 'RtcEngineEx.pauseAllChannelMediaRelayEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1768,6 +1831,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -1781,7 +1845,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[pauseAllChannelMediaRelayEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.pauseAllChannelMediaRelayEx] error: ${e.toString()}'); rethrow; } @@ -1797,7 +1862,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'resumeAllChannelMediaRelayEx', + 'RtcEngineEx.resumeAllChannelMediaRelayEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1807,6 +1872,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -1820,7 +1886,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[resumeAllChannelMediaRelayEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.resumeAllChannelMediaRelayEx] error: ${e.toString()}'); rethrow; } @@ -1836,7 +1903,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'getUserInfoByUserAccountEx', + 'RtcEngineEx.getUserInfoByUserAccountEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1846,6 +1913,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String userAccount = "hello"; @@ -1861,7 +1929,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getUserInfoByUserAccountEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.getUserInfoByUserAccountEx] error: ${e.toString()}'); rethrow; } @@ -1877,7 +1946,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'getUserInfoByUidEx', + 'RtcEngineEx.getUserInfoByUidEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1887,6 +1956,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const int uid = 10; @@ -1902,7 +1972,7 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getUserInfoByUidEx] error: ${e.toString()}'); + debugPrint('[RtcEngineEx.getUserInfoByUidEx] error: ${e.toString()}'); rethrow; } @@ -1918,7 +1988,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'enableDualStreamModeEx', + 'RtcEngineEx.enableDualStreamModeEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1928,6 +1998,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -1957,7 +2028,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableDualStreamModeEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.enableDualStreamModeEx] error: ${e.toString()}'); rethrow; } @@ -1973,7 +2045,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'setDualStreamModeEx', + 'RtcEngineEx.setDualStreamModeEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -1983,6 +2055,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const SimulcastStreamMode mode = @@ -2013,7 +2086,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setDualStreamModeEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.setDualStreamModeEx] error: ${e.toString()}'); rethrow; } @@ -2029,7 +2103,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'takeSnapshotEx', + 'RtcEngineEx.takeSnapshotEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2039,6 +2113,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -2056,7 +2131,7 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[takeSnapshotEx] error: ${e.toString()}'); + debugPrint('[RtcEngineEx.takeSnapshotEx] error: ${e.toString()}'); rethrow; } @@ -2072,7 +2147,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'enableContentInspectEx', + 'RtcEngineEx.enableContentInspectEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2082,6 +2157,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const bool enabled = true; @@ -2108,7 +2184,8 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enableContentInspectEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.enableContentInspectEx] error: ${e.toString()}'); rethrow; } @@ -2124,7 +2201,7 @@ void rtcEngineExSmokeTestCases() { ); testWidgets( - 'startMediaRenderingTracingEx', + 'RtcEngineEx.startMediaRenderingTracingEx', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -2134,6 +2211,7 @@ void rtcEngineExSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { const String connectionChannelId = "hello"; @@ -2147,7 +2225,50 @@ void rtcEngineExSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startMediaRenderingTracingEx] error: ${e.toString()}'); + debugPrint( + '[RtcEngineEx.startMediaRenderingTracingEx] error: ${e.toString()}'); + rethrow; + } + + if (e.code != -4) { + // Only not supported error supported. + rethrow; + } + } + + await rtcEngineEx.release(); + }, +// skip: !(), + ); + + testWidgets( + 'RtcEngineEx.setParametersEx', + (WidgetTester tester) async { + String engineAppId = const String.fromEnvironment('TEST_APP_ID', + defaultValue: ''); + + RtcEngineEx rtcEngineEx = createAgoraRtcEngineEx(); + await rtcEngineEx.initialize(RtcEngineContext( + appId: engineAppId, + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); + + try { + const String connectionChannelId = "hello"; + const int connectionLocalUid = 10; + const RtcConnection connection = RtcConnection( + channelId: connectionChannelId, + localUid: connectionLocalUid, + ); + const String parameters = "hello"; + await rtcEngineEx.setParametersEx( + connection: connection, + parameters: parameters, + ); + } catch (e) { + if (e is! AgoraRtcException) { + debugPrint('[RtcEngineEx.setParametersEx] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/generated/videodevicemanager_fake_test.generated.dart b/test_shard/fake_test_app/integration_test/generated/videodevicemanager_fake_test.generated.dart index 6c3d4c9e9..476402211 100644 --- a/test_shard/fake_test_app/integration_test/generated/videodevicemanager_fake_test.generated.dart +++ b/test_shard/fake_test_app/integration_test/generated/videodevicemanager_fake_test.generated.dart @@ -11,7 +11,7 @@ import 'package:iris_method_channel/iris_method_channel.dart'; void videoDeviceManagerSmokeTestCases() { testWidgets( - 'enumerateVideoDevices', + 'VideoDeviceManager.enumerateVideoDevices', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -21,6 +21,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -28,7 +29,8 @@ void videoDeviceManagerSmokeTestCases() { await videoDeviceManager.enumerateVideoDevices(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[enumerateVideoDevices] error: ${e.toString()}'); + debugPrint( + '[VideoDeviceManager.enumerateVideoDevices] error: ${e.toString()}'); rethrow; } @@ -45,7 +47,7 @@ void videoDeviceManagerSmokeTestCases() { ); testWidgets( - 'setDevice', + 'VideoDeviceManager.setDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -55,6 +57,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -65,7 +68,7 @@ void videoDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[setDevice] error: ${e.toString()}'); + debugPrint('[VideoDeviceManager.setDevice] error: ${e.toString()}'); rethrow; } @@ -82,7 +85,7 @@ void videoDeviceManagerSmokeTestCases() { ); testWidgets( - 'getDevice', + 'VideoDeviceManager.getDevice', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -92,6 +95,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -99,7 +103,7 @@ void videoDeviceManagerSmokeTestCases() { await videoDeviceManager.getDevice(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getDevice] error: ${e.toString()}'); + debugPrint('[VideoDeviceManager.getDevice] error: ${e.toString()}'); rethrow; } @@ -116,7 +120,7 @@ void videoDeviceManagerSmokeTestCases() { ); testWidgets( - 'numberOfCapabilities', + 'VideoDeviceManager.numberOfCapabilities', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -126,6 +130,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -136,7 +141,8 @@ void videoDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[numberOfCapabilities] error: ${e.toString()}'); + debugPrint( + '[VideoDeviceManager.numberOfCapabilities] error: ${e.toString()}'); rethrow; } @@ -153,7 +159,7 @@ void videoDeviceManagerSmokeTestCases() { ); testWidgets( - 'getCapability', + 'VideoDeviceManager.getCapability', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -163,6 +169,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -175,7 +182,8 @@ void videoDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[getCapability] error: ${e.toString()}'); + debugPrint( + '[VideoDeviceManager.getCapability] error: ${e.toString()}'); rethrow; } @@ -192,7 +200,7 @@ void videoDeviceManagerSmokeTestCases() { ); testWidgets( - 'startDeviceTest', + 'VideoDeviceManager.startDeviceTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -202,6 +210,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -212,7 +221,8 @@ void videoDeviceManagerSmokeTestCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[startDeviceTest] error: ${e.toString()}'); + debugPrint( + '[VideoDeviceManager.startDeviceTest] error: ${e.toString()}'); rethrow; } @@ -229,7 +239,7 @@ void videoDeviceManagerSmokeTestCases() { ); testWidgets( - 'stopDeviceTest', + 'VideoDeviceManager.stopDeviceTest', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -239,6 +249,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -246,7 +257,8 @@ void videoDeviceManagerSmokeTestCases() { await videoDeviceManager.stopDeviceTest(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[stopDeviceTest] error: ${e.toString()}'); + debugPrint( + '[VideoDeviceManager.stopDeviceTest] error: ${e.toString()}'); rethrow; } @@ -263,7 +275,7 @@ void videoDeviceManagerSmokeTestCases() { ); testWidgets( - 'release', + 'VideoDeviceManager.release', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -273,6 +285,7 @@ void videoDeviceManagerSmokeTestCases() { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -280,7 +293,7 @@ void videoDeviceManagerSmokeTestCases() { await videoDeviceManager.release(); } catch (e) { if (e is! AgoraRtcException) { - debugPrint('[release] error: ${e.toString()}'); + debugPrint('[VideoDeviceManager.release] error: ${e.toString()}'); rethrow; } diff --git a/test_shard/fake_test_app/integration_test/testcases/event_ids_mapping.dart b/test_shard/fake_test_app/integration_test/testcases/event_ids_mapping.dart new file mode 100644 index 000000000..2df982ca2 --- /dev/null +++ b/test_shard/fake_test_app/integration_test/testcases/event_ids_mapping.dart @@ -0,0 +1,8 @@ +import '../generated/event_ids_mapping_gen.dart' as gen; + +const eventIdsMapping = { + ...gen.eventIdsMapping, + "MediaPlayerVideoFrameObserver_onFrame": [ + "MediaPlayerVideoFrameObserver_onFrame" + ], +}; diff --git a/test_shard/fake_test_app/integration_test/testcases/localspatialaudioengine_testcases.dart b/test_shard/fake_test_app/integration_test/testcases/localspatialaudioengine_testcases.dart index 4d2a7fb34..a9d83aa1d 100644 --- a/test_shard/fake_test_app/integration_test/testcases/localspatialaudioengine_testcases.dart +++ b/test_shard/fake_test_app/integration_test/testcases/localspatialaudioengine_testcases.dart @@ -1,106 +1,6 @@ -import 'package:agora_rtc_engine/agora_rtc_engine.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:iris_tester/iris_tester.dart'; -import 'package:iris_method_channel/iris_method_channel.dart'; import '../generated/localspatialaudioengine_fake_test.generated.dart' as generated; -import '../generated/basespatialaudioengine_fake_test.generated.dart' - as basespatialaudioengine; void testCases() { generated.localSpatialAudioEngineSmokeTestCases(); - basespatialaudioengine.localSpatialAudioEngineSmokeTestCases(); - - testWidgets( - 'updateSelfPosition', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const List position = [1, 2, 3]; - const List axisForward = [1, 2, 3]; - const List axisRight = [1, 2, 3]; - const List axisUp = [1, 2, 3]; - await localSpatialAudioEngine.updateSelfPosition( - position: position, - axisForward: axisForward, - axisRight: axisRight, - axisUp: axisUp, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[updateSelfPosition] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, - ); - - testWidgets( - 'updateSelfPositionEx', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); - - try { - const List position = [1, 2, 3]; - const List axisForward = [1, 2, 3]; - const List axisRight = [1, 2, 3]; - const List axisUp = [1, 2, 3]; - const String connectionChannelId = "hello"; - const int connectionLocalUid = 10; - const RtcConnection connection = RtcConnection( - channelId: connectionChannelId, - localUid: connectionLocalUid, - ); - await localSpatialAudioEngine.updateSelfPositionEx( - position: position, - axisForward: axisForward, - axisRight: axisRight, - axisUp: axisUp, - connection: connection, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[updateSelfPositionEx] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await localSpatialAudioEngine.release(); - await rtcEngine.release(); - }, - ); } diff --git a/test_shard/fake_test_app/integration_test/testcases/rtcengine_debug_testcases.dart b/test_shard/fake_test_app/integration_test/testcases/rtcengine_debug_testcases.dart index e6cdcfe8d..c42d1854e 100644 --- a/test_shard/fake_test_app/integration_test/testcases/rtcengine_debug_testcases.dart +++ b/test_shard/fake_test_app/integration_test/testcases/rtcengine_debug_testcases.dart @@ -2,12 +2,9 @@ import 'dart:io'; import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:iris_tester/iris_tester.dart'; import 'package:agora_rtc_engine/agora_rtc_engine_debug.dart'; import 'package:path_provider/path_provider.dart'; -import 'package:iris_method_channel/iris_method_channel.dart'; void testCases() { testWidgets( diff --git a/test_shard/fake_test_app/integration_test/testcases/rtcengine_rtcengineeventhandler_testcases.dart b/test_shard/fake_test_app/integration_test/testcases/rtcengine_rtcengineeventhandler_testcases.dart index 0f42f2a18..5647f7ec4 100644 --- a/test_shard/fake_test_app/integration_test/testcases/rtcengine_rtcengineeventhandler_testcases.dart +++ b/test_shard/fake_test_app/integration_test/testcases/rtcengine_rtcengineeventhandler_testcases.dart @@ -1,19 +1,16 @@ import 'dart:async'; import 'dart:io'; -import 'dart:typed_data'; import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; import 'package:iris_tester/iris_tester.dart'; import '../generated/rtcengine_rtcengineeventhandler_testcases.generated.dart' as generated; -import 'package:path/path.dart' as path; -import 'package:iris_method_channel/iris_method_channel.dart'; -void testCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void testCases(ValueGetter irisTester) { generated.generatedTestCases(irisTester); testWidgets( @@ -55,10 +52,20 @@ void testCases(IrisTester irisTester) { 'numFaces': numFaces, }; - irisTester.fireEvent('RtcEngineEventHandler_onFacePositionChanged', - params: eventJson); - irisTester.fireEvent('RtcEngineEventHandlerEx_onFacePositionChanged', - params: eventJson); + final eventIds = + eventIdsMapping['RtcEngineEventHandler_onFacePositionChanged'] ?? + []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!onFacePositionChangedCompleter.isCompleted) { + onFacePositionChangedCompleter.complete(true); + } + } + } } final eventCalled = await onFacePositionChangedCompleter.future; diff --git a/test_shard/fake_test_app/integration_test/testcases/rtcengine_testcases.dart b/test_shard/fake_test_app/integration_test/testcases/rtcengine_testcases.dart index b5454c13e..9e1ef1d3d 100644 --- a/test_shard/fake_test_app/integration_test/testcases/rtcengine_testcases.dart +++ b/test_shard/fake_test_app/integration_test/testcases/rtcengine_testcases.dart @@ -1,22 +1,15 @@ -import 'dart:async'; import 'dart:io'; -import 'dart:typed_data'; import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:iris_tester/iris_tester.dart'; import '../generated/rtcengine_fake_test.generated.dart' as generated; -import 'package:path/path.dart' as path; -import 'package:iris_method_channel/iris_method_channel.dart'; void testCases() { generated.rtcEngineSmokeTestCases(); testWidgets( - 'startChannelMediaRelay', + 'startOrUpdateChannelMediaRelay', (WidgetTester tester) async { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); @@ -46,7 +39,7 @@ void testCases() { destInfos: configurationDestInfos, destCount: configurationDestCount, ); - await rtcEngine.startChannelMediaRelay( + await rtcEngine.startOrUpdateChannelMediaRelay( configuration, ); } catch (e) { @@ -65,56 +58,6 @@ void testCases() { }, ); - testWidgets( - 'updateChannelMediaRelay', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - try { - const String srcInfoChannelName = "hello"; - const String srcInfoToken = "hello"; - const int srcInfoUid = 10; - const ChannelMediaInfo configurationSrcInfo = ChannelMediaInfo( - channelName: srcInfoChannelName, - token: srcInfoToken, - uid: srcInfoUid, - ); - const List configurationDestInfos = [ - ChannelMediaInfo(channelName: 'hello', token: 'hello', uid: 100), - ]; - const int configurationDestCount = 1; - const ChannelMediaRelayConfiguration configuration = - ChannelMediaRelayConfiguration( - srcInfo: configurationSrcInfo, - destInfos: configurationDestInfos, - destCount: configurationDestCount, - ); - await rtcEngine.updateChannelMediaRelay( - configuration, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[updateChannelMediaRelay] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await rtcEngine.release(); - }, - ); - testWidgets( 'setLocalAccessPoint', (WidgetTester tester) async { @@ -420,54 +363,4 @@ void testCases() { await rtcEngine.release(); }, ); - - testWidgets( - 'startOrUpdateChannelMediaRelay', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngine rtcEngine = createAgoraRtcEngine(); - await rtcEngine.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - try { - const String srcInfoChannelName = "hello"; - const String srcInfoToken = "hello"; - const int srcInfoUid = 10; - const ChannelMediaInfo configurationSrcInfo = ChannelMediaInfo( - channelName: srcInfoChannelName, - token: srcInfoToken, - uid: srcInfoUid, - ); - const List configurationDestInfos = [ - configurationSrcInfo - ]; - const int configurationDestCount = 1; - const ChannelMediaRelayConfiguration configuration = - ChannelMediaRelayConfiguration( - srcInfo: configurationSrcInfo, - destInfos: configurationDestInfos, - destCount: configurationDestCount, - ); - await rtcEngine.startOrUpdateChannelMediaRelay( - configuration, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[startOrUpdateChannelMediaRelay] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await rtcEngine.release(); - }, - ); } diff --git a/test_shard/fake_test_app/integration_test/testcases/rtcengineex_testcases.dart b/test_shard/fake_test_app/integration_test/testcases/rtcengineex_testcases.dart index 1ab733957..e1d7e1225 100644 --- a/test_shard/fake_test_app/integration_test/testcases/rtcengineex_testcases.dart +++ b/test_shard/fake_test_app/integration_test/testcases/rtcengineex_testcases.dart @@ -1,13 +1,8 @@ import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:iris_tester/iris_tester.dart'; -import 'package:integration_test/integration_test.dart'; import '../generated/rtcengineex_fake_test.generated.dart' as generated; -import 'package:iris_method_channel/iris_method_channel.dart'; void testCases() { generated.rtcEngineExSmokeTestCases(); @@ -184,122 +179,6 @@ void testCases() { // skip: !(), ); - testWidgets( - 'startChannelMediaRelayEx', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngineEx rtcEngineEx = createAgoraRtcEngineEx(); - await rtcEngineEx.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - try { - const String srcInfoChannelName = "hello"; - const String srcInfoToken = "hello"; - const int srcInfoUid = 10; - const ChannelMediaInfo configurationSrcInfo = ChannelMediaInfo( - channelName: srcInfoChannelName, - token: srcInfoToken, - uid: srcInfoUid, - ); - const List configurationDestInfos = [ - ChannelMediaInfo(channelName: 'hello', token: 'hello', uid: 100), - ]; - const int configurationDestCount = 1; - const ChannelMediaRelayConfiguration configuration = - ChannelMediaRelayConfiguration( - srcInfo: configurationSrcInfo, - destInfos: configurationDestInfos, - destCount: configurationDestCount, - ); - const String connectionChannelId = "hello"; - const int connectionLocalUid = 10; - const RtcConnection connection = RtcConnection( - channelId: connectionChannelId, - localUid: connectionLocalUid, - ); - await rtcEngineEx.startChannelMediaRelayEx( - configuration: configuration, - connection: connection, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[startChannelMediaRelayEx] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await rtcEngineEx.release(); - }, -// skip: !(), - ); - - testWidgets( - 'updateChannelMediaRelayEx', - (WidgetTester tester) async { - String engineAppId = const String.fromEnvironment('TEST_APP_ID', - defaultValue: ''); - - RtcEngineEx rtcEngineEx = createAgoraRtcEngineEx(); - await rtcEngineEx.initialize(RtcEngineContext( - appId: engineAppId, - areaCode: AreaCode.areaCodeGlob.value(), - )); - - try { - const String srcInfoChannelName = "hello"; - const String srcInfoToken = "hello"; - const int srcInfoUid = 10; - const ChannelMediaInfo configurationSrcInfo = ChannelMediaInfo( - channelName: srcInfoChannelName, - token: srcInfoToken, - uid: srcInfoUid, - ); - const List configurationDestInfos = [ - ChannelMediaInfo(channelName: 'hello', token: 'hello', uid: 100), - ]; - const int configurationDestCount = 1; - const ChannelMediaRelayConfiguration configuration = - ChannelMediaRelayConfiguration( - srcInfo: configurationSrcInfo, - destInfos: configurationDestInfos, - destCount: configurationDestCount, - ); - const String connectionChannelId = "hello"; - const int connectionLocalUid = 10; - const RtcConnection connection = RtcConnection( - channelId: connectionChannelId, - localUid: connectionLocalUid, - ); - await rtcEngineEx.updateChannelMediaRelayEx( - configuration: configuration, - connection: connection, - ); - } catch (e) { - if (e is! AgoraRtcException) { - debugPrint('[updateChannelMediaRelayEx] error: ${e.toString()}'); - rethrow; - } - - if (e.code != -4) { - // Only not supported error supported. - rethrow; - } - } - - await rtcEngineEx.release(); - }, -// skip: !(), - ); - testWidgets( 'startOrUpdateChannelMediaRelayEx', (WidgetTester tester) async { @@ -322,7 +201,7 @@ void testCases() { uid: srcInfoUid, ); const List configurationDestInfos = [ - configurationSrcInfo + ChannelMediaInfo(channelName: 'hello', token: 'hello', uid: 100), ]; const int configurationDestCount = 1; const ChannelMediaRelayConfiguration configuration = @@ -343,8 +222,7 @@ void testCases() { ); } catch (e) { if (e is! AgoraRtcException) { - debugPrint( - '[startOrUpdateChannelMediaRelayEx] error: ${e.toString()}'); + debugPrint('[startChannelMediaRelayEx] error: ${e.toString()}'); rethrow; } @@ -356,7 +234,6 @@ void testCases() { await rtcEngineEx.release(); }, -// skip: !(), ); testWidgets( diff --git a/test_shard/fake_test_app/macos/Podfile b/test_shard/fake_test_app/macos/Podfile index dade8dfad..049abe295 100644 --- a/test_shard/fake_test_app/macos/Podfile +++ b/test_shard/fake_test_app/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.11' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/test_shard/fake_test_app/macos/Runner.xcodeproj/project.pbxproj b/test_shard/fake_test_app/macos/Runner.xcodeproj/project.pbxproj index dd68cf470..8ff1ff66c 100644 --- a/test_shard/fake_test_app/macos/Runner.xcodeproj/project.pbxproj +++ b/test_shard/fake_test_app/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -203,7 +203,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { @@ -256,6 +256,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -404,7 +405,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -483,7 +484,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -530,7 +531,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/test_shard/fake_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/test_shard/fake_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index ffe4d70aa..dc7f95fdf 100644 --- a/test_shard/fake_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/test_shard/fake_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ e.funcName == 'RtcEngine_setupLocalVideo') + .where((e) => e.funcName == 'RtcEngine_setupLocalVideo_acc9c38') .toList(); final jsonMap2 = jsonDecode(setupLocalVideoCalls[0].params); @@ -245,7 +245,7 @@ void testCases() { // Check `VideoViewControllerBaseMixin`'s `disposeRender` called final disposeLocalVideoCalls = irisMethodChannel.methodCallQueue - .where((e) => e.funcName == 'RtcEngine_setupLocalVideo') + .where((e) => e.funcName == 'RtcEngine_setupLocalVideo_acc9c38') .toList(); final disposeLocalVideoCallsJsonMap = @@ -294,7 +294,8 @@ void testCases() { await videoViewCreatedCompleter.future; final setupLocalVideoCalls = irisMethodChannel.methodCallQueue - .where((e) => e.funcName == 'RtcEngine_setupLocalVideo') + .where( + (e) => e.funcName == 'RtcEngine_setupLocalVideo_acc9c38') .toList(); final jsonMap2 = jsonDecode(setupLocalVideoCalls[0].params); @@ -310,7 +311,8 @@ void testCases() { // Check `VideoViewControllerBaseMixin`'s `disposeRender` called final disposeLocalVideoCalls = irisMethodChannel.methodCallQueue - .where((e) => e.funcName == 'RtcEngine_setupLocalVideo') + .where( + (e) => e.funcName == 'RtcEngine_setupLocalVideo_acc9c38') .toList(); final disposeLocalVideoCallsJsonMap = @@ -356,7 +358,8 @@ void testCases() { // Check `setupLocalVideo` calls { final setupLocalVideoCalls = irisMethodChannel.methodCallQueue - .where((e) => e.funcName == 'RtcEngine_setupLocalVideo') + .where( + (e) => e.funcName == 'RtcEngine_setupLocalVideo_acc9c38') .toList(); final jsonMap2 = jsonDecode(setupLocalVideoCalls[0].params); @@ -416,7 +419,8 @@ void testCases() { // Check `setupRemoteVideoEx` calls { final setupRemoteVideoExCalls = irisMethodChannel.methodCallQueue - .where((e) => e.funcName == 'RtcEngineEx_setupRemoteVideoEx') + .where((e) => + e.funcName == 'RtcEngineEx_setupRemoteVideoEx_522a409') .toList(); final jsonMap1 = jsonDecode(setupRemoteVideoExCalls[0].params); @@ -471,7 +475,8 @@ void testCases() { // Check `setupLocalVideo` calls { final setupLocalVideoCalls = irisMethodChannel.methodCallQueue - .where((e) => e.funcName == 'RtcEngine_setupLocalVideo') + .where( + (e) => e.funcName == 'RtcEngine_setupLocalVideo_acc9c38') .toList(); final jsonMap1 = jsonDecode(setupLocalVideoCalls[0].params); @@ -484,7 +489,8 @@ void testCases() { // Check `setupRemoteVideoEx` calls { final setupRemoteVideoExCalls = irisMethodChannel.methodCallQueue - .where((e) => e.funcName == 'RtcEngineEx_setupRemoteVideoEx') + .where((e) => + e.funcName == 'RtcEngineEx_setupRemoteVideoEx_522a409') .toList(); final jsonMap1 = jsonDecode(setupRemoteVideoExCalls[0].params); @@ -912,7 +918,7 @@ void testCases() { isFakeRemoveHotRestartListener: false, isFakeDispose: false, delayInvokeMethod: { - 'RtcEngine_setupLocalVideo': 5000 + 'RtcEngine_setupLocalVideo_acc9c38': 5000 }, // delay the `RtcEngine_setupLocalVideo` to 5s, make it complete after `Widget.dispose` more easier ); diff --git a/test_shard/integration_test_app/integration_test/testcases/mediaplayer_smoke_test_testcases.dart b/test_shard/integration_test_app/integration_test/testcases/mediaplayer_smoke_test_testcases.dart index 0e733260b..22e6bf5bc 100644 --- a/test_shard/integration_test_app/integration_test/testcases/mediaplayer_smoke_test_testcases.dart +++ b/test_shard/integration_test_app/integration_test/testcases/mediaplayer_smoke_test_testcases.dart @@ -28,7 +28,7 @@ void testCases() { final MediaPlayerSourceObserver mediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { if (state == MediaPlayerState.playerStateOpenCompleted) { await mediaPlayerController.play(); } @@ -92,7 +92,7 @@ void testCases() { final MediaPlayerSourceObserver mediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { if (state == MediaPlayerState.playerStateOpenCompleted) { await mediaPlayerController.play(); } @@ -158,7 +158,7 @@ void testCases() { final MediaPlayerSourceObserver mediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { if (state == MediaPlayerState.playerStateOpenCompleted) { await mediaPlayerController.play(); } diff --git a/test_shard/integration_test_app/integration_test/testcases/mediarecorder_fake_test_testcases.dart b/test_shard/integration_test_app/integration_test/testcases/mediarecorder_fake_test_testcases.dart index 209b3e27b..166bd7bad 100644 --- a/test_shard/integration_test_app/integration_test/testcases/mediarecorder_fake_test_testcases.dart +++ b/test_shard/integration_test_app/integration_test/testcases/mediarecorder_fake_test_testcases.dart @@ -5,6 +5,9 @@ import 'package:agora_rtc_engine/src/impl/platform/io/native_iris_api_engine_bin import '../fake/fake_iris_method_channel.dart'; import 'package:agora_rtc_engine/src/impl/agora_rtc_engine_impl.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:path/path.dart' as path; +import 'dart:io'; class MediaRecorderFakeIrisMethodChannel extends FakeIrisMethodChannel { MediaRecorderFakeIrisMethodChannel(PlatformBindingsProvider provider) @@ -13,7 +16,7 @@ class MediaRecorderFakeIrisMethodChannel extends FakeIrisMethodChannel { @override Future invokeMethod(IrisMethodCall methodCall) async { final result = super.invokeMethod(methodCall); - if (methodCall.funcName == 'RtcEngine_createMediaRecorder') { + if (methodCall.funcName == 'RtcEngine_createMediaRecorder_f779617') { return CallApiResult(data: {'result': '1000'}, irisReturnCode: 0); } @@ -64,9 +67,13 @@ void testCases() { String engineAppId = const String.fromEnvironment('TEST_APP_ID', defaultValue: ''); + Directory appDocDir = await getApplicationDocumentsDirectory(); + String logPath = path.join(appDocDir.path, 'test_log.txt'); + await rtcEngine.initialize(RtcEngineContext( appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), + logConfig: LogConfig(filePath: logPath), )); MediaRecorder? recorder = await rtcEngine.createMediaRecorder( @@ -79,13 +86,17 @@ void testCases() { await recorder?.stopRecording(); await rtcEngine.destroyMediaRecorder(recorder!); - expect(_isCallOnce(irisMethodChannel, 'RtcEngine_createMediaRecorder'), - isTrue); expect( _isCallOnce( - irisMethodChannel, 'MediaRecorder_setMediaRecorderObserver'), + irisMethodChannel, 'RtcEngine_createMediaRecorder_f779617'), + isTrue); + expect( + _isCallOnce(irisMethodChannel, + 'MediaRecorder_setMediaRecorderObserver_e1f7340'), isTrue); - expect(_isCallOnce(irisMethodChannel, 'MediaRecorder_startRecording'), + expect( + _isCallOnce( + irisMethodChannel, 'MediaRecorder_startRecording_94480b3'), isTrue); expect(_isCallOnce(irisMethodChannel, 'MediaRecorder_stopRecording'), isTrue); @@ -94,7 +105,9 @@ void testCases() { _isCallOnce( irisMethodChannel, 'MediaRecorder_unsetMediaRecorderObserver'), isTrue); - expect(_isCallOnce(irisMethodChannel, 'RtcEngine_destroyMediaRecorder'), + expect( + _isCallOnce( + irisMethodChannel, 'RtcEngine_destroyMediaRecorder_95cdef5'), isTrue); irisMethodChannel.reset(); @@ -109,13 +122,17 @@ void testCases() { await recorder?.stopRecording(); await rtcEngine.destroyMediaRecorder(recorder!); - expect(_isCallOnce(irisMethodChannel, 'RtcEngine_createMediaRecorder'), - isTrue); expect( _isCallOnce( - irisMethodChannel, 'MediaRecorder_setMediaRecorderObserver'), + irisMethodChannel, 'RtcEngine_createMediaRecorder_f779617'), isTrue); - expect(_isCallOnce(irisMethodChannel, 'MediaRecorder_startRecording'), + expect( + _isCallOnce(irisMethodChannel, + 'MediaRecorder_setMediaRecorderObserver_e1f7340'), + isTrue); + expect( + _isCallOnce( + irisMethodChannel, 'MediaRecorder_startRecording_94480b3'), isTrue); expect(_isCallOnce(irisMethodChannel, 'MediaRecorder_stopRecording'), isTrue); @@ -124,7 +141,9 @@ void testCases() { _isCallOnce( irisMethodChannel, 'MediaRecorder_unsetMediaRecorderObserver'), isTrue); - expect(_isCallOnce(irisMethodChannel, 'RtcEngine_destroyMediaRecorder'), + expect( + _isCallOnce( + irisMethodChannel, 'RtcEngine_destroyMediaRecorder_95cdef5'), isTrue); }, ); diff --git a/test_shard/integration_test_app/lib/fake_remote_user.dart b/test_shard/integration_test_app/lib/fake_remote_user.dart index e7ae8da68..ceb835461 100644 --- a/test_shard/integration_test_app/lib/fake_remote_user.dart +++ b/test_shard/integration_test_app/lib/fake_remote_user.dart @@ -33,7 +33,7 @@ class FakeRemoteUser { final MediaPlayerSourceObserver mediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { if (state == MediaPlayerState.playerStateOpenCompleted) { await mediaPlayerController.play(); await mediaPlayerController.setLoopCount(99999); diff --git a/test_shard/integration_test_app/macos/Podfile b/test_shard/integration_test_app/macos/Podfile index d8335e223..74dce6614 100644 --- a/test_shard/integration_test_app/macos/Podfile +++ b/test_shard/integration_test_app/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.11' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -41,15 +41,6 @@ target 'Runner' do use_modular_headers! flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) - if plugin_dev != nil - pod 'AgoraRtcWrapper', :path => File.join(File.join('Flutter', 'ephemeral', '.symlinks'), 'plugins', 'agora_rtc_engine', 'macos') - # pod 'iris_event_handler', :path => File.join(File.join('Flutter', 'ephemeral', '.symlinks'), 'plugins', 'iris_event', 'macos') - - end - - # pod 'iris_tester_handler', :path => File.join(File.join('Flutter', 'ephemeral', '.symlinks'), 'plugins', 'iris_tester', 'macos') - - # pod 'AgoraRtcWrapper', :path => File.join(File.join('Flutter', 'ephemeral', '.symlinks'), 'plugins', 'agora_rtc_engine', 'macos') end post_install do |installer| diff --git a/test_shard/integration_test_app/macos/Runner.xcodeproj/project.pbxproj b/test_shard/integration_test_app/macos/Runner.xcodeproj/project.pbxproj index 721381ff7..ac8274928 100644 --- a/test_shard/integration_test_app/macos/Runner.xcodeproj/project.pbxproj +++ b/test_shard/integration_test_app/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -202,7 +202,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { @@ -272,6 +272,7 @@ }; 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -403,7 +404,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -482,7 +483,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -529,7 +530,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/test_shard/integration_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/test_shard/integration_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 1f2b08562..63691181c 100644 --- a/test_shard/integration_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/test_shard/integration_test_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Function()>(); + void DestroyFakeRtcEngine(ffi.Pointer handle) { + return _DestroyFakeRtcEngine(handle); + } + + late final _DestroyFakeRtcEnginePtr = + _lookup)>>( + 'DestroyFakeRtcEngine'); + late final _DestroyFakeRtcEngine = _DestroyFakeRtcEnginePtr.asFunction< + void Function(ffi.Pointer)>(); + +// IRIS_API void IRIS_CALL DestroyFakeRtcEngine(void *handle); + void MockApiResult( ffi.Pointer apiType, ffi.Pointer param, diff --git a/test_shard/iris_tester/lib/src/platform/io/iris_tester_io.dart b/test_shard/iris_tester/lib/src/platform/io/iris_tester_io.dart index 88e3abfb0..d89f41bc3 100644 --- a/test_shard/iris_tester/lib/src/platform/io/iris_tester_io.dart +++ b/test_shard/iris_tester/lib/src/platform/io/iris_tester_io.dart @@ -48,7 +48,9 @@ class IrisTesterIO implements IrisTester { @override void dispose() { - calloc.free(_fakeRtcEngineHandle); + // calloc.free(_fakeRtcEngineHandle); + + _nativeIrisTesterBinding.DestroyFakeRtcEngine(_fakeRtcEngineHandle); } @override diff --git a/test_shard/rendering_test/integration_test/agora_video_view_render_test.dart b/test_shard/rendering_test/integration_test/agora_video_view_render_test.dart index d5fc7b12b..4f40fbc93 100644 --- a/test_shard/rendering_test/integration_test/agora_video_view_render_test.dart +++ b/test_shard/rendering_test/integration_test/agora_video_view_render_test.dart @@ -289,7 +289,6 @@ void main() { }, onFirstFrame: () async { if (!onFrameCompleter.isCompleted) { - await rtcEngine.startPreview(); onFrameCompleter.complete(null); } })); @@ -335,7 +334,6 @@ void main() { }, onFirstFrame: () async { if (!onFrameCompleter.isCompleted) { - await rtcEngine.startPreview(); onFrameCompleter.complete(null); } })); @@ -381,7 +379,6 @@ void main() { }, onFirstFrame: () async { if (!onFrameCompleter.isCompleted) { - await rtcEngine.startPreview(); onFrameCompleter.complete(null); } })); @@ -427,7 +424,6 @@ void main() { }, onFirstFrame: () async { if (!onFrameCompleter.isCompleted) { - await rtcEngine.startPreview(); onFrameCompleter.complete(null); } })); @@ -474,7 +470,6 @@ void main() { }, onFirstFrame: () async { if (!onFrameCompleter.isCompleted) { - await rtcEngine.startPreview(); onFrameCompleter.complete(null); } })); diff --git a/test_shard/rendering_test/integration_test/agora_video_view_smoke_test.dart b/test_shard/rendering_test/integration_test/agora_video_view_smoke_test.dart index 5239d2368..0dd29af4c 100644 --- a/test_shard/rendering_test/integration_test/agora_video_view_smoke_test.dart +++ b/test_shard/rendering_test/integration_test/agora_video_view_smoke_test.dart @@ -322,7 +322,6 @@ void main() { }, onFirstFrame: () async { if (!onFrameCompleter.isCompleted) { - await rtcEngine.startPreview(); onFrameCompleter.complete(null); } })); diff --git a/test_shard/rendering_test/integration_test/common/fake_camera_local_video_view.dart b/test_shard/rendering_test/integration_test/common/fake_camera_local_video_view.dart index 39aa67444..e2a6686fe 100644 --- a/test_shard/rendering_test/integration_test/common/fake_camera_local_video_view.dart +++ b/test_shard/rendering_test/integration_test/common/fake_camera_local_video_view.dart @@ -1,5 +1,6 @@ import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'package:flutter/material.dart'; +import 'dart:io'; import 'fake_camera.dart'; diff --git a/test_shard/rendering_test/integration_test/local_video_view.dart b/test_shard/rendering_test/integration_test/local_video_view.dart index 908f7fed3..b0c5c3e89 100644 --- a/test_shard/rendering_test/integration_test/local_video_view.dart +++ b/test_shard/rendering_test/integration_test/local_video_view.dart @@ -95,7 +95,7 @@ class _LocalVideoViewState extends State { mediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { if (state == MediaPlayerState.playerStateOpenCompleted) { await mediaPlayerController.play(); await mediaPlayerController.setLoopCount(99999); diff --git a/test_shard/rendering_test/integration_test/remote_video_view.dart b/test_shard/rendering_test/integration_test/remote_video_view.dart index 89a5b71c3..0b70b99dc 100644 --- a/test_shard/rendering_test/integration_test/remote_video_view.dart +++ b/test_shard/rendering_test/integration_test/remote_video_view.dart @@ -112,7 +112,7 @@ class _RemoteVideoViewState extends State { mediaPlayerSourceObserver = MediaPlayerSourceObserver( onPlayerSourceStateChanged: - (MediaPlayerState state, MediaPlayerError ec) async { + (MediaPlayerState state, MediaPlayerReason ec) async { if (state == MediaPlayerState.playerStateOpenCompleted) { await mediaPlayerController.play(); await mediaPlayerController.setLoopCount(99999); diff --git a/test_shard/rendering_test/pubspec.yaml b/test_shard/rendering_test/pubspec.yaml index 0d634c381..266c142a7 100644 --- a/test_shard/rendering_test/pubspec.yaml +++ b/test_shard/rendering_test/pubspec.yaml @@ -36,6 +36,7 @@ dependencies: image: ^3.1.3 image_compare: ^1.1.2 + path_provider: ^2.0.8 # The following adds the Cupertino Icons font to your application. diff --git a/tool/terra/.gitignore b/tool/terra/.gitignore index 9947d4ae3..131a5b276 100644 --- a/tool/terra/.gitignore +++ b/tool/terra/.gitignore @@ -1,4 +1,5 @@ node_modules/ package-lock.json .terra -.yarn \ No newline at end of file +.yarn +.yarnrc.yml \ No newline at end of file diff --git a/tool/terra/.yarnrc.yml b/tool/terra/.yarnrc.yml deleted file mode 100644 index 3186f3f07..000000000 --- a/tool/terra/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/tool/terra/build.sh b/tool/terra/build.sh index 8acb61af0..fa6ca8a98 100644 --- a/tool/terra/build.sh +++ b/tool/terra/build.sh @@ -5,10 +5,23 @@ set -x MY_PATH=$(realpath $(dirname "$0")) PROJECT_ROOT=$(realpath ${MY_PATH}/../..) +bash ${MY_PATH}/prepare.sh + pushd ${MY_PATH} npm exec terra -- run \ - --config ${PROJECT_ROOT}/tool/terra/terra_config_main.yaml \ + --config ${PROJECT_ROOT}/tool/terra/legacy_terra_config.yaml \ --output-dir=${PROJECT_ROOT}/lib/src +# Incremental migrate to the new terra, this will override the existing files +npm exec terra -- run \ + --config ${PROJECT_ROOT}/tool/terra/terra_config_main.yaml \ + --output-dir=${PROJECT_ROOT}/ + +popd + +pushd ${PROJECT_ROOT} + +dart format . + popd \ No newline at end of file diff --git a/tool/terra/configs/cud_node_parser.config.ts b/tool/terra/configs/cud_node_parser.config.ts new file mode 100644 index 000000000..9400f948b --- /dev/null +++ b/tool/terra/configs/cud_node_parser.config.ts @@ -0,0 +1,441 @@ +import { CXXTYPE, SimpleTypeKind } from "@agoraio-extensions/cxx-parser"; + +const deleteNodes = [ + // agora::rtc::IMetadataObserver + { + // onReadyToSendMetadata + __TYPE: CXXTYPE.MemberFunction, + name: "onReadyToSendMetadata", + namespaces: ["agora", "rtc"], + parent_name: "IMetadataObserver", + }, + { + // getMaxMetadataSize + __TYPE: CXXTYPE.MemberFunction, + name: "getMaxMetadataSize", + namespaces: ["agora", "rtc"], + parent_name: "IMetadataObserver", + }, + // agora::rtc::IRtcEngineEventHandler + { + // eventHandlerType + __TYPE: CXXTYPE.MemberFunction, + name: "eventHandlerType", + namespaces: ["agora", "rtc"], + parent_name: "IRtcEngineEventHandler", + }, + // agora::rtc::IRtcEngineEventHandlerEx + { + // eventHandlerType + __TYPE: CXXTYPE.MemberFunction, + name: "eventHandlerType", + namespaces: ["agora", "rtc"], + parent_name: "IRtcEngineEventHandlerEx", + }, + { + // onFirstLocalVideoFrame + __TYPE: CXXTYPE.MemberFunction, + name: "onFirstLocalVideoFrame", + namespaces: ["agora", "rtc"], + parent_name: "IRtcEngineEventHandlerEx", + }, + { + // onFirstLocalVideoFramePublished + __TYPE: CXXTYPE.MemberFunction, + name: "onFirstLocalVideoFramePublished", + namespaces: ["agora", "rtc"], + parent_name: "IRtcEngineEventHandlerEx", + }, + { + // onLocalVideoStateChanged + __TYPE: CXXTYPE.MemberFunction, + name: "onLocalVideoStateChanged", + namespaces: ["agora", "rtc"], + parent_name: "IRtcEngineEventHandlerEx", + }, + { + // onLocalVideoStats + __TYPE: CXXTYPE.MemberFunction, + name: "onLocalVideoStats", + namespaces: ["agora", "rtc"], + parent_name: "IRtcEngineEventHandlerEx", + }, +]; + +const updateNodes = [ + // agora::rtc::IRtcEngineEventHandler + + // onError + { + node: { + __TYPE: CXXTYPE.Variable, + name: "err", + namespaces: ["agora", "rtc"], + parent_name: "onError", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "err", + namespaces: ["agora", "rtc"], + parent_name: "onError", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::ERROR_CODE_TYPE", + source: "agora::ERROR_CODE_TYPE", + }, + }, + }, + // onAudioVolumeIndication + { + node: { + __TYPE: CXXTYPE.Variable, + name: "speakers", + namespaces: ["agora", "rtc"], + parent_name: "onAudioVolumeIndication", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "speakers", + namespaces: ["agora", "rtc"], + parent_name: "onAudioVolumeIndication", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: true, + kind: SimpleTypeKind.array_t, + name: "agora::rtc::AudioVolumeInfo", + source: "const agora::rtc::AudioVolumeInfo*", + }, + }, + }, + // onAudioDeviceStateChanged + { + node: { + __TYPE: CXXTYPE.Variable, + name: "deviceType", + namespaces: ["agora", "rtc"], + parent_name: "onAudioDeviceStateChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "deviceType", + namespaces: ["agora", "rtc"], + parent_name: "onAudioDeviceStateChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::MEDIA_DEVICE_TYPE", + source: "agora::rtc::MEDIA_DEVICE_TYPE", + }, + }, + }, + { + node: { + __TYPE: CXXTYPE.Variable, + name: "deviceState", + namespaces: ["agora", "rtc"], + parent_name: "onAudioDeviceStateChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "deviceState", + namespaces: ["agora", "rtc"], + parent_name: "onAudioDeviceStateChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::MEDIA_DEVICE_STATE_TYPE", + source: "agora::rtc::MEDIA_DEVICE_STATE_TYPE", + }, + }, + }, + + // onVideoDeviceStateChanged + { + node: { + __TYPE: CXXTYPE.Variable, + name: "deviceType", + namespaces: ["agora", "rtc"], + parent_name: "onVideoDeviceStateChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "deviceType", + namespaces: ["agora", "rtc"], + parent_name: "onVideoDeviceStateChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::MEDIA_DEVICE_TYPE", + source: "agora::rtc::MEDIA_DEVICE_TYPE", + }, + }, + }, + { + node: { + __TYPE: CXXTYPE.Variable, + name: "deviceState", + namespaces: ["agora", "rtc"], + parent_name: "onVideoDeviceStateChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "deviceState", + namespaces: ["agora", "rtc"], + parent_name: "onVideoDeviceStateChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::MEDIA_DEVICE_STATE_TYPE", + source: "agora::rtc::MEDIA_DEVICE_STATE_TYPE", + }, + }, + }, + // onFacePositionChanged + { + node: { + __TYPE: CXXTYPE.Variable, + name: "vecRectangle", + namespaces: ["agora", "rtc"], + parent_name: "onFacePositionChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "vecRectangle", + namespaces: ["agora", "rtc"], + parent_name: "onFacePositionChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: true, + kind: SimpleTypeKind.array_t, + name: "agora::rtc::Rectangle", + source: "const agora::rtc::Rectangle*", + }, + }, + }, + { + node: { + __TYPE: CXXTYPE.Variable, + name: "vecDistance", + namespaces: ["agora", "rtc"], + parent_name: "onFacePositionChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "vecDistance", + namespaces: ["agora", "rtc"], + parent_name: "onFacePositionChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: true, + kind: SimpleTypeKind.array_t, + name: "int", + source: "const int*", + }, + }, + }, + // onChannelMediaRelayStateChanged + { + node: { + __TYPE: CXXTYPE.Variable, + name: "state", + namespaces: ["agora", "rtc"], + parent_name: "onChannelMediaRelayStateChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "state", + namespaces: ["agora", "rtc"], + parent_name: "onChannelMediaRelayStateChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::CHANNEL_MEDIA_RELAY_STATE", + source: "agora::rtc::CHANNEL_MEDIA_RELAY_STATE", + }, + }, + }, + { + node: { + __TYPE: CXXTYPE.Variable, + name: "code", + namespaces: ["agora", "rtc"], + parent_name: "onChannelMediaRelayStateChanged", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "code", + namespaces: ["agora", "rtc"], + parent_name: "onChannelMediaRelayStateChanged", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::CHANNEL_MEDIA_RELAY_ERROR", + source: "agora::rtc::CHANNEL_MEDIA_RELAY_ERROR", + }, + }, + }, + + // + // agora::rtc::IRtcEngineEventHandlerEx + // + // onAudioQuality + { + node: { + __TYPE: CXXTYPE.Variable, + name: "quality", + namespaces: ["agora", "rtc"], + parent_name: "onAudioQuality", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "quality", + namespaces: ["agora", "rtc"], + parent_name: "onAudioQuality", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::QUALITY_TYPE", + source: "agora::rtc::QUALITY_TYPE", + }, + }, + }, + // onNetworkQuality + { + node: { + __TYPE: CXXTYPE.Variable, + name: "txQuality", + namespaces: ["agora", "rtc"], + parent_name: "onNetworkQuality", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "txQuality", + namespaces: ["agora", "rtc"], + parent_name: "onNetworkQuality", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::QUALITY_TYPE", + source: "agora::rtc::QUALITY_TYPE", + }, + }, + }, + { + node: { + __TYPE: CXXTYPE.Variable, + name: "rxQuality", + namespaces: ["agora", "rtc"], + parent_name: "onNetworkQuality", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "rxQuality", + namespaces: ["agora", "rtc"], + parent_name: "onNetworkQuality", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::QUALITY_TYPE", + source: "agora::rtc::QUALITY_TYPE", + }, + }, + }, + // onLastmileQuality + { + node: { + __TYPE: CXXTYPE.Variable, + name: "quality", + namespaces: ["agora", "rtc"], + parent_name: "onLastmileQuality", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "quality", + namespaces: ["agora", "rtc"], + parent_name: "onLastmileQuality", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::rtc::QUALITY_TYPE", + source: "agora::rtc::QUALITY_TYPE", + }, + }, + }, + // onStreamMessage + { + node: { + __TYPE: CXXTYPE.Variable, + name: "data", + namespaces: ["agora", "rtc"], + parent_name: "onStreamMessage", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "data", + namespaces: ["agora", "rtc"], + parent_name: "onStreamMessage", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: true, + kind: SimpleTypeKind.pointer_t, + name: "uint8_t", + source: "const uint8_t*", + }, + }, + }, + // onStreamMessageError + { + node: { + __TYPE: CXXTYPE.Variable, + name: "code", + namespaces: ["agora", "rtc"], + parent_name: "onStreamMessageError", + }, + updated: { + __TYPE: CXXTYPE.Variable, + name: "code", + namespaces: ["agora", "rtc"], + parent_name: "onStreamMessageError", + type: { + __TYPE: CXXTYPE.SimpleType, + is_builtin_type: false, + is_const: false, + kind: SimpleTypeKind.value_t, + name: "agora::ERROR_CODE_TYPE", + source: "agora::ERROR_CODE_TYPE", + }, + }, + }, +]; + +module.exports = { + deleteNodes: deleteNodes, + updateNodes: updateNodes, +}; diff --git a/tool/terra/configs/merge_node_list.ts b/tool/terra/configs/merge_node_list.ts new file mode 100644 index 000000000..8cea17bff --- /dev/null +++ b/tool/terra/configs/merge_node_list.ts @@ -0,0 +1,13 @@ +module.exports = [ + { + source: "agora::rtc::IRtcEngineEventHandlerEx", + target: "agora::rtc::IRtcEngineEventHandler", + deleteSource: true, + }, + { + source: "agora::media::IAudioFrameObserverBase", + target: "agora::media::IAudioFrameObserver", + deleteSource: false, + isFilterOverloadFunctions: false, + }, +]; diff --git a/tool/terra/legacy_terra_config.yaml b/tool/terra/legacy_terra_config.yaml new file mode 100644 index 000000000..4fd568557 --- /dev/null +++ b/tool/terra/legacy_terra_config.yaml @@ -0,0 +1,37 @@ +parsers: + - name: LegacyCXXParser + package: '@agoraio-extensions/terra-legacy-cxx-parser' + args: + includeHeaderDirs: + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include' + parseFiles: + include: + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/*.h' + exclude: + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/time_utils.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/AgoraOptional.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/IAgoraMediaComponentFactory.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/IAgoraParameter.h' + customHeaders: + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/custom_headers/*.h' + language: dart + nativeSdkVersion: 4.3.0 + legacyRenders: + - DartSyntaxRender + - DartEventHandlerParamJsonRender + - DartCallApiIrisMethodChannelRender + - DartEventHandlerIrisMethodChannelRender + - DartStructToJsonSerializableRender + - DartCallApiEventHandlerBufferExtRender + - DartForwardExportRender + +renderers: + - name: IrisDocRenderer + package: '@agoraio-extensions/terra_shared_configs' + args: + language: dart + fmtConfig: fmt_dart.yaml + exportFilePath: ../../lib/agora_rtc_engine.dart + templateUrl: https://github.com/AgoraIO/agora_doc_source/releases/download/master-build/flutter_ng_json_template_en.json \ No newline at end of file diff --git a/tool/terra/package.json b/tool/terra/package.json index 998f0f31e..f02bb7786 100644 --- a/tool/terra/package.json +++ b/tool/terra/package.json @@ -9,15 +9,18 @@ "author": "", "license": "MIT", "devDependencies": { + "@types/lodash": "^4", "@types/node": "^20.6.0" }, "dependencies": { + "@agoraio-extensions/cxx-parser": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser", "@agoraio-extensions/terra": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra", "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core", "@agoraio-extensions/terra-legacy-cxx-parser": "git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#head=main", "@agoraio-extensions/terra_shared_configs": "git@github.com:AgoraIO-Extensions/terra_shared_configs.git#head=main", + "lodash": "^4.17.21", "ts-node": "^10.9.1", "typescript": "^5.1.6" }, - "packageManager": "yarn@4.0.1" + "packageManager": "yarn@4.1.0" } diff --git a/tool/terra/parsers/cud_node_parser.ts b/tool/terra/parsers/cud_node_parser.ts new file mode 100644 index 000000000..d0ea2d4dd --- /dev/null +++ b/tool/terra/parsers/cud_node_parser.ts @@ -0,0 +1,199 @@ +import { + CXXFile, + CXXTYPE, + CXXTerraNode, + Clazz, + Constructor, + EnumConstant, + Enumz, + MemberFunction, + MemberVariable, + Variable, +} from "@agoraio-extensions/cxx-parser"; +import { + ParseResult, + TerraContext, + resolvePath, +} from "@agoraio-extensions/terra-core"; +import { irisApiId } from "@agoraio-extensions/terra_shared_configs"; +import _ from "lodash"; + +const funcNeedCheckWithBaseClasses = [ + "agora::media::IAudioFrameObserver", + "agora::rtc::IRtcEngineEventHandlerEx", +]; +function isNeedCheckWithBaseClasses(clazz: Clazz): boolean { + return funcNeedCheckWithBaseClasses.includes(clazz.fullName); +} + +export interface CUDNodeOp { + node: CXXTerraNode; +} + +export interface CUDNodeDeleteConfig extends CUDNodeOp {} + +function deleteOp(sourceNode: CXXTerraNode, opConfig: CUDNodeOp): boolean { + return _.isMatch(sourceNode, opConfig.node); +} + +export interface CUDNodeUpdateConfig extends CUDNodeOp { + updated: CXXTerraNode; +} +function updateOp(sourceNode: CXXTerraNode, opConfig: CUDNodeOp): boolean { + // https://lodash.com/docs/4.17.15#mergeWith + function _customizer(objValue: any, srcValue: any) { + if (_.isArray(objValue)) { + for (let i = 0; i < srcValue.length; i++) { + let srcValueItem = srcValue[i]; + + for (let j = 0; j < objValue.length; j++) { + let objValueItem = objValue[j]; + if (_.isMatch(objValueItem, srcValueItem)) { + objValue[j] = _.merge(objValueItem, srcValueItem); + break; + } + } + } + + return objValue; + } + } + + let updateOpConfig = opConfig as CUDNodeUpdateConfig; + if (_.isMatch(sourceNode, updateOpConfig.node)) { + // _.merge(sourceNode, updateOpConfig.updated); + _.mergeWith(sourceNode, updateOpConfig.updated, _customizer); + } + + // We don't want to filter this node, but just update it. + return false; +} + +export interface CUDNodeConfig { + deleteNodes?: CXXTerraNode[]; + updateNodes?: CUDNodeUpdateConfig[]; +} + +export interface CUDNodeParserArgs { + configPath: string; +} + +export default function CUDNodeParser( + terraContext: TerraContext, + args: CUDNodeParserArgs, + preParseResult?: ParseResult +): ParseResult | undefined { + let parseResult = preParseResult!; + let configPath = resolvePath(args.configPath, terraContext.configDir); + let config = require(configPath) as CUDNodeConfig; + + if (config.deleteNodes && config.deleteNodes.length) { + let ops = config.deleteNodes.map((it) => { + return { + node: it, + } as CUDNodeDeleteConfig; + }); + deleteNodeInParseResult(parseResult, ops, deleteOp); + } + + if (config.updateNodes && config.updateNodes.length) { + deleteNodeInParseResult(parseResult, config.updateNodes, updateOp); + } + + return parseResult; +} + +function filterNodes( + sourceNodes: any[], + nodesToFilter: any[], + op: (sourceNode: CXXTerraNode, opConfig: CUDNodeOp) => boolean +): CXXTerraNode[] { + return sourceNodes.filter((it) => { + for (let n of nodesToFilter) { + if (op(it, n)) { + // if the op function return true, then filter the node + return false; + } + } + + return true; + }); +} + +function deleteNodeInParseResult( + originalParseResult: ParseResult, + deleteNodes: CUDNodeOp[], + op: (sourceNode: CXXTerraNode, opConfig: CUDNodeOp) => boolean +): ParseResult { + // Remove nodes + // 1. Remove CXXFile + // 2. Remove Clazz + + let parseResult = originalParseResult; + + parseResult.nodes = filterNodes( + parseResult.nodes, + deleteNodes.filter((node) => node.node.__TYPE == CXXTYPE.CXXFile), + op + ); + + parseResult.nodes.forEach((it) => { + // Handle the parent nodes + (it as CXXFile).nodes = filterNodes( + (it as CXXFile).nodes, + deleteNodes.filter((node) => node.node.__TYPE != CXXTYPE.CXXFile), + op + ); + + // Handle the children nodes + (it as CXXFile).nodes.forEach((it) => { + // filter Clazz + // filter Struct + if (it.__TYPE == CXXTYPE.Struct || it.__TYPE == CXXTYPE.Clazz) { + // The Struct is the sub class of Clazz + let node = it as Clazz; + + node.constructors = filterNodes( + node.constructors, + deleteNodes.filter((node) => node.node.__TYPE == CXXTYPE.Constructor), + op + ) as Constructor[]; + + node.methods = filterNodes( + node.methods, + deleteNodes.filter( + (node) => node.node.__TYPE == CXXTYPE.MemberFunction + ), + op + ) as MemberFunction[]; + node.methods.forEach((method) => { + method.parameters = filterNodes( + method.parameters, + deleteNodes.filter((node) => node.node.__TYPE == CXXTYPE.Variable), + op + ) as Variable[]; + }); + + node.member_variables = filterNodes( + node.member_variables, + deleteNodes.filter( + (node) => node.node.__TYPE == CXXTYPE.MemberVariable + ), + op + ) as MemberVariable[]; + } else if (it.__TYPE == CXXTYPE.Enumz) { + // filter Enumz + let node = it as Enumz; + node.enum_constants = filterNodes( + node.enum_constants, + deleteNodes.filter( + (node) => node.node.__TYPE == CXXTYPE.EnumConstant + ), + op + ) as EnumConstant[]; + } + }); + }); + + return parseResult; +} diff --git a/tool/terra/parsers/dart_syntax_parser.ts b/tool/terra/parsers/dart_syntax_parser.ts new file mode 100644 index 000000000..f7f5ffc23 --- /dev/null +++ b/tool/terra/parsers/dart_syntax_parser.ts @@ -0,0 +1,216 @@ +import { + CXXFile, + CXXTYPE, + CXXTerraNode, + Clazz, + SimpleType, + SimpleTypeKind, +} from "@agoraio-extensions/cxx-parser"; +import { ParseResult, TerraContext } from "@agoraio-extensions/terra-core"; +import { setUserdata } from "../renderers/utils"; + +import path from "path"; + +const userDataKey = "DartSyntaxParser"; + +export interface DartSyntaxParserValue { + dartFileName?: string; + dartName?: string; +} + +function _dartClassName(clazz: Clazz): string { + let name = clazz.name; + if (name.startsWith("I")) { + name = name.replace("I", ""); + } + + return name; +} + +function _dartMemberName(memberName: string): string { + return nameWithUnderscoresToCamelCase(memberName); +} + +function nameWithUnderscoresToCamelCase( + nameWithUnderscores: string, + upperCamelCase: boolean = false +): string { + if (!nameWithUnderscores.includes("_")) { + return nameWithUnderscores; + } + + const nameWithUnderscoresLower = nameWithUnderscores.toLowerCase(); + const words = nameWithUnderscoresLower.split("_"); + for (let i = 0; i < words.length; i++) { + let word = words[i]; + + if ((i === 0 && upperCamelCase) || i !== 0) { + word = word[0].toUpperCase() + word.slice(1); + } + + words[i] = word; + } + + return words.join(""); +} + +function _dartFileName(filePath: string): string { + let fileName = path.basename(filePath); + fileName = upperCamelCaseToLowercaseWithUnderscores(fileName); + if (fileName.startsWith("i")) { + fileName = fileName.replace("i", ""); + } + return fileName; +} + +function upperCamelCaseToLowercaseWithUnderscores( + upperCamelCaseName: string +): string { + const result: string[] = []; + + let toSearch = upperCamelCaseName; + + let baseRegex = new RegExp("((I[A-Z]|[A-Z])?[a-z0-9]*)"); + + // const baseRegex = /((I[A-Z]|[A-Z])?[a-z0-9]*)/g; + let baseMatch; + + while ((baseMatch = baseRegex.exec(toSearch)) !== null) { + let tmp = baseMatch[0]; + if (tmp.length === 0) { + break; + } + result.push(tmp.toLowerCase()); + toSearch = toSearch.replace(tmp, ""); + } + + return result.join("_"); +} + +const _cppTypedefToDartTypeMappping: Map = new Map([ + ["uid_t", "int"], + ["track_id_t", "int"], + ["video_track_id_t", "int"], + ["conn_id_t", "int"], + ["view_t", "int"], + ["AString", "String"], + ["user_id_t", "String"], +]); + +const _cppStdTypeToDartTypeMappping: Map = new Map([ + ["char", "String"], + ["char *", "String"], + ["const char *", "String"], + ["unsigned int", "int"], + ["size_t", "int"], + ["unsigned short", "int"], + ["float", "double"], + ["int64_t", "int"], + ["int32_t", "int"], + ["long", "int"], + ["int16_t", "int"], + ["unsigned char", "Uint8List"], + ["unsigned char *", "Uint8List"], + ["uint8_t", "int"], + ["uint32_t", "int"], + ["uint64_t", "int"], + ["uint16_t", "int"], + ["long long", "int"], + ["intptr_t", "int"], +]); + +function _dartTypeName(type: SimpleType): string { + let dartType = type.name.trimNamespace(); + if (type.kind == SimpleTypeKind.template_t) { + dartType = type.template_arguments[0]; + } + + if ( + (dartType == "unsigned char" || dartType == "uint8_t") && + (type.kind == SimpleTypeKind.pointer_t || + type.kind == SimpleTypeKind.array_t) + ) { + dartType = "Uint8List"; + } else { + if (_cppStdTypeToDartTypeMappping.has(dartType)) { + dartType = _cppStdTypeToDartTypeMappping.get(dartType)!; + } + if (_cppTypedefToDartTypeMappping.has(dartType)) { + dartType = _cppTypedefToDartTypeMappping.get(dartType)!; + } + if (dartType.includes("_")) { + dartType = nameWithUnderscoresToCamelCase(dartType, true); + } + + // String type + if ( + type.name == "char" && + (type.kind == SimpleTypeKind.array_t || + type.kind == SimpleTypeKind.pointer_t) + ) { + if (type.source.endsWith("**")) { + dartType = "List<" + dartType + ">"; + } + } else { + if (type.kind == SimpleTypeKind.array_t) { + dartType = "List<" + dartType + ">"; + } + } + } + + return dartType; +} + +export default function DartSyntaxParser( + terraContext: TerraContext, + args: any, + preParseResult?: ParseResult +): ParseResult | undefined { + let cxxFiles = preParseResult!.nodes as CXXFile[]; + + cxxFiles.forEach((cxxFile: CXXFile) => { + setUserdata(cxxFile, userDataKey, { + dartFileName: _dartFileName(cxxFile.fileName), + }); + + cxxFile.nodes.forEach((node) => { + if (node.__TYPE == CXXTYPE.Clazz || node.__TYPE == CXXTYPE.Struct) { + let clazz = node as Clazz; + + setUserdata(clazz, userDataKey, { + dartName: _dartClassName(clazz), + }); + + clazz.methods.forEach((method) => { + setUserdata(method, userDataKey, { + dartName: _dartMemberName(method.name), + }); + + setUserdata(method.return_type, userDataKey, { + dartName: _dartTypeName(method.return_type), + }); + + method.parameters.forEach((param) => { + setUserdata(param.type, userDataKey, { + dartName: _dartTypeName(param.type), + }); + + setUserdata(param, userDataKey, { + dartName: _dartMemberName(param.name), + }); + }); + }); + } + }); + }); + + return preParseResult; +} + +export function dartFileName(node: CXXTerraNode): string { + return node.user_data?.[userDataKey]?.dartFileName ?? ""; +} + +export function dartName(node: CXXTerraNode): string { + return node.user_data?.[userDataKey]?.dartName ?? ""; +} diff --git a/tool/terra/parsers/iris_api_id_parser.ts b/tool/terra/parsers/iris_api_id_parser.ts new file mode 100644 index 000000000..a354df87d --- /dev/null +++ b/tool/terra/parsers/iris_api_id_parser.ts @@ -0,0 +1,53 @@ +import { + CXXFile, + CXXTYPE, + CXXTerraNode, + Clazz, +} from "@agoraio-extensions/cxx-parser"; +import { ParseResult, TerraContext } from "@agoraio-extensions/terra-core"; +import { irisApiId } from "@agoraio-extensions/terra_shared_configs"; + +const funcNeedCheckWithBaseClasses = [ + "agora::media::IAudioFrameObserver", + "agora::rtc::IRtcEngineEventHandlerEx", +]; +function isNeedCheckWithBaseClasses(clazz: Clazz): boolean { + return funcNeedCheckWithBaseClasses.includes(clazz.fullName); +} + +export default function IrisApiIdParser( + terraContext: TerraContext, + args: any, + preParseResult?: ParseResult +): ParseResult | undefined { + let cxxFiles = preParseResult!.nodes as CXXFile[]; + cxxFiles.forEach((cxxFile: CXXFile) => { + cxxFile.nodes.forEach((node) => { + if (node.__TYPE == CXXTYPE.Clazz) { + let clazz = node as Clazz; + let needCheckWithBaseClasses = isNeedCheckWithBaseClasses(clazz); + clazz.methods.forEach((method) => { + method.user_data ??= {}; + method.user_data!["IrisApiIdParser"] = { + key: irisApiId(clazz, method, { + toUpperCase: true, + }), + value: irisApiId(clazz, method, { + toUpperCase: false, + }), + }; + }); + } + }); + }); + + return preParseResult; +} + +export function getIrisApiIdKey(node: CXXTerraNode): string { + return node.user_data?.["IrisApiIdParser"]?.key ?? ""; +} + +export function getIrisApiIdValue(node: CXXTerraNode): string { + return node.user_data?.["IrisApiIdParser"]?.value ?? ""; +} diff --git a/tool/terra/parsers/merge_rtc_engine_event_handler_parser.ts b/tool/terra/parsers/merge_rtc_engine_event_handler_parser.ts new file mode 100644 index 000000000..b1e9299a0 --- /dev/null +++ b/tool/terra/parsers/merge_rtc_engine_event_handler_parser.ts @@ -0,0 +1,71 @@ +import { + CXXFile, + CXXTYPE, + CXXTerraNode, + Clazz, + MemberFunction, +} from "@agoraio-extensions/cxx-parser"; +import { ParseResult, TerraContext } from "@agoraio-extensions/terra-core"; +import { irisApiId } from "@agoraio-extensions/terra_shared_configs"; + +const funcNeedCheckWithBaseClasses = [ + "agora::media::IAudioFrameObserver", + "agora::rtc::IRtcEngineEventHandlerEx", +]; +function isNeedCheckWithBaseClasses(clazz: Clazz): boolean { + return funcNeedCheckWithBaseClasses.includes(clazz.fullName); +} + +export default function MergeRtcEngineEventHandlerParser( + terraContext: TerraContext, + args: any, + preParseResult?: ParseResult +): ParseResult | undefined { + let rtcEngineEventHandlerClazz = preParseResult!.resolveNodeByName( + "agora::rtc::IRtcEngineEventHandler" + ); + let rtcEngineEventHandlerExClazz = preParseResult!.resolveNodeByName( + "agora::rtc::IRtcEngineEventHandlerEx" + ); + + if (rtcEngineEventHandlerClazz && rtcEngineEventHandlerClazz) { + let adjustMethods: MemberFunction[] = []; + rtcEngineEventHandlerClazz.asClazz().methods.forEach((method) => { + // Force filter the `eventHandlerType` method. + if (method.name != "eventHandlerType") { + let sameNameMethod = rtcEngineEventHandlerExClazz! + .asClazz() + .methods.find((it) => it.name == method.name); + if (sameNameMethod) { + // If there is a method with the same name in `IRtcEngineEventHandlerEx`, use it. + adjustMethods.push(sameNameMethod); + } else { + adjustMethods.push(method); + } + } + }); + + rtcEngineEventHandlerClazz.asClazz().methods = adjustMethods; + + // After merge the `IRtcEngineEventHandler` and `IRtcEngineEventHandlerEx`, + // remove the `IRtcEngineEventHandlerEx` from the parse result. + preParseResult!.nodes.forEach((it) => { + let cxxFile = it as CXXFile; + cxxFile.nodes = cxxFile.nodes.filter( + (it) => + it.__TYPE == CXXTYPE.Clazz && + it.fullName != "agora::rtc::IRtcEngineEventHandlerEx" + ); + }); + } + + return preParseResult; +} + +export function getIrisApiIdKey(node: CXXTerraNode): string { + return node.user_data?.["IrisApiIdParser"]?.key ?? ""; +} + +export function getIrisApiIdValue(node: CXXTerraNode): string { + return node.user_data?.["IrisApiIdParser"]?.value ?? ""; +} diff --git a/tool/terra/prepare.sh b/tool/terra/prepare.sh new file mode 100644 index 000000000..cd9002348 --- /dev/null +++ b/tool/terra/prepare.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e +set -x + +MY_PATH=$(realpath $(dirname "$0")) + +pushd ${MY_PATH} + +rm -rf .yarnrc.yml +rm -rf yarn.lock + +echo "nodeLinker: node-modules" >> .yarnrc.yml +yarn set version berry +yarn + +popd \ No newline at end of file diff --git a/tool/terra/renderers/event_handlers_renderer.ts b/tool/terra/renderers/event_handlers_renderer.ts new file mode 100644 index 000000000..3eaa0ee82 --- /dev/null +++ b/tool/terra/renderers/event_handlers_renderer.ts @@ -0,0 +1,233 @@ +import { + CXXFile, + CXXTYPE, + CXXTerraNode, + Clazz, + SimpleTypeKind, +} from "@agoraio-extensions/cxx-parser"; +import { + ParseResult, + RenderResult, + TerraContext, +} from "@agoraio-extensions/terra-core"; +import { getIrisApiIdValue } from "../parsers/iris_api_id_parser"; +import { isCallbackClass } from "./utils"; +import { dartFileName, dartName } from "../parsers/dart_syntax_parser"; + +function processCXXFiles( + terraContext: TerraContext, + parseResult: ParseResult, + args: any +): CXXFile[] { + return (parseResult.nodes as CXXFile[]).filter((it) => { + return it.fileName == "IAgoraRtcEngine.h"; + }); +} + +function fileterNodes(cxxFile: CXXFile): CXXTerraNode[] { + return cxxFile.nodes + .filter((it) => it.__TYPE == CXXTYPE.Clazz) + .filter((it) => isCallbackClass(it.asClazz())); +} + +const dartHeader = ` +/// GENERATED BY terra, DO NOT MODIFY BY HAND.\n\n// ignore_for_file: public_member_api_docs, unused_local_variable, unused_import + +import 'package:agora_rtc_engine/src/binding_forward_export.dart'; +import 'package:agora_rtc_engine/src/binding/impl_forward_export.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; +`.trim(); + +/// TODO(littlegnal): Move to a parser. +const filteredBaseClasses = ["RefCountInterface", "agora::base::IEngineBase"]; +function getBaseClasses(parseResult: ParseResult, clazz: Clazz): Clazz[] { + let output: Clazz[] = []; + clazz.base_clazzs.forEach((it) => { + if (!filteredBaseClasses.includes(it)) { + let found = parseResult.resolveNodeByName(it); + if (found) { + output.push(found! as Clazz); + } + } + }); + + return output; +} + +function genCallbackExtendBlock(parseResult: ParseResult, clazz: Clazz) { + let extendBlock = ""; + let wrapperClassName = getBaseClasses(parseResult, clazz).map( + (it) => `${it.name}Wrapper` + ); + if (wrapperClassName.length === 0) { + extendBlock = `implements EventLoopEventHandler`; + } else { + // Only take first one. + extendBlock = `extends ${wrapperClassName[0]}`; + } + + return extendBlock; +} + +function callbackSwithCaseBlock( + parseResult: ParseResult, + clazz: Clazz, + firstParamNameForWrapperClass: string +): string { + return clazz.methods + .map((it) => { + let className = clazz.name; + let methodName = it.name; + let jsonClassName = `${className.replace("I", "")}${ + methodName[0].toUpperCase() + methodName.slice(1) + }Json`; + let dn = dartName(it); + let eventName = getIrisApiIdValue(it).split("_").slice(1).join("_"); + + return ` +case '${eventName}': +if (${firstParamNameForWrapperClass}.${dn} == null) { + return true; +} +final jsonMap = jsonDecode(eventData); +${jsonClassName} paramJson = ${jsonClassName}.fromJson(jsonMap); +paramJson = paramJson.fillBuffers(buffers); +${(function () { + let paramIntList = it.parameters + .map((it) => { + let typeName = dartName(it.type); + let memberName = dartName(it); + return `${typeName}? ${memberName} = paramJson.${memberName};`; + }) + .join("\n"); + + let paramNullCheckList = it.parameters + .map((it) => { + let memberName = dartName(it); + return `${memberName} == null`; + }) + .join("||"); + if (paramNullCheckList.length) { + paramNullCheckList = `if (${paramNullCheckList}) { return true; }`; + } + + let paramFillBufferList = it.parameters + .map((it) => { + let memberName = dartName(it); + let actualNode = parseResult.resolveNodeByType(it.type); + if (actualNode.__TYPE == CXXTYPE.Struct) { + if (it.type.kind == SimpleTypeKind.array_t) { + return `${memberName} = ${memberName}.map((e) => e.fillBuffers(buffers)).toList();`; + } else { + return `${memberName} = ${memberName}.fillBuffers(buffers);`; + } + } + + return ""; + }) + .join("\n"); + + let paramList = it.parameters.map((it) => dartName(it)); + + return ` + ${paramIntList} + ${paramNullCheckList} + ${paramFillBufferList} + ${firstParamNameForWrapperClass}.${methodName}!(${paramList}); + return true; + `.trim(); +})()} +`; + }) + .join("\n"); +} + +export default function EventHandlersRenderer( + terraContext: TerraContext, + args: any, + parseResult: ParseResult +): RenderResult[] { + let cxxFiles = processCXXFiles(terraContext, parseResult, args); + + return cxxFiles.map((cxxFile) => { + let output = fileterNodes(cxxFile) + .map((it) => it.asClazz()) + .map((it) => { + let clazz = it; + let className = dartName(clazz); + let extendBlock = genCallbackExtendBlock(parseResult, clazz); + let wrapperClassName = `${className}Wrapper`; + let hasBaseClass = clazz.base_clazzs.length > 0; + let firstParamNameForWrapperClass = + className[0].toLowerCase() + className.slice(1); + + return ` +class ${wrapperClassName} ${extendBlock} { +${(function () { + // Constructor + let callSuperBlock = hasBaseClass + ? `: super(${firstParamNameForWrapperClass})` + : ""; + + return ` + const ${wrapperClassName}(this.${firstParamNameForWrapperClass})${callSuperBlock}; + `.trim(); +})()} + +final ${className} ${firstParamNameForWrapperClass}; + +@override +bool operator ==(Object other) { + if (other.runtimeType != runtimeType) { + return false; + } + return other is ${wrapperClassName} && + other.${firstParamNameForWrapperClass} == ${firstParamNameForWrapperClass}; +} +@override +int get hashCode => ${firstParamNameForWrapperClass}.hashCode; + +@override +bool handleEventInternal(String eventName, String eventData, List buffers) { + switch (eventName) { + ${callbackSwithCaseBlock( + parseResult, + clazz, + firstParamNameForWrapperClass + )} + } + return false; +} + +@override +bool handleEvent(String eventName, String eventData, List buffers) { + if (!eventName.startsWith('${className}')) return false; + final newEvent = eventName.replaceFirst('${className}_', ''); + if (handleEventInternal(newEvent, eventData, buffers)) { return true; } + ${(function () { + // handle return block + if (hasBaseClass) { + return "return super.handleEventInternal(newEvent, eventData, buffers);"; + } + + return "return false;"; + })()} +} +} +`.trim(); + }) + .join("\n"); + + let content = ` + ${dartHeader} + + ${output} + `.trim(); + + let fileName = `${dartFileName(cxxFile)}_event_impl.dart`; + return { + file_name: `lib/src/binding/${fileName}`, + file_content: content, + }; + }); +} diff --git a/tool/terra/renderers/event_ids_mapping_renderer.ts b/tool/terra/renderers/event_ids_mapping_renderer.ts new file mode 100644 index 000000000..6fcae68f0 --- /dev/null +++ b/tool/terra/renderers/event_ids_mapping_renderer.ts @@ -0,0 +1,85 @@ +import { + CXXFile, + CXXTYPE, + CXXTerraNode, + Clazz, +} from "@agoraio-extensions/cxx-parser"; +import { + ParseResult, + RenderResult, + TerraContext, +} from "@agoraio-extensions/terra-core"; +import { irisApiId } from "@agoraio-extensions/terra_shared_configs"; +import { isCallbackClass } from "./utils"; + +const funcNeedCheckWithBaseClasses = [ + "agora::media::IAudioFrameObserver", + "agora::rtc::IRtcEngineEventHandlerEx", +]; +function isNeedCheckWithBaseClasses(clazz: Clazz): boolean { + return funcNeedCheckWithBaseClasses.includes(clazz.fullName); +} + +/// Event Ids mapping of iris api id. +// const eventIdsMapping = { +// "H265TranscoderObserver_onQueryChannel", +// ["H265TranscoderObserver_onQueryChannel_ppp"], +// }; + +export default function EventIdsMappingRenderer( + terraContext: TerraContext, + args: any, + parseResult: ParseResult +): RenderResult[] { + let cxxFiles = parseResult!.nodes as CXXFile[]; + let eventIdsMapping: Map = new Map(); + + cxxFiles.forEach((cxxFile: CXXFile) => { + cxxFile.nodes.forEach((node) => { + if (node.__TYPE == CXXTYPE.Clazz) { + let clazz = node as Clazz; + let needCheckWithBaseClasses = isNeedCheckWithBaseClasses(clazz); + clazz.methods.forEach((method) => { + if (isCallbackClass(clazz)) { + let key = `${clazz.name.replace("I", "")}_${method.name}`; + if (!eventIdsMapping.has(key)) { + eventIdsMapping.set(key, []); + } + eventIdsMapping.get(key)?.push(getIrisApiIdValue(method)); + } + }); + } + }); + }); + + let eventIdsMappingContents: string[] = []; + + eventIdsMapping.forEach((value, key) => { + eventIdsMappingContents.push( + `"${key}": [${value.map((it) => `"${it}"`).join(", ")}]` + ); + }); + + let output = ` + /// Event Ids mapping of iris api id. +const eventIdsMapping = { + ${eventIdsMappingContents.join(",\n")} +}; +`.trim(); + + return [ + { + file_name: + "test_shard/fake_test_app/integration_test/generated/event_ids_mapping_gen.dart", + file_content: output, + }, + ]; +} + +export function getIrisApiIdKey(node: CXXTerraNode): string { + return node.user_data?.["IrisApiIdParser"]?.key ?? ""; +} + +export function getIrisApiIdValue(node: CXXTerraNode): string { + return node.user_data?.["IrisApiIdParser"]?.value ?? ""; +} diff --git a/tool/terra/renderers/forward_export_renderer.ts b/tool/terra/renderers/forward_export_renderer.ts new file mode 100644 index 000000000..1b6c34846 --- /dev/null +++ b/tool/terra/renderers/forward_export_renderer.ts @@ -0,0 +1,70 @@ +import { CXXFile, CXXTYPE, Clazz } from "@agoraio-extensions/cxx-parser"; +import { + ParseResult, + RenderResult, + TerraContext, +} from "@agoraio-extensions/terra-core"; +import { isCallbackClass } from "./utils"; +import { dartFileName } from "../parsers/dart_syntax_parser"; + +/// Generate the files: +/// - lib/src/binding_forward_export.dart +/// - lib/src/binding/impl_forward_export.dart +export default function ForwardExportRenderer( + terraContext: TerraContext, + args: any, + parseResult: ParseResult +): RenderResult[] { + let cxxFiles = parseResult!.nodes as CXXFile[]; + let bindingExportFiles: string[] = []; + let implExportFiles: string[] = []; + cxxFiles.forEach((cxxFile: CXXFile) => { + bindingExportFiles.push(`export '${dartFileName(cxxFile)}.dart';`); + + let hasImplClass = cxxFile.nodes.find((node) => { + return node.__TYPE == CXXTYPE.Clazz && !isCallbackClass(node as Clazz); + }); + let hasCallbackImplClass = cxxFile.nodes.find((node) => { + return node.__TYPE == CXXTYPE.Clazz && isCallbackClass(node as Clazz); + }); + if (hasImplClass) { + implExportFiles.push(`export '${dartFileName(cxxFile)}_impl.dart';`); + } + if (hasCallbackImplClass) { + implExportFiles.push( + `export '${dartFileName(cxxFile)}_event_impl.dart';` + ); + } + }); + + // lib/src/binding_forward_export.dart + let bindingExport = ` +${bindingExportFiles.join("\n")} +export 'dart:convert'; +export 'dart:typed_data'; +export 'package:json_annotation/json_annotation.dart'; +export 'package:flutter/foundation.dart'; +export 'package:agora_rtc_engine/src/agora_rtc_engine_ext.dart'; +export 'package:agora_rtc_engine/src/impl/json_converters.dart'; +`; + + // lib/src/binding/impl_forward_export.dart + let implExport = ` +${implExportFiles.join("\n")} +export 'event_handler_param_json.dart'; +export 'call_api_impl_params_json.dart'; +export 'call_api_event_handler_buffer_ext.dart'; +`; + + return [ + { + file_name: "lib/src/binding_forward_export.dart", + file_content: bindingExport, + }, + + { + file_name: "lib/src/binding/impl_forward_export.dart", + file_content: implExport, + }, + ]; +} diff --git a/tool/terra/renderers/utils.ts b/tool/terra/renderers/utils.ts new file mode 100644 index 000000000..04be4df73 --- /dev/null +++ b/tool/terra/renderers/utils.ts @@ -0,0 +1,18 @@ +import { Clazz } from "@agoraio-extensions/cxx-parser"; +import _ from "lodash"; + +export function isCallbackClass(clazz: Clazz): boolean { + return new RegExp( + "(EventHandler|Observer|Provider|Sink|Callback|ObserverBase|EventHandlerEx)$" + ).test(clazz.name); +} + +export function setUserdata(node: any, key: string, value: any) { + node.user_data ??= {}; + let old = node.user_data![key]; + if (old) { + node.user_data![key] = _.merge(old, value); + } else { + node.user_data![key] = value; + } +} diff --git a/tool/terra/terra_config_main.yaml b/tool/terra/terra_config_main.yaml index 2085b0376..f51f13e91 100644 --- a/tool/terra/terra_config_main.yaml +++ b/tool/terra/terra_config_main.yaml @@ -1,37 +1,39 @@ parsers: - - name: LegacyCXXParser - package: '@agoraio-extensions/terra-legacy-cxx-parser' + - name: CXXParser + package: '@agoraio-extensions/cxx-parser' args: includeHeaderDirs: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include' parseFiles: include: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/*.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/*.h' exclude: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/AgoraRefPtr.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/time_utils.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/AgoraOptional.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/AgoraRefPtr.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/IAgoraH265Transcoder.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/IAgoraMediaComponentFactory.h' - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/include/IAgoraParameter.h' - customHeaders: - - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.2.3/custom_headers/*.h' - language: dart - legacyRenders: - - DartSyntaxRender - - DartEventHandlerParamJsonRender - - DartCallApiIrisMethodChannelRender - - DartEventHandlerIrisMethodChannelRender - - DartStructToJsonSerializableRender - - DartCallApiEventHandlerBufferExtRender - - DartForwardExportRender + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/time_utils.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/AgoraOptional.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/AgoraRefPtr.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/IAgoraMediaComponentFactory.h' + - '@agoraio-extensions/terra_shared_configs:headers/rtc_4.3.0/include/IAgoraParameter.h' -renderers: - - name: IrisDocRenderer + - name: IrisApiIdParser package: '@agoraio-extensions/terra_shared_configs' + - path: parsers/cud_node_parser.ts args: - language: dart - fmtConfig: fmt_dart.yaml - exportFilePath: ../../lib/agora_rtc_engine.dart - templateUrl: https://github.com/AgoraIO/agora_doc_source/releases/download/master-build/flutter_ng_json_template_en.json \ No newline at end of file + configPath: configs/cud_node_parser.config.ts + + - name: PointerToArrayParser + package: '@agoraio-extensions/terra_shared_configs' + + # Need put it below `PointerToArrayParser`, since the `PointerToArrayParser` will change the pointer type to array type + - path: parsers/dart_syntax_parser.ts + + # This should be ordered in last step + - name: MergeNodeParser + package: '@agoraio-extensions/terra_shared_configs' + args: + configFilePath: configs/merge_node_list.ts + ignoreDefaultConfig: true + +renderers: + - path: renderers/event_handlers_renderer.ts + - path: renderers/event_ids_mapping_renderer.ts \ No newline at end of file diff --git a/tool/terra/yarn.lock b/tool/terra/yarn.lock index 2337181d6..72df7aa1e 100644 --- a/tool/terra/yarn.lock +++ b/tool/terra/yarn.lock @@ -7,26 +7,26 @@ __metadata: "@agoraio-extensions/cxx-parser@git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser": version: 0.1.9 - resolution: "@agoraio-extensions/cxx-parser@git@github.com:AgoraIO-Extensions/terra.git#workspace=cxx-parser&commit=016edf9cd207de6fe9ac9df8defe4ad570ac2214" + resolution: "@agoraio-extensions/cxx-parser@git@github.com:AgoraIO-Extensions/terra.git#workspace=cxx-parser&commit=336018fce1ce3749567520e932e5c9397c854cf0" dependencies: glob: "npm:^10.3.4" yaml: "npm:^2.1.3" peerDependencies: "@agoraio-extensions/terra-core": "*" - checksum: 61ce4c76eabb98aa7841afa0b0ed2a16d1132a1a9bf9037ce2f52e7a2ab8ad0b1789cafee3e3255b6f4125a182fe65619069a4edaf84777cc02be7803754ae63 + checksum: 10c0/c922cdb60293fd647a3a2ff7cd4da09c47045fab80bfacf587379778eb8a68bda8d0e8734bfdfeb3568702483c1569d7dac16d4eaa7d62cf9575f39a7ffb2d45 languageName: node linkType: hard "@agoraio-extensions/terra-core@git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core": version: 0.1.5 - resolution: "@agoraio-extensions/terra-core@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra-core&commit=016edf9cd207de6fe9ac9df8defe4ad570ac2214" - checksum: 673c3b6246e097d180d40a899fdce23fdad80aa92f2b593173baba2aecc5d103a2d74ac346486c6a2349a1016ade82d48dd618c0860e6a29c680f471d1aea06a + resolution: "@agoraio-extensions/terra-core@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra-core&commit=336018fce1ce3749567520e932e5c9397c854cf0" + checksum: 10c0/d7113225ab004b2ff09de3c3718262925dc335f5ffb8ac2800bb96bfb2ad67a307063a425bd14654356d804586a785efe3856462e1087472463eb233a6793e44 languageName: node linkType: hard "@agoraio-extensions/terra-legacy-cxx-parser@git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#head=main": version: 0.1.5 - resolution: "@agoraio-extensions/terra-legacy-cxx-parser@git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=008f1b84aee777364b006684914917393c78356b" + resolution: "@agoraio-extensions/terra-legacy-cxx-parser@git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=8c5a57bc52e6334baeecf32f812ed86924cecbd6" dependencies: "@agoraio-extensions/cxx-parser": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser" "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core" @@ -38,13 +38,13 @@ __metadata: ts-node: "npm:^10.9.1" typescript: "npm:^5.1.6" yaml: "npm:^2.1.3" - checksum: c7af47edb4f36ed3b6fb1f20b04465c88ef1553fd7fb859c86f796a2dada3f9ddf1432115a1379a5a1d0e6e2609f6eb77cd823f83279a859c357b61d46d810c3 + checksum: 10c0/18fc1a248b82a9dee911a4a83b38a8a708bb9e520646f7c3d02ee8f41f56c34dde87206715e56a9cd31abb0e89e04b850f3de143dbbd0288719901d0bc1b1cda languageName: node linkType: hard "@agoraio-extensions/terra@git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra": version: 0.1.5 - resolution: "@agoraio-extensions/terra@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra&commit=016edf9cd207de6fe9ac9df8defe4ad570ac2214" + resolution: "@agoraio-extensions/terra@git@github.com:AgoraIO-Extensions/terra.git#workspace=terra&commit=336018fce1ce3749567520e932e5c9397c854cf0" dependencies: commander: "npm:^9.4.1" mustache: "npm:^4.2.0" @@ -53,18 +53,18 @@ __metadata: "@agoraio-extensions/terra-core": "*" bin: terra: ./bin/terra - checksum: f86bfecb341fec2016aa0f2b7f65f4fce8f0e5eeb481929cd7d99088e13bc2443ea24f8445982d56ea24cad253cfd83e81d0f98e5ffd5d3a757367905d1d2cf9 + checksum: 10c0/d63492c162aea0e42a39b56287fd502be9bbb92e49fb3ee6b070a4deaff6bd2568d5f96afc12af85a0f337665af385198da80133bb59283fe5bc8d5b6ef733b7 languageName: node linkType: hard "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#head=main": version: 1.0.2 - resolution: "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=63b627b40ab601edd4dcba8bbe8a7d3ef58d7c2a" + resolution: "@agoraio-extensions/terra_shared_configs@git@github.com:AgoraIO-Extensions/terra_shared_configs.git#commit=52a74ccadb5a0949127d1e136ca641f7b26cd601" dependencies: "@agoraio-extensions/cxx-parser": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser" "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core" mustache: "npm:^4.2.0" - checksum: 552b4e495440562a8a2c88a6af909a29f85b520ebae6dfa3497720a14a20f2effacf17f68cb0019c35c0c739c803a65bf40ce6b5a08706229f965aee0bb082d7 + checksum: 10c0/ddca741322311fb922369fc955e24bb9fab9869b920fb7e3d2db8fbc9f701a231f3a0e551706ae47f903f8b4ac33a1de06daaaa0c8d650a1225113e43b630c17 languageName: node linkType: hard @@ -74,79 +74,79 @@ __metadata: dependencies: "@jridgewell/gen-mapping": "npm:^0.3.0" "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 92ce5915f8901d8c7cd4f4e6e2fe7b9fd335a29955b400caa52e0e5b12ca3796ada7c2f10e78c9c5b0f9c2539dff0ffea7b19850a56e1487aa083531e1e46d43 + checksum: 10c0/92ce5915f8901d8c7cd4f4e6e2fe7b9fd335a29955b400caa52e0e5b12ca3796ada7c2f10e78c9c5b0f9c2539dff0ffea7b19850a56e1487aa083531e1e46d43 languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.22.13": - version: 7.22.13 - resolution: "@babel/code-frame@npm:7.22.13" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/code-frame@npm:7.23.5" dependencies: - "@babel/highlight": "npm:^7.22.13" + "@babel/highlight": "npm:^7.23.4" chalk: "npm:^2.4.2" - checksum: f4cc8ae1000265677daf4845083b72f88d00d311adb1a93c94eb4b07bf0ed6828a81ae4ac43ee7d476775000b93a28a9cddec18fbdc5796212d8dcccd5de72bd + checksum: 10c0/a10e843595ddd9f97faa99917414813c06214f4d9205294013e20c70fbdf4f943760da37dec1d998bf3e6fc20fa2918a47c0e987a7e458663feb7698063ad7c6 languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.9": - version: 7.23.3 - resolution: "@babel/compat-data@npm:7.23.3" - checksum: c6af331753c34ee8a5678bc94404320826cb56b1dda3efc1311ec8fb0774e78225132f3c1acc988440ace667f14a838e297a822692b95758aa63da406e1f97a1 +"@babel/compat-data@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/compat-data@npm:7.23.5" + checksum: 10c0/081278ed46131a890ad566a59c61600a5f9557bd8ee5e535890c8548192532ea92590742fd74bd9db83d74c669ef8a04a7e1c85cdea27f960233e3b83c3a957c languageName: node linkType: hard "@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3": - version: 7.23.3 - resolution: "@babel/core@npm:7.23.3" + version: 7.23.9 + resolution: "@babel/core@npm:7.23.9" dependencies: "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.3" - "@babel/helper-compilation-targets": "npm:^7.22.15" + "@babel/code-frame": "npm:^7.23.5" + "@babel/generator": "npm:^7.23.6" + "@babel/helper-compilation-targets": "npm:^7.23.6" "@babel/helper-module-transforms": "npm:^7.23.3" - "@babel/helpers": "npm:^7.23.2" - "@babel/parser": "npm:^7.23.3" - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.3" - "@babel/types": "npm:^7.23.3" + "@babel/helpers": "npm:^7.23.9" + "@babel/parser": "npm:^7.23.9" + "@babel/template": "npm:^7.23.9" + "@babel/traverse": "npm:^7.23.9" + "@babel/types": "npm:^7.23.9" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 08d43b749e24052d12713a7fb1f0c0d1275d4fb056d00846faeb8da79ecf6d0ba91a11b6afec407b8b0f9388d00e2c2f485f282bef0ade4d6d0a17de191a4287 + checksum: 10c0/03883300bf1252ab4c9ba5b52f161232dd52873dbe5cde9289bb2bb26e935c42682493acbac9194a59a3b6cbd17f4c4c84030db8d6d482588afe64531532ff9b languageName: node linkType: hard -"@babel/generator@npm:^7.23.3, @babel/generator@npm:^7.7.2": - version: 7.23.3 - resolution: "@babel/generator@npm:7.23.3" +"@babel/generator@npm:^7.23.6, @babel/generator@npm:^7.7.2": + version: 7.23.6 + resolution: "@babel/generator@npm:7.23.6" dependencies: - "@babel/types": "npm:^7.23.3" + "@babel/types": "npm:^7.23.6" "@jridgewell/gen-mapping": "npm:^0.3.2" "@jridgewell/trace-mapping": "npm:^0.3.17" jsesc: "npm:^2.5.1" - checksum: d5fff1417eecfada040e01a7c77a4968e81c436aeb35815ce85b4e80cd01e731423613d61033044a6cb5563bb8449ee260e3379b63eb50b38ec0a9ea9c00abfd + checksum: 10c0/53540e905cd10db05d9aee0a5304e36927f455ce66f95d1253bb8a179f286b88fa7062ea0db354c566fe27f8bb96567566084ffd259f8feaae1de5eccc8afbda languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-compilation-targets@npm:7.22.15" +"@babel/helper-compilation-targets@npm:^7.23.6": + version: 7.23.6 + resolution: "@babel/helper-compilation-targets@npm:7.23.6" dependencies: - "@babel/compat-data": "npm:^7.22.9" - "@babel/helper-validator-option": "npm:^7.22.15" - browserslist: "npm:^4.21.9" + "@babel/compat-data": "npm:^7.23.5" + "@babel/helper-validator-option": "npm:^7.23.5" + browserslist: "npm:^4.22.2" lru-cache: "npm:^5.1.1" semver: "npm:^6.3.1" - checksum: 45b9286861296e890f674a3abb199efea14a962a27d9b8adeb44970a9fd5c54e73a9e342e8414d2851cf4f98d5994537352fbce7b05ade32e9849bbd327f9ff1 + checksum: 10c0/ba38506d11185f48b79abf439462ece271d3eead1673dd8814519c8c903c708523428806f05f2ec5efd0c56e4e278698fac967e5a4b5ee842c32415da54bc6fa languageName: node linkType: hard "@babel/helper-environment-visitor@npm:^7.22.20": version: 7.22.20 resolution: "@babel/helper-environment-visitor@npm:7.22.20" - checksum: e762c2d8f5d423af89bd7ae9abe35bd4836d2eb401af868a63bbb63220c513c783e25ef001019418560b3fdc6d9a6fb67e6c0b650bcdeb3a2ac44b5c3d2bdd94 + checksum: 10c0/e762c2d8f5d423af89bd7ae9abe35bd4836d2eb401af868a63bbb63220c513c783e25ef001019418560b3fdc6d9a6fb67e6c0b650bcdeb3a2ac44b5c3d2bdd94 languageName: node linkType: hard @@ -156,7 +156,7 @@ __metadata: dependencies: "@babel/template": "npm:^7.22.15" "@babel/types": "npm:^7.23.0" - checksum: d771dd1f3222b120518176733c52b7cadac1c256ff49b1889dbbe5e3fed81db855b8cc4e40d949c9d3eae0e795e8229c1c8c24c0e83f27cfa6ee3766696c6428 + checksum: 10c0/d771dd1f3222b120518176733c52b7cadac1c256ff49b1889dbbe5e3fed81db855b8cc4e40d949c9d3eae0e795e8229c1c8c24c0e83f27cfa6ee3766696c6428 languageName: node linkType: hard @@ -165,7 +165,7 @@ __metadata: resolution: "@babel/helper-hoist-variables@npm:7.22.5" dependencies: "@babel/types": "npm:^7.22.5" - checksum: 60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208 + checksum: 10c0/60a3077f756a1cd9f14eb89f0037f487d81ede2b7cfe652ea6869cd4ec4c782b0fb1de01b8494b9a2d2050e3d154d7d5ad3be24806790acfb8cbe2073bf1e208 languageName: node linkType: hard @@ -174,7 +174,7 @@ __metadata: resolution: "@babel/helper-module-imports@npm:7.22.15" dependencies: "@babel/types": "npm:^7.22.15" - checksum: 4e0d7fc36d02c1b8c8b3006dfbfeedf7a367d3334a04934255de5128115ea0bafdeb3e5736a2559917f0653e4e437400d54542da0468e08d3cbc86d3bbfa8f30 + checksum: 10c0/4e0d7fc36d02c1b8c8b3006dfbfeedf7a367d3334a04934255de5128115ea0bafdeb3e5736a2559917f0653e4e437400d54542da0468e08d3cbc86d3bbfa8f30 languageName: node linkType: hard @@ -189,14 +189,14 @@ __metadata: "@babel/helper-validator-identifier": "npm:^7.22.20" peerDependencies: "@babel/core": ^7.0.0 - checksum: 211e1399d0c4993671e8e5c2b25383f08bee40004ace5404ed4065f0e9258cc85d99c1b82fd456c030ce5cfd4d8f310355b54ef35de9924eabfc3dff1331d946 + checksum: 10c0/211e1399d0c4993671e8e5c2b25383f08bee40004ace5404ed4065f0e9258cc85d99c1b82fd456c030ce5cfd4d8f310355b54ef35de9924eabfc3dff1331d946 languageName: node linkType: hard "@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.22.5 resolution: "@babel/helper-plugin-utils@npm:7.22.5" - checksum: d2c4bfe2fa91058bcdee4f4e57a3f4933aed7af843acfd169cd6179fab8d13c1d636474ecabb2af107dc77462c7e893199aa26632bac1c6d7e025a17cbb9d20d + checksum: 10c0/d2c4bfe2fa91058bcdee4f4e57a3f4933aed7af843acfd169cd6179fab8d13c1d636474ecabb2af107dc77462c7e893199aa26632bac1c6d7e025a17cbb9d20d languageName: node linkType: hard @@ -205,7 +205,7 @@ __metadata: resolution: "@babel/helper-simple-access@npm:7.22.5" dependencies: "@babel/types": "npm:^7.22.5" - checksum: f0cf81a30ba3d09a625fd50e5a9069e575c5b6719234e04ee74247057f8104beca89ed03e9217b6e9b0493434cedc18c5ecca4cea6244990836f1f893e140369 + checksum: 10c0/f0cf81a30ba3d09a625fd50e5a9069e575c5b6719234e04ee74247057f8104beca89ed03e9217b6e9b0493434cedc18c5ecca4cea6244990836f1f893e140369 languageName: node linkType: hard @@ -214,59 +214,59 @@ __metadata: resolution: "@babel/helper-split-export-declaration@npm:7.22.6" dependencies: "@babel/types": "npm:^7.22.5" - checksum: d83e4b623eaa9622c267d3c83583b72f3aac567dc393dda18e559d79187961cb29ae9c57b2664137fc3d19508370b12ec6a81d28af73a50e0846819cb21c6e44 + checksum: 10c0/d83e4b623eaa9622c267d3c83583b72f3aac567dc393dda18e559d79187961cb29ae9c57b2664137fc3d19508370b12ec6a81d28af73a50e0846819cb21c6e44 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-string-parser@npm:7.22.5" - checksum: 6b0ff8af724377ec41e5587fffa7605198da74cb8e7d8d48a36826df0c0ba210eb9fedb3d9bef4d541156e0bd11040f021945a6cbb731ccec4aefb4affa17aa4 +"@babel/helper-string-parser@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/helper-string-parser@npm:7.23.4" + checksum: 10c0/f348d5637ad70b6b54b026d6544bd9040f78d24e7ec245a0fc42293968181f6ae9879c22d89744730d246ce8ec53588f716f102addd4df8bbc79b73ea10004ac languageName: node linkType: hard "@babel/helper-validator-identifier@npm:^7.22.20": version: 7.22.20 resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e + checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-validator-option@npm:7.22.15" - checksum: e9661bf80ba18e2dd978217b350fb07298e57ac417f4f1ab9fa011505e20e4857f2c3b4b538473516a9dc03af5ce3a831e5ed973311c28326f4c330b6be981c2 +"@babel/helper-validator-option@npm:^7.23.5": + version: 7.23.5 + resolution: "@babel/helper-validator-option@npm:7.23.5" + checksum: 10c0/af45d5c0defb292ba6fd38979e8f13d7da63f9623d8ab9ededc394f67eb45857d2601278d151ae9affb6e03d5d608485806cd45af08b4468a0515cf506510e94 languageName: node linkType: hard -"@babel/helpers@npm:^7.23.2": - version: 7.23.2 - resolution: "@babel/helpers@npm:7.23.2" +"@babel/helpers@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/helpers@npm:7.23.9" dependencies: - "@babel/template": "npm:^7.22.15" - "@babel/traverse": "npm:^7.23.2" - "@babel/types": "npm:^7.23.0" - checksum: 3a6a939c5277a27486e7c626812f0643b35d1c053ac2eb66911f5ae6c0a4e4bcdd40750eba36b766b0ee8a753484287f50ae56232a5f8f2947116723e44b9e35 + "@babel/template": "npm:^7.23.9" + "@babel/traverse": "npm:^7.23.9" + "@babel/types": "npm:^7.23.9" + checksum: 10c0/f69fd0aca96a6fb8bd6dd044cd8a5c0f1851072d4ce23355345b9493c4032e76d1217f86b70df795e127553cf7f3fcd1587ede9d1b03b95e8b62681ca2165b87 languageName: node linkType: hard -"@babel/highlight@npm:^7.22.13": - version: 7.22.20 - resolution: "@babel/highlight@npm:7.22.20" +"@babel/highlight@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/highlight@npm:7.23.4" dependencies: "@babel/helper-validator-identifier": "npm:^7.22.20" chalk: "npm:^2.4.2" js-tokens: "npm:^4.0.0" - checksum: f3c3a193afad23434297d88e81d1d6c0c2cf02423de2139ada7ce0a7fc62d8559abf4cc996533c1a9beca7fc990010eb8d544097f75e818ac113bf39ed810aa2 + checksum: 10c0/fbff9fcb2f5539289c3c097d130e852afd10d89a3a08ac0b5ebebbc055cc84a4bcc3dcfed463d488cde12dd0902ef1858279e31d7349b2e8cee43913744bda33 languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/parser@npm:7.23.3" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/parser@npm:7.23.9" bin: parser: ./bin/babel-parser.js - checksum: 0fe11eadd4146a9155305b5bfece0f8223a3b1b97357ffa163c0156940de92e76cd0e7a173de819b8692767147e62f33389b312d1537f84cede51092672df6ef + checksum: 10c0/7df97386431366d4810538db4b9ec538f4377096f720c0591c7587a16f6810e62747e9fbbfa1ff99257fd4330035e4fb1b5b77c7bd3b97ce0d2e3780a6618975 languageName: node linkType: hard @@ -277,7 +277,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: d13efb282838481348c71073b6be6245b35d4f2f964a8f71e4174f235009f929ef7613df25f8d2338e2d3e44bc4265a9f8638c6aaa136d7a61fe95985f9725c8 + checksum: 10c0/d13efb282838481348c71073b6be6245b35d4f2f964a8f71e4174f235009f929ef7613df25f8d2338e2d3e44bc4265a9f8638c6aaa136d7a61fe95985f9725c8 languageName: node linkType: hard @@ -288,7 +288,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 686891b81af2bc74c39013655da368a480f17dd237bf9fbc32048e5865cb706d5a8f65438030da535b332b1d6b22feba336da8fa931f663b6b34e13147d12dde + checksum: 10c0/686891b81af2bc74c39013655da368a480f17dd237bf9fbc32048e5865cb706d5a8f65438030da535b332b1d6b22feba336da8fa931f663b6b34e13147d12dde languageName: node linkType: hard @@ -299,7 +299,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.12.13" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 95168fa186416195280b1264fb18afcdcdcea780b3515537b766cb90de6ce042d42dd6a204a39002f794ae5845b02afb0fd4861a3308a861204a55e68310a120 + checksum: 10c0/95168fa186416195280b1264fb18afcdcdcea780b3515537b766cb90de6ce042d42dd6a204a39002f794ae5845b02afb0fd4861a3308a861204a55e68310a120 languageName: node linkType: hard @@ -310,7 +310,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 0b08b5e4c3128523d8e346f8cfc86824f0da2697b1be12d71af50a31aff7a56ceb873ed28779121051475010c28d6146a6bfea8518b150b71eeb4e46190172ee + checksum: 10c0/0b08b5e4c3128523d8e346f8cfc86824f0da2697b1be12d71af50a31aff7a56ceb873ed28779121051475010c28d6146a6bfea8518b150b71eeb4e46190172ee languageName: node linkType: hard @@ -321,7 +321,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: e98f31b2ec406c57757d115aac81d0336e8434101c224edd9a5c93cefa53faf63eacc69f3138960c8b25401315af03df37f68d316c151c4b933136716ed6906e + checksum: 10c0/e98f31b2ec406c57757d115aac81d0336e8434101c224edd9a5c93cefa53faf63eacc69f3138960c8b25401315af03df37f68d316c151c4b933136716ed6906e languageName: node linkType: hard @@ -332,7 +332,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 563bb7599b868773f1c7c1d441ecc9bc53aeb7832775da36752c926fc402a1fa5421505b39e724f71eb217c13e4b93117e081cac39723b0e11dac4c897f33c3e + checksum: 10c0/563bb7599b868773f1c7c1d441ecc9bc53aeb7832775da36752c926fc402a1fa5421505b39e724f71eb217c13e4b93117e081cac39723b0e11dac4c897f33c3e languageName: node linkType: hard @@ -343,7 +343,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 2594cfbe29411ad5bc2ad4058de7b2f6a8c5b86eda525a993959438615479e59c012c14aec979e538d60a584a1a799b60d1b8942c3b18468cb9d99b8fd34cd0b + checksum: 10c0/2594cfbe29411ad5bc2ad4058de7b2f6a8c5b86eda525a993959438615479e59c012c14aec979e538d60a584a1a799b60d1b8942c3b18468cb9d99b8fd34cd0b languageName: node linkType: hard @@ -354,7 +354,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 2024fbb1162899094cfc81152449b12bd0cc7053c6d4bda8ac2852545c87d0a851b1b72ed9560673cbf3ef6248257262c3c04aabf73117215c1b9cc7dd2542ce + checksum: 10c0/2024fbb1162899094cfc81152449b12bd0cc7053c6d4bda8ac2852545c87d0a851b1b72ed9560673cbf3ef6248257262c3c04aabf73117215c1b9cc7dd2542ce languageName: node linkType: hard @@ -365,7 +365,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.10.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: c55a82b3113480942c6aa2fcbe976ff9caa74b7b1109ff4369641dfbc88d1da348aceb3c31b6ed311c84d1e7c479440b961906c735d0ab494f688bf2fd5b9bb9 + checksum: 10c0/c55a82b3113480942c6aa2fcbe976ff9caa74b7b1109ff4369641dfbc88d1da348aceb3c31b6ed311c84d1e7c479440b961906c735d0ab494f688bf2fd5b9bb9 languageName: node linkType: hard @@ -376,7 +376,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: ee1eab52ea6437e3101a0a7018b0da698545230015fc8ab129d292980ec6dff94d265e9e90070e8ae5fed42f08f1622c14c94552c77bcac784b37f503a82ff26 + checksum: 10c0/ee1eab52ea6437e3101a0a7018b0da698545230015fc8ab129d292980ec6dff94d265e9e90070e8ae5fed42f08f1622c14c94552c77bcac784b37f503a82ff26 languageName: node linkType: hard @@ -387,7 +387,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 27e2493ab67a8ea6d693af1287f7e9acec206d1213ff107a928e85e173741e1d594196f99fec50e9dde404b09164f39dec5864c767212154ffe1caa6af0bc5af + checksum: 10c0/27e2493ab67a8ea6d693af1287f7e9acec206d1213ff107a928e85e173741e1d594196f99fec50e9dde404b09164f39dec5864c767212154ffe1caa6af0bc5af languageName: node linkType: hard @@ -398,7 +398,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.8.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 46edddf2faa6ebf94147b8e8540dfc60a5ab718e2de4d01b2c0bdf250a4d642c2bd47cbcbb739febcb2bf75514dbcefad3c52208787994b8d0f8822490f55e81 + checksum: 10c0/46edddf2faa6ebf94147b8e8540dfc60a5ab718e2de4d01b2c0bdf250a4d642c2bd47cbcbb739febcb2bf75514dbcefad3c52208787994b8d0f8822490f55e81 languageName: node linkType: hard @@ -409,7 +409,7 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f + checksum: 10c0/14bf6e65d5bc1231ffa9def5f0ef30b19b51c218fcecaa78cd1bdf7939dfdf23f90336080b7f5196916368e399934ce5d581492d8292b46a2fb569d8b2da106f languageName: node linkType: hard @@ -420,54 +420,54 @@ __metadata: "@babel/helper-plugin-utils": "npm:^7.22.5" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 4d6e9cdb9d0bfb9bd9b220fc951d937fce2ca69135ec121153572cebe81d86abc9a489208d6b69ee5f10cadcaeffa10d0425340a5029e40e14a6025021b90948 + checksum: 10c0/4d6e9cdb9d0bfb9bd9b220fc951d937fce2ca69135ec121153572cebe81d86abc9a489208d6b69ee5f10cadcaeffa10d0425340a5029e40e14a6025021b90948 languageName: node linkType: hard -"@babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": - version: 7.22.15 - resolution: "@babel/template@npm:7.22.15" +"@babel/template@npm:^7.22.15, @babel/template@npm:^7.23.9, @babel/template@npm:^7.3.3": + version: 7.23.9 + resolution: "@babel/template@npm:7.23.9" dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/parser": "npm:^7.22.15" - "@babel/types": "npm:^7.22.15" - checksum: 9312edd37cf1311d738907003f2aa321a88a42ba223c69209abe4d7111db019d321805504f606c7fd75f21c6cf9d24d0a8223104cd21ebd207e241b6c551f454 + "@babel/code-frame": "npm:^7.23.5" + "@babel/parser": "npm:^7.23.9" + "@babel/types": "npm:^7.23.9" + checksum: 10c0/0e8b60119433787742bc08ae762bbd8d6755611c4cabbcb7627b292ec901a55af65d93d1c88572326069efb64136ef151ec91ffb74b2df7689bbab237030833a languageName: node linkType: hard -"@babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/traverse@npm:7.23.3" +"@babel/traverse@npm:^7.23.9": + version: 7.23.9 + resolution: "@babel/traverse@npm:7.23.9" dependencies: - "@babel/code-frame": "npm:^7.22.13" - "@babel/generator": "npm:^7.23.3" + "@babel/code-frame": "npm:^7.23.5" + "@babel/generator": "npm:^7.23.6" "@babel/helper-environment-visitor": "npm:^7.22.20" "@babel/helper-function-name": "npm:^7.23.0" "@babel/helper-hoist-variables": "npm:^7.22.5" "@babel/helper-split-export-declaration": "npm:^7.22.6" - "@babel/parser": "npm:^7.23.3" - "@babel/types": "npm:^7.23.3" - debug: "npm:^4.1.0" + "@babel/parser": "npm:^7.23.9" + "@babel/types": "npm:^7.23.9" + debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 3c2784f4765185126d64fd5eebce0413b7aee6d54f779998594a343a7f973a9693a441ba27533df84e7ab7ce22f1239c6837f35e903132a1b25f7fc7a67bc30f + checksum: 10c0/d1615d1d02f04d47111a7ea4446a1a6275668ca39082f31d51f08380de9502e19862be434eaa34b022ce9a17dbb8f9e2b73a746c654d9575f3a680a7ffdf5630 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.3, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": - version: 7.23.3 - resolution: "@babel/types@npm:7.23.3" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.6, @babel/types@npm:^7.23.9, @babel/types@npm:^7.3.3, @babel/types@npm:^7.8.3": + version: 7.23.9 + resolution: "@babel/types@npm:7.23.9" dependencies: - "@babel/helper-string-parser": "npm:^7.22.5" + "@babel/helper-string-parser": "npm:^7.23.4" "@babel/helper-validator-identifier": "npm:^7.22.20" to-fast-properties: "npm:^2.0.0" - checksum: 371a10dd9c8d8ebf48fc5d9e1b327dafd74453f8ea582dcbddd1cee5ae34e8881b743e783a86c08c04dcd1849b1842455472a911ae8a1c185484fe9b7b5f1595 + checksum: 10c0/edc7bb180ce7e4d2aea10c6972fb10474341ac39ba8fdc4a27ffb328368dfdfbf40fca18e441bbe7c483774500d5c05e222cec276c242e952853dcaf4eb884f7 languageName: node linkType: hard "@bcoe/v8-coverage@npm:^0.2.3": version: 0.2.3 resolution: "@bcoe/v8-coverage@npm:0.2.3" - checksum: 6b80ae4cb3db53f486da2dc63b6e190a74c8c3cca16bb2733f234a0b6a9382b09b146488ae08e2b22cf00f6c83e20f3e040a2f7894f05c045c946d6a090b1d52 + checksum: 10c0/6b80ae4cb3db53f486da2dc63b6e190a74c8c3cca16bb2733f234a0b6a9382b09b146488ae08e2b22cf00f6c83e20f3e040a2f7894f05c045c946d6a090b1d52 languageName: node linkType: hard @@ -476,7 +476,7 @@ __metadata: resolution: "@cspotcode/source-map-support@npm:0.8.1" dependencies: "@jridgewell/trace-mapping": "npm:0.3.9" - checksum: 05c5368c13b662ee4c122c7bfbe5dc0b613416672a829f3e78bc49a357a197e0218d6e74e7c66cfcd04e15a179acab080bd3c69658c9fbefd0e1ccd950a07fc6 + checksum: 10c0/05c5368c13b662ee4c122c7bfbe5dc0b613416672a829f3e78bc49a357a197e0218d6e74e7c66cfcd04e15a179acab080bd3c69658c9fbefd0e1ccd950a07fc6 languageName: node linkType: hard @@ -490,7 +490,7 @@ __metadata: strip-ansi-cjs: "npm:strip-ansi@^6.0.1" wrap-ansi: "npm:^8.1.0" wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e + checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e languageName: node linkType: hard @@ -503,14 +503,14 @@ __metadata: get-package-type: "npm:^0.1.0" js-yaml: "npm:^3.13.1" resolve-from: "npm:^5.0.0" - checksum: dd2a8b094887da5a1a2339543a4933d06db2e63cbbc2e288eb6431bd832065df0c099d091b6a67436e71b7d6bf85f01ce7c15f9253b4cbebcc3b9a496165ba42 + checksum: 10c0/dd2a8b094887da5a1a2339543a4933d06db2e63cbbc2e288eb6431bd832065df0c099d091b6a67436e71b7d6bf85f01ce7c15f9253b4cbebcc3b9a496165ba42 languageName: node linkType: hard "@istanbuljs/schema@npm:^0.1.2": version: 0.1.3 resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 61c5286771676c9ca3eb2bd8a7310a9c063fb6e0e9712225c8471c582d157392c88f5353581c8c9adbe0dff98892317d2fdfc56c3499aa42e0194405206a963a + checksum: 10c0/61c5286771676c9ca3eb2bd8a7310a9c063fb6e0e9712225c8471c582d157392c88f5353581c8c9adbe0dff98892317d2fdfc56c3499aa42e0194405206a963a languageName: node linkType: hard @@ -524,7 +524,7 @@ __metadata: jest-message-util: "npm:^29.7.0" jest-util: "npm:^29.7.0" slash: "npm:^3.0.0" - checksum: 7be408781d0a6f657e969cbec13b540c329671819c2f57acfad0dae9dbfe2c9be859f38fe99b35dba9ff1536937dc6ddc69fdcd2794812fa3c647a1619797f6c + checksum: 10c0/7be408781d0a6f657e969cbec13b540c329671819c2f57acfad0dae9dbfe2c9be859f38fe99b35dba9ff1536937dc6ddc69fdcd2794812fa3c647a1619797f6c languageName: node linkType: hard @@ -565,7 +565,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 934f7bf73190f029ac0f96662c85cd276ec460d407baf6b0dbaec2872e157db4d55a7ee0b1c43b18874602f662b37cb973dda469a4e6d88b4e4845b521adeeb2 + checksum: 10c0/934f7bf73190f029ac0f96662c85cd276ec460d407baf6b0dbaec2872e157db4d55a7ee0b1c43b18874602f662b37cb973dda469a4e6d88b4e4845b521adeeb2 languageName: node linkType: hard @@ -577,7 +577,7 @@ __metadata: "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" jest-mock: "npm:^29.7.0" - checksum: c7b1b40c618f8baf4d00609022d2afa086d9c6acc706f303a70bb4b67275868f620ad2e1a9efc5edd418906157337cce50589a627a6400bbdf117d351b91ef86 + checksum: 10c0/c7b1b40c618f8baf4d00609022d2afa086d9c6acc706f303a70bb4b67275868f620ad2e1a9efc5edd418906157337cce50589a627a6400bbdf117d351b91ef86 languageName: node linkType: hard @@ -586,7 +586,7 @@ __metadata: resolution: "@jest/expect-utils@npm:29.7.0" dependencies: jest-get-type: "npm:^29.6.3" - checksum: 60b79d23a5358dc50d9510d726443316253ecda3a7fb8072e1526b3e0d3b14f066ee112db95699b7a43ad3f0b61b750c72e28a5a1cac361d7a2bb34747fa938a + checksum: 10c0/60b79d23a5358dc50d9510d726443316253ecda3a7fb8072e1526b3e0d3b14f066ee112db95699b7a43ad3f0b61b750c72e28a5a1cac361d7a2bb34747fa938a languageName: node linkType: hard @@ -596,7 +596,7 @@ __metadata: dependencies: expect: "npm:^29.7.0" jest-snapshot: "npm:^29.7.0" - checksum: b41f193fb697d3ced134349250aed6ccea075e48c4f803159db102b826a4e473397c68c31118259868fd69a5cba70e97e1c26d2c2ff716ca39dc73a2ccec037e + checksum: 10c0/b41f193fb697d3ced134349250aed6ccea075e48c4f803159db102b826a4e473397c68c31118259868fd69a5cba70e97e1c26d2c2ff716ca39dc73a2ccec037e languageName: node linkType: hard @@ -610,7 +610,7 @@ __metadata: jest-message-util: "npm:^29.7.0" jest-mock: "npm:^29.7.0" jest-util: "npm:^29.7.0" - checksum: cf0a8bcda801b28dc2e2b2ba36302200ee8104a45ad7a21e6c234148932f826cb3bc57c8df3b7b815aeea0861d7b6ca6f0d4778f93b9219398ef28749e03595c + checksum: 10c0/cf0a8bcda801b28dc2e2b2ba36302200ee8104a45ad7a21e6c234148932f826cb3bc57c8df3b7b815aeea0861d7b6ca6f0d4778f93b9219398ef28749e03595c languageName: node linkType: hard @@ -622,7 +622,7 @@ __metadata: "@jest/expect": "npm:^29.7.0" "@jest/types": "npm:^29.6.3" jest-mock: "npm:^29.7.0" - checksum: a385c99396878fe6e4460c43bd7bb0a5cc52befb462cc6e7f2a3810f9e7bcce7cdeb51908fd530391ee452dc856c98baa2c5f5fa8a5b30b071d31ef7f6955cea + checksum: 10c0/a385c99396878fe6e4460c43bd7bb0a5cc52befb462cc6e7f2a3810f9e7bcce7cdeb51908fd530391ee452dc856c98baa2c5f5fa8a5b30b071d31ef7f6955cea languageName: node linkType: hard @@ -659,7 +659,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: a754402a799541c6e5aff2c8160562525e2a47e7d568f01ebfc4da66522de39cbb809bbb0a841c7052e4270d79214e70aec3c169e4eae42a03bc1a8a20cb9fa2 + checksum: 10c0/a754402a799541c6e5aff2c8160562525e2a47e7d568f01ebfc4da66522de39cbb809bbb0a841c7052e4270d79214e70aec3c169e4eae42a03bc1a8a20cb9fa2 languageName: node linkType: hard @@ -668,7 +668,7 @@ __metadata: resolution: "@jest/schemas@npm:29.6.3" dependencies: "@sinclair/typebox": "npm:^0.27.8" - checksum: b329e89cd5f20b9278ae1233df74016ebf7b385e0d14b9f4c1ad18d096c4c19d1e687aa113a9c976b16ec07f021ae53dea811fb8c1248a50ac34fbe009fdf6be + checksum: 10c0/b329e89cd5f20b9278ae1233df74016ebf7b385e0d14b9f4c1ad18d096c4c19d1e687aa113a9c976b16ec07f021ae53dea811fb8c1248a50ac34fbe009fdf6be languageName: node linkType: hard @@ -679,7 +679,7 @@ __metadata: "@jridgewell/trace-mapping": "npm:^0.3.18" callsites: "npm:^3.0.0" graceful-fs: "npm:^4.2.9" - checksum: a2f177081830a2e8ad3f2e29e20b63bd40bade294880b595acf2fc09ec74b6a9dd98f126a2baa2bf4941acd89b13a4ade5351b3885c224107083a0059b60a219 + checksum: 10c0/a2f177081830a2e8ad3f2e29e20b63bd40bade294880b595acf2fc09ec74b6a9dd98f126a2baa2bf4941acd89b13a4ade5351b3885c224107083a0059b60a219 languageName: node linkType: hard @@ -691,7 +691,7 @@ __metadata: "@jest/types": "npm:^29.6.3" "@types/istanbul-lib-coverage": "npm:^2.0.0" collect-v8-coverage: "npm:^1.0.0" - checksum: 7de54090e54a674ca173470b55dc1afdee994f2d70d185c80236003efd3fa2b753fff51ffcdda8e2890244c411fd2267529d42c4a50a8303755041ee493e6a04 + checksum: 10c0/7de54090e54a674ca173470b55dc1afdee994f2d70d185c80236003efd3fa2b753fff51ffcdda8e2890244c411fd2267529d42c4a50a8303755041ee493e6a04 languageName: node linkType: hard @@ -703,7 +703,7 @@ __metadata: graceful-fs: "npm:^4.2.9" jest-haste-map: "npm:^29.7.0" slash: "npm:^3.0.0" - checksum: 593a8c4272797bb5628984486080cbf57aed09c7cfdc0a634e8c06c38c6bef329c46c0016e84555ee55d1cd1f381518cf1890990ff845524c1123720c8c1481b + checksum: 10c0/593a8c4272797bb5628984486080cbf57aed09c7cfdc0a634e8c06c38c6bef329c46c0016e84555ee55d1cd1f381518cf1890990ff845524c1123720c8c1481b languageName: node linkType: hard @@ -726,7 +726,7 @@ __metadata: pirates: "npm:^4.0.4" slash: "npm:^3.0.0" write-file-atomic: "npm:^4.0.2" - checksum: 7f4a7f73dcf45dfdf280c7aa283cbac7b6e5a904813c3a93ead7e55873761fc20d5c4f0191d2019004fac6f55f061c82eb3249c2901164ad80e362e7a7ede5a6 + checksum: 10c0/7f4a7f73dcf45dfdf280c7aa283cbac7b6e5a904813c3a93ead7e55873761fc20d5c4f0191d2019004fac6f55f061c82eb3249c2901164ad80e362e7a7ede5a6 languageName: node linkType: hard @@ -740,7 +740,7 @@ __metadata: "@types/node": "npm:*" "@types/yargs": "npm:^17.0.8" chalk: "npm:^4.0.0" - checksum: ea4e493dd3fb47933b8ccab201ae573dcc451f951dc44ed2a86123cd8541b82aa9d2b1031caf9b1080d6673c517e2dcc25a44b2dc4f3fbc37bfc965d444888c0 + checksum: 10c0/ea4e493dd3fb47933b8ccab201ae573dcc451f951dc44ed2a86123cd8541b82aa9d2b1031caf9b1080d6673c517e2dcc25a44b2dc4f3fbc37bfc965d444888c0 languageName: node linkType: hard @@ -751,28 +751,28 @@ __metadata: "@jridgewell/set-array": "npm:^1.0.1" "@jridgewell/sourcemap-codec": "npm:^1.4.10" "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 376fc11cf5a967318ba3ddd9d8e91be528eab6af66810a713c49b0c3f8dc67e9949452c51c38ab1b19aa618fb5e8594da5a249977e26b1e7fea1ee5a1fcacc74 + checksum: 10c0/376fc11cf5a967318ba3ddd9d8e91be528eab6af66810a713c49b0c3f8dc67e9949452c51c38ab1b19aa618fb5e8594da5a249977e26b1e7fea1ee5a1fcacc74 languageName: node linkType: hard "@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": version: 3.1.1 resolution: "@jridgewell/resolve-uri@npm:3.1.1" - checksum: 0dbc9e29bc640bbbdc5b9876d2859c69042bfcf1423c1e6421bcca53e826660bff4e41c7d4bcb8dbea696404231a6f902f76ba41835d049e20f2dd6cffb713bf + checksum: 10c0/0dbc9e29bc640bbbdc5b9876d2859c69042bfcf1423c1e6421bcca53e826660bff4e41c7d4bcb8dbea696404231a6f902f76ba41835d049e20f2dd6cffb713bf languageName: node linkType: hard "@jridgewell/set-array@npm:^1.0.1": version: 1.1.2 resolution: "@jridgewell/set-array@npm:1.1.2" - checksum: bc7ab4c4c00470de4e7562ecac3c0c84f53e7ee8a711e546d67c47da7febe7c45cd67d4d84ee3c9b2c05ae8e872656cdded8a707a283d30bd54fbc65aef821ab + checksum: 10c0/bc7ab4c4c00470de4e7562ecac3c0c84f53e7ee8a711e546d67c47da7febe7c45cd67d4d84ee3c9b2c05ae8e872656cdded8a707a283d30bd54fbc65aef821ab languageName: node linkType: hard "@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": version: 1.4.15 resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" - checksum: 0c6b5ae663087558039052a626d2d7ed5208da36cfd707dcc5cea4a07cfc918248403dcb5989a8f7afaf245ce0573b7cc6fd94c4a30453bd10e44d9363940ba5 + checksum: 10c0/0c6b5ae663087558039052a626d2d7ed5208da36cfd707dcc5cea4a07cfc918248403dcb5989a8f7afaf245ce0573b7cc6fd94c4a30453bd10e44d9363940ba5 languageName: node linkType: hard @@ -782,30 +782,30 @@ __metadata: dependencies: "@jridgewell/resolve-uri": "npm:^3.0.3" "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: fa425b606d7c7ee5bfa6a31a7b050dd5814b4082f318e0e4190f991902181b4330f43f4805db1dd4f2433fd0ed9cc7a7b9c2683f1deeab1df1b0a98b1e24055b + checksum: 10c0/fa425b606d7c7ee5bfa6a31a7b050dd5814b4082f318e0e4190f991902181b4330f43f4805db1dd4f2433fd0ed9cc7a7b9c2683f1deeab1df1b0a98b1e24055b languageName: node linkType: hard "@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.20 - resolution: "@jridgewell/trace-mapping@npm:0.3.20" + version: 0.3.22 + resolution: "@jridgewell/trace-mapping@npm:0.3.22" dependencies: "@jridgewell/resolve-uri": "npm:^3.1.0" "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 0ea0b2675cf513ec44dc25605616a3c9b808b9832e74b5b63c44260d66b58558bba65764f81928fc1033ead911f8718dca1134049c3e7a93937faf436671df31 + checksum: 10c0/18cf19f88e2792c1c91515f2b629aae05f3cdbb2e60c3886e16e80725234ce26dd10144c4981c05d9366e7094498c0b4fe5c1a89f4a730d7376a4ba4af448149 languageName: node linkType: hard "@npmcli/agent@npm:^2.0.0": - version: 2.2.0 - resolution: "@npmcli/agent@npm:2.2.0" + version: 2.2.1 + resolution: "@npmcli/agent@npm:2.2.1" dependencies: agent-base: "npm:^7.1.0" http-proxy-agent: "npm:^7.0.0" https-proxy-agent: "npm:^7.0.1" lru-cache: "npm:^10.0.1" socks-proxy-agent: "npm:^8.0.1" - checksum: 7b89590598476dda88e79c473766b67c682aae6e0ab0213491daa6083dcc0c171f86b3868f5506f22c09aa5ea69ad7dfb78f4bf39a8dca375d89a42f408645b3 + checksum: 10c0/38ee5cbe8f3cde13be916e717bfc54fd1a7605c07af056369ff894e244c221e0b56b08ca5213457477f9bc15bca9e729d51a4788829b5c3cf296b3c996147f76 languageName: node linkType: hard @@ -814,30 +814,30 @@ __metadata: resolution: "@npmcli/fs@npm:3.1.0" dependencies: semver: "npm:^7.3.5" - checksum: 162b4a0b8705cd6f5c2470b851d1dc6cd228c86d2170e1769d738c1fbb69a87160901411c3c035331e9e99db72f1f1099a8b734bf1637cc32b9a5be1660e4e1e + checksum: 10c0/162b4a0b8705cd6f5c2470b851d1dc6cd228c86d2170e1769d738c1fbb69a87160901411c3c035331e9e99db72f1f1099a8b734bf1637cc32b9a5be1660e4e1e languageName: node linkType: hard "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd + checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd languageName: node linkType: hard "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" - checksum: ef6351ae073c45c2ac89494dbb3e1f87cc60a93ce4cde797b782812b6f97da0d620ae81973f104b43c9b7eaa789ad20ba4f6a1359f1cc62f63729a55a7d22d4e + checksum: 10c0/ef6351ae073c45c2ac89494dbb3e1f87cc60a93ce4cde797b782812b6f97da0d620ae81973f104b43c9b7eaa789ad20ba4f6a1359f1cc62f63729a55a7d22d4e languageName: node linkType: hard "@sinonjs/commons@npm:^3.0.0": - version: 3.0.0 - resolution: "@sinonjs/commons@npm:3.0.0" + version: 3.0.1 + resolution: "@sinonjs/commons@npm:3.0.1" dependencies: type-detect: "npm:4.0.8" - checksum: 1df9cd257942f4e4960dfb9fd339d9e97b6a3da135f3d5b8646562918e863809cb8e00268535f4f4723535d2097881c8fc03d545c414d8555183376cfc54ee84 + checksum: 10c0/1227a7b5bd6c6f9584274db996d7f8cee2c8c350534b9d0141fc662eaf1f292ea0ae3ed19e5e5271c8fd390d27e492ca2803acd31a1978be2cdc6be0da711403 languageName: node linkType: hard @@ -846,57 +846,57 @@ __metadata: resolution: "@sinonjs/fake-timers@npm:10.3.0" dependencies: "@sinonjs/commons": "npm:^3.0.0" - checksum: 2e2fb6cc57f227912814085b7b01fede050cd4746ea8d49a1e44d5a0e56a804663b0340ae2f11af7559ea9bf4d087a11f2f646197a660ea3cb04e19efc04aa63 + checksum: 10c0/2e2fb6cc57f227912814085b7b01fede050cd4746ea8d49a1e44d5a0e56a804663b0340ae2f11af7559ea9bf4d087a11f2f646197a660ea3cb04e19efc04aa63 languageName: node linkType: hard "@tsconfig/node10@npm:^1.0.7": version: 1.0.9 resolution: "@tsconfig/node10@npm:1.0.9" - checksum: c176a2c1e1b16be120c328300ea910df15fb9a5277010116d26818272341a11483c5a80059389d04edacf6fd2d03d4687ad3660870fdd1cc0b7109e160adb220 + checksum: 10c0/c176a2c1e1b16be120c328300ea910df15fb9a5277010116d26818272341a11483c5a80059389d04edacf6fd2d03d4687ad3660870fdd1cc0b7109e160adb220 languageName: node linkType: hard "@tsconfig/node12@npm:^1.0.7": version: 1.0.11 resolution: "@tsconfig/node12@npm:1.0.11" - checksum: dddca2b553e2bee1308a056705103fc8304e42bb2d2cbd797b84403a223b25c78f2c683ec3e24a095e82cd435387c877239bffcb15a590ba817cd3f6b9a99fd9 + checksum: 10c0/dddca2b553e2bee1308a056705103fc8304e42bb2d2cbd797b84403a223b25c78f2c683ec3e24a095e82cd435387c877239bffcb15a590ba817cd3f6b9a99fd9 languageName: node linkType: hard "@tsconfig/node14@npm:^1.0.0": version: 1.0.3 resolution: "@tsconfig/node14@npm:1.0.3" - checksum: 67c1316d065fdaa32525bc9449ff82c197c4c19092b9663b23213c8cbbf8d88b6ed6a17898e0cbc2711950fbfaf40388938c1c748a2ee89f7234fc9e7fe2bf44 + checksum: 10c0/67c1316d065fdaa32525bc9449ff82c197c4c19092b9663b23213c8cbbf8d88b6ed6a17898e0cbc2711950fbfaf40388938c1c748a2ee89f7234fc9e7fe2bf44 languageName: node linkType: hard "@tsconfig/node16@npm:^1.0.2": version: 1.0.4 resolution: "@tsconfig/node16@npm:1.0.4" - checksum: 05f8f2734e266fb1839eb1d57290df1664fe2aa3b0fdd685a9035806daa635f7519bf6d5d9b33f6e69dd545b8c46bd6e2b5c79acb2b1f146e885f7f11a42a5bb + checksum: 10c0/05f8f2734e266fb1839eb1d57290df1664fe2aa3b0fdd685a9035806daa635f7519bf6d5d9b33f6e69dd545b8c46bd6e2b5c79acb2b1f146e885f7f11a42a5bb languageName: node linkType: hard "@types/babel__core@npm:^7.1.14": - version: 7.20.4 - resolution: "@types/babel__core@npm:7.20.4" + version: 7.20.5 + resolution: "@types/babel__core@npm:7.20.5" dependencies: "@babel/parser": "npm:^7.20.7" "@babel/types": "npm:^7.20.7" "@types/babel__generator": "npm:*" "@types/babel__template": "npm:*" "@types/babel__traverse": "npm:*" - checksum: 2adc7ec49de5f922271ce087cedee000de468a3e13f92b7b6254016bd8357298cb98e6d2b3c9defc69bb6e38e0c134ffe80776a8ce4e9fb167bbffcb4d7613b7 + checksum: 10c0/bdee3bb69951e833a4b811b8ee9356b69a61ed5b7a23e1a081ec9249769117fa83aaaf023bb06562a038eb5845155ff663e2d5c75dd95c1d5ccc91db012868ff languageName: node linkType: hard "@types/babel__generator@npm:*": - version: 7.6.7 - resolution: "@types/babel__generator@npm:7.6.7" + version: 7.6.8 + resolution: "@types/babel__generator@npm:7.6.8" dependencies: "@babel/types": "npm:^7.0.0" - checksum: 2427203864ef231857e102eeb32b731a419164863983119cdd4dac9f1503c2831eb4262d05ade95d4574aa410b94c16e54e36a616758452f685a34881f4596d9 + checksum: 10c0/f0ba105e7d2296bf367d6e055bb22996886c114261e2cb70bf9359556d0076c7a57239d019dee42bb063f565bade5ccb46009bce2044b2952d964bf9a454d6d2 languageName: node linkType: hard @@ -906,16 +906,16 @@ __metadata: dependencies: "@babel/parser": "npm:^7.1.0" "@babel/types": "npm:^7.0.0" - checksum: cc84f6c6ab1eab1427e90dd2b76ccee65ce940b778a9a67be2c8c39e1994e6f5bbc8efa309f6cea8dc6754994524cd4d2896558df76d92e7a1f46ecffee7112b + checksum: 10c0/cc84f6c6ab1eab1427e90dd2b76ccee65ce940b778a9a67be2c8c39e1994e6f5bbc8efa309f6cea8dc6754994524cd4d2896558df76d92e7a1f46ecffee7112b languageName: node linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": - version: 7.20.4 - resolution: "@types/babel__traverse@npm:7.20.4" + version: 7.20.5 + resolution: "@types/babel__traverse@npm:7.20.5" dependencies: "@babel/types": "npm:^7.20.7" - checksum: e76cb4974c7740fd61311152dc497e7b05c1c46ba554aab875544ab0a7457f343cafcad34ba8fb2ff543ab0e012ef2d3fa0c13f1a4e9a4cd9c4c703c7a2a8d62 + checksum: 10c0/033abcb2f4c084ad33e30c3efaad82161240f351e3c71b6154ed289946b33b363696c0fbd42502b68e4582a87413c418321f40eb1ea863e34fe525641345e05b languageName: node linkType: hard @@ -924,14 +924,14 @@ __metadata: resolution: "@types/graceful-fs@npm:4.1.9" dependencies: "@types/node": "npm:*" - checksum: 235d2fc69741448e853333b7c3d1180a966dd2b8972c8cbcd6b2a0c6cd7f8d582ab2b8e58219dbc62cce8f1b40aa317ff78ea2201cdd8249da5025adebed6f0b + checksum: 10c0/235d2fc69741448e853333b7c3d1180a966dd2b8972c8cbcd6b2a0c6cd7f8d582ab2b8e58219dbc62cce8f1b40aa317ff78ea2201cdd8249da5025adebed6f0b languageName: node linkType: hard "@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": version: 2.0.6 resolution: "@types/istanbul-lib-coverage@npm:2.0.6" - checksum: 3948088654f3eeb45363f1db158354fb013b362dba2a5c2c18c559484d5eb9f6fd85b23d66c0a7c2fcfab7308d0a585b14dadaca6cc8bf89ebfdc7f8f5102fb7 + checksum: 10c0/3948088654f3eeb45363f1db158354fb013b362dba2a5c2c18c559484d5eb9f6fd85b23d66c0a7c2fcfab7308d0a585b14dadaca6cc8bf89ebfdc7f8f5102fb7 languageName: node linkType: hard @@ -940,7 +940,7 @@ __metadata: resolution: "@types/istanbul-lib-report@npm:3.0.3" dependencies: "@types/istanbul-lib-coverage": "npm:*" - checksum: 247e477bbc1a77248f3c6de5dadaae85ff86ac2d76c5fc6ab1776f54512a745ff2a5f791d22b942e3990ddbd40f3ef5289317c4fca5741bedfaa4f01df89051c + checksum: 10c0/247e477bbc1a77248f3c6de5dadaae85ff86ac2d76c5fc6ab1776f54512a745ff2a5f791d22b942e3990ddbd40f3ef5289317c4fca5741bedfaa4f01df89051c languageName: node linkType: hard @@ -949,72 +949,79 @@ __metadata: resolution: "@types/istanbul-reports@npm:3.0.4" dependencies: "@types/istanbul-lib-report": "npm:*" - checksum: 1647fd402aced5b6edac87274af14ebd6b3a85447ef9ad11853a70fd92a98d35f81a5d3ea9fcb5dbb5834e800c6e35b64475e33fcae6bfa9acc70d61497c54ee + checksum: 10c0/1647fd402aced5b6edac87274af14ebd6b3a85447ef9ad11853a70fd92a98d35f81a5d3ea9fcb5dbb5834e800c6e35b64475e33fcae6bfa9acc70d61497c54ee languageName: node linkType: hard "@types/jest@npm:^29.5.1": - version: 29.5.8 - resolution: "@types/jest@npm:29.5.8" + version: 29.5.12 + resolution: "@types/jest@npm:29.5.12" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: a28e7827ea7e1a2aace6a386868fa6b8402c162d6c71570aed2c29d3745ddc22ceef6899a20643071817905d3c57b670a7992fc8760bff65939351fd4dc481cf + checksum: 10c0/25fc8e4c611fa6c4421e631432e9f0a6865a8cb07c9815ec9ac90d630271cad773b2ee5fe08066f7b95bebd18bb967f8ce05d018ee9ab0430f9dfd1d84665b6f + languageName: node + linkType: hard + +"@types/lodash@npm:^4": + version: 4.14.202 + resolution: "@types/lodash@npm:4.14.202" + checksum: 10c0/6064d43c8f454170841bd67c8266cc9069d9e570a72ca63f06bceb484cb4a3ee60c9c1f305c1b9e3a87826049fd41124b8ef265c4dd08b00f6766609c7fe9973 languageName: node linkType: hard "@types/node@npm:*, @types/node@npm:^20.5.9, @types/node@npm:^20.6.0": - version: 20.9.0 - resolution: "@types/node@npm:20.9.0" + version: 20.11.16 + resolution: "@types/node@npm:20.11.16" dependencies: undici-types: "npm:~5.26.4" - checksum: 755d07de735eafda4e20af75ad9d03bdbfddef327d790e9a896142eac7493db5d8501591376e1c8227aa12eeb88e522bc727c6024504842ed40e539e8a466db9 + checksum: 10c0/4886b90278e9c877a84efd3edd4667cd990e032d77268d2a798b99ebc1901ea336fa7dfbe9eaf4ad6ad1da9ce2ec31baf300038a3905838692362eb19904ebde languageName: node linkType: hard "@types/stack-utils@npm:^2.0.0": version: 2.0.3 resolution: "@types/stack-utils@npm:2.0.3" - checksum: 1f4658385ae936330581bcb8aa3a066df03867d90281cdf89cc356d404bd6579be0f11902304e1f775d92df22c6dd761d4451c804b0a4fba973e06211e9bd77c + checksum: 10c0/1f4658385ae936330581bcb8aa3a066df03867d90281cdf89cc356d404bd6579be0f11902304e1f775d92df22c6dd761d4451c804b0a4fba973e06211e9bd77c languageName: node linkType: hard "@types/yargs-parser@npm:*": version: 21.0.3 resolution: "@types/yargs-parser@npm:21.0.3" - checksum: e71c3bd9d0b73ca82e10bee2064c384ab70f61034bbfb78e74f5206283fc16a6d85267b606b5c22cb2a3338373586786fed595b2009825d6a9115afba36560a0 + checksum: 10c0/e71c3bd9d0b73ca82e10bee2064c384ab70f61034bbfb78e74f5206283fc16a6d85267b606b5c22cb2a3338373586786fed595b2009825d6a9115afba36560a0 languageName: node linkType: hard "@types/yargs@npm:^17.0.8": - version: 17.0.31 - resolution: "@types/yargs@npm:17.0.31" + version: 17.0.32 + resolution: "@types/yargs@npm:17.0.32" dependencies: "@types/yargs-parser": "npm:*" - checksum: 1e04df99bd0ad8ac8b3748b6ac0e99a9a4efe20b9cd8eab69ac9503fe87ab9bec312ad56982e969cdb0e2c0679431434ad571f6934049adb15fa35b22810c867 + checksum: 10c0/2095e8aad8a4e66b86147415364266b8d607a3b95b4239623423efd7e29df93ba81bb862784a6e08664f645cc1981b25fd598f532019174cd3e5e1e689e1cccf languageName: node linkType: hard "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" - checksum: f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 + checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 languageName: node linkType: hard "acorn-walk@npm:^8.1.1": - version: 8.3.0 - resolution: "acorn-walk@npm:8.3.0" - checksum: 24346e595f507b6e704a60d35f3c5e1aa9891d4fb6a3fc3d856503ab718cc26cabb5e3e1ff0ff8da6ec03d60a8226ebdb602805a94f970e7f797ea3b8b09437f + version: 8.3.2 + resolution: "acorn-walk@npm:8.3.2" + checksum: 10c0/7e2a8dad5480df7f872569b9dccff2f3da7e65f5353686b1d6032ab9f4ddf6e3a2cb83a9b52cf50b1497fd522154dda92f0abf7153290cc79cd14721ff121e52 languageName: node linkType: hard "acorn@npm:^8.4.1": - version: 8.11.2 - resolution: "acorn@npm:8.11.2" + version: 8.11.3 + resolution: "acorn@npm:8.11.3" bin: acorn: bin/acorn - checksum: a3ed76c761b75ec54b1ec3068fb7f113a182e95aea7f322f65098c2958d232e3d211cb6dac35ff9c647024b63714bc528a26d54a925d1fef2c25585b4c8e4017 + checksum: 10c0/3ff155f8812e4a746fee8ecff1f227d527c4c45655bb1fad6347c3cb58e46190598217551b1500f18542d2bbe5c87120cb6927f5a074a59166fbdd9468f0a299 languageName: node linkType: hard @@ -1023,7 +1030,7 @@ __metadata: resolution: "agent-base@npm:7.1.0" dependencies: debug: "npm:^4.3.4" - checksum: fc974ab57ffdd8421a2bc339644d312a9cca320c20c3393c9d8b1fd91731b9bbabdb985df5fc860f5b79d81c3e350daa3fcb31c5c07c0bb385aafc817df004ce + checksum: 10c0/fc974ab57ffdd8421a2bc339644d312a9cca320c20c3393c9d8b1fd91731b9bbabdb985df5fc860f5b79d81c3e350daa3fcb31c5c07c0bb385aafc817df004ce languageName: node linkType: hard @@ -1033,7 +1040,7 @@ __metadata: dependencies: clean-stack: "npm:^2.0.0" indent-string: "npm:^4.0.0" - checksum: a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039 + checksum: 10c0/a42f67faa79e3e6687a4923050e7c9807db3848a037076f791d10e092677d65c1d2d863b7848560699f40fc0502c19f40963fb1cd1fb3d338a7423df8e45e039 languageName: node linkType: hard @@ -1042,21 +1049,21 @@ __metadata: resolution: "ansi-escapes@npm:4.3.2" dependencies: type-fest: "npm:^0.21.3" - checksum: da917be01871525a3dfcf925ae2977bc59e8c513d4423368645634bf5d4ceba5401574eb705c1e92b79f7292af5a656f78c5725a4b0e1cec97c4b413705c1d50 + checksum: 10c0/da917be01871525a3dfcf925ae2977bc59e8c513d4423368645634bf5d4ceba5401574eb705c1e92b79f7292af5a656f78c5725a4b0e1cec97c4b413705c1d50 languageName: node linkType: hard "ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" - checksum: 9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 + checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 languageName: node linkType: hard "ansi-regex@npm:^6.0.1": version: 6.0.1 resolution: "ansi-regex@npm:6.0.1" - checksum: cbe16dbd2c6b2735d1df7976a7070dd277326434f0212f43abf6d87674095d247968209babdaad31bb00882fa68807256ba9be340eec2f1004de14ca75f52a08 + checksum: 10c0/cbe16dbd2c6b2735d1df7976a7070dd277326434f0212f43abf6d87674095d247968209babdaad31bb00882fa68807256ba9be340eec2f1004de14ca75f52a08 languageName: node linkType: hard @@ -1065,7 +1072,7 @@ __metadata: resolution: "ansi-styles@npm:3.2.1" dependencies: color-convert: "npm:^1.9.0" - checksum: ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b + checksum: 10c0/ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b languageName: node linkType: hard @@ -1074,21 +1081,21 @@ __metadata: resolution: "ansi-styles@npm:4.3.0" dependencies: color-convert: "npm:^2.0.1" - checksum: 895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 + checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 languageName: node linkType: hard "ansi-styles@npm:^5.0.0": version: 5.2.0 resolution: "ansi-styles@npm:5.2.0" - checksum: 9c4ca80eb3c2fb7b33841c210d2f20807f40865d27008d7c3f707b7f95cab7d67462a565e2388ac3285b71cb3d9bb2173de8da37c57692a362885ec34d6e27df + checksum: 10c0/9c4ca80eb3c2fb7b33841c210d2f20807f40865d27008d7c3f707b7f95cab7d67462a565e2388ac3285b71cb3d9bb2173de8da37c57692a362885ec34d6e27df languageName: node linkType: hard "ansi-styles@npm:^6.1.0": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" - checksum: 5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c + checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c languageName: node linkType: hard @@ -1098,14 +1105,14 @@ __metadata: dependencies: normalize-path: "npm:^3.0.0" picomatch: "npm:^2.0.4" - checksum: 57b06ae984bc32a0d22592c87384cd88fe4511b1dd7581497831c56d41939c8a001b28e7b853e1450f2bf61992dfcaa8ae2d0d161a0a90c4fb631ef07098fbac + checksum: 10c0/57b06ae984bc32a0d22592c87384cd88fe4511b1dd7581497831c56d41939c8a001b28e7b853e1450f2bf61992dfcaa8ae2d0d161a0a90c4fb631ef07098fbac languageName: node linkType: hard "arg@npm:^4.1.0": version: 4.1.3 resolution: "arg@npm:4.1.3" - checksum: 070ff801a9d236a6caa647507bdcc7034530604844d64408149a26b9e87c2f97650055c0f049abd1efc024b334635c01f29e0b632b371ac3f26130f4cf65997a + checksum: 10c0/070ff801a9d236a6caa647507bdcc7034530604844d64408149a26b9e87c2f97650055c0f049abd1efc024b334635c01f29e0b632b371ac3f26130f4cf65997a languageName: node linkType: hard @@ -1114,7 +1121,7 @@ __metadata: resolution: "argparse@npm:1.0.10" dependencies: sprintf-js: "npm:~1.0.2" - checksum: b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de + checksum: 10c0/b2972c5c23c63df66bca144dbc65d180efa74f25f8fd9b7d9a0a6c88ae839db32df3d54770dcb6460cf840d232b60695d1a6b1053f599d84e73f7437087712de languageName: node linkType: hard @@ -1131,7 +1138,7 @@ __metadata: slash: "npm:^3.0.0" peerDependencies: "@babel/core": ^7.8.0 - checksum: 2eda9c1391e51936ca573dd1aedfee07b14c59b33dbe16ef347873ddd777bcf6e2fc739681e9e9661ab54ef84a3109a03725be2ac32cd2124c07ea4401cbe8c1 + checksum: 10c0/2eda9c1391e51936ca573dd1aedfee07b14c59b33dbe16ef347873ddd777bcf6e2fc739681e9e9661ab54ef84a3109a03725be2ac32cd2124c07ea4401cbe8c1 languageName: node linkType: hard @@ -1144,7 +1151,7 @@ __metadata: "@istanbuljs/schema": "npm:^0.1.2" istanbul-lib-instrument: "npm:^5.0.4" test-exclude: "npm:^6.0.0" - checksum: 1075657feb705e00fd9463b329921856d3775d9867c5054b449317d39153f8fbcebd3e02ebf00432824e647faff3683a9ca0a941325ef1afe9b3c4dd51b24beb + checksum: 10c0/1075657feb705e00fd9463b329921856d3775d9867c5054b449317d39153f8fbcebd3e02ebf00432824e647faff3683a9ca0a941325ef1afe9b3c4dd51b24beb languageName: node linkType: hard @@ -1156,7 +1163,7 @@ __metadata: "@babel/types": "npm:^7.3.3" "@types/babel__core": "npm:^7.1.14" "@types/babel__traverse": "npm:^7.0.6" - checksum: 7e6451caaf7dce33d010b8aafb970e62f1b0c0b57f4978c37b0d457bbcf0874d75a395a102daf0bae0bd14eafb9f6e9a165ee5e899c0a4f1f3bb2e07b304ed2e + checksum: 10c0/7e6451caaf7dce33d010b8aafb970e62f1b0c0b57f4978c37b0d457bbcf0874d75a395a102daf0bae0bd14eafb9f6e9a165ee5e899c0a4f1f3bb2e07b304ed2e languageName: node linkType: hard @@ -1178,7 +1185,7 @@ __metadata: "@babel/plugin-syntax-top-level-await": "npm:^7.8.3" peerDependencies: "@babel/core": ^7.0.0 - checksum: 5ba39a3a0e6c37d25e56a4fb843be632dac98d54706d8a0933f9bcb1a07987a96d55c2b5a6c11788a74063fb2534fe68c1f1dbb6c93626850c785e0938495627 + checksum: 10c0/5ba39a3a0e6c37d25e56a4fb843be632dac98d54706d8a0933f9bcb1a07987a96d55c2b5a6c11788a74063fb2534fe68c1f1dbb6c93626850c785e0938495627 languageName: node linkType: hard @@ -1190,14 +1197,14 @@ __metadata: babel-preset-current-node-syntax: "npm:^1.0.0" peerDependencies: "@babel/core": ^7.0.0 - checksum: ec5fd0276b5630b05f0c14bb97cc3815c6b31600c683ebb51372e54dcb776cff790bdeeabd5b8d01ede375a040337ccbf6a3ccd68d3a34219125945e167ad943 + checksum: 10c0/ec5fd0276b5630b05f0c14bb97cc3815c6b31600c683ebb51372e54dcb776cff790bdeeabd5b8d01ede375a040337ccbf6a3ccd68d3a34219125945e167ad943 languageName: node linkType: hard "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" - checksum: 9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee + checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee languageName: node linkType: hard @@ -1207,7 +1214,7 @@ __metadata: dependencies: balanced-match: "npm:^1.0.0" concat-map: "npm:0.0.1" - checksum: 695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 + checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 languageName: node linkType: hard @@ -1216,7 +1223,7 @@ __metadata: resolution: "brace-expansion@npm:2.0.1" dependencies: balanced-match: "npm:^1.0.0" - checksum: b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f + checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f languageName: node linkType: hard @@ -1225,21 +1232,21 @@ __metadata: resolution: "braces@npm:3.0.2" dependencies: fill-range: "npm:^7.0.1" - checksum: 321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 + checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 languageName: node linkType: hard -"browserslist@npm:^4.21.9": - version: 4.22.1 - resolution: "browserslist@npm:4.22.1" +"browserslist@npm:^4.22.2": + version: 4.22.3 + resolution: "browserslist@npm:4.22.3" dependencies: - caniuse-lite: "npm:^1.0.30001541" - electron-to-chromium: "npm:^1.4.535" - node-releases: "npm:^2.0.13" + caniuse-lite: "npm:^1.0.30001580" + electron-to-chromium: "npm:^1.4.648" + node-releases: "npm:^2.0.14" update-browserslist-db: "npm:^1.0.13" bin: browserslist: cli.js - checksum: 6810f2d63f171d0b7b8d38cf091708e00cb31525501810a507839607839320d66e657293b0aa3d7f051ecbc025cb07390a90c037682c1d05d12604991e41050b + checksum: 10c0/5a1f673ce0d6e61a68369835a6b66e199669bde02c3bed5ec51e77598d8daafd91719dba55b15af2021b9ad0bbaa94951fd702eb71087449eb28be8002815ece languageName: node linkType: hard @@ -1248,7 +1255,7 @@ __metadata: resolution: "bs-logger@npm:0.2.6" dependencies: fast-json-stable-stringify: "npm:2.x" - checksum: 80e89aaaed4b68e3374ce936f2eb097456a0dddbf11f75238dbd53140b1e39259f0d248a5089ed456f1158984f22191c3658d54a713982f676709fbe1a6fa5a0 + checksum: 10c0/80e89aaaed4b68e3374ce936f2eb097456a0dddbf11f75238dbd53140b1e39259f0d248a5089ed456f1158984f22191c3658d54a713982f676709fbe1a6fa5a0 languageName: node linkType: hard @@ -1257,62 +1264,62 @@ __metadata: resolution: "bser@npm:2.1.1" dependencies: node-int64: "npm:^0.4.0" - checksum: 24d8dfb7b6d457d73f32744e678a60cc553e4ec0e9e1a01cf614b44d85c3c87e188d3cc78ef0442ce5032ee6818de20a0162ba1074725c0d08908f62ea979227 + checksum: 10c0/24d8dfb7b6d457d73f32744e678a60cc553e4ec0e9e1a01cf614b44d85c3c87e188d3cc78ef0442ce5032ee6818de20a0162ba1074725c0d08908f62ea979227 languageName: node linkType: hard "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" - checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 + checksum: 10c0/124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 languageName: node linkType: hard "cacache@npm:^18.0.0": - version: 18.0.0 - resolution: "cacache@npm:18.0.0" + version: 18.0.2 + resolution: "cacache@npm:18.0.2" dependencies: "@npmcli/fs": "npm:^3.1.0" fs-minipass: "npm:^3.0.0" glob: "npm:^10.2.2" lru-cache: "npm:^10.0.1" minipass: "npm:^7.0.3" - minipass-collect: "npm:^1.0.2" + minipass-collect: "npm:^2.0.1" minipass-flush: "npm:^1.0.5" minipass-pipeline: "npm:^1.2.4" p-map: "npm:^4.0.0" ssri: "npm:^10.0.0" tar: "npm:^6.1.11" unique-filename: "npm:^3.0.0" - checksum: e359823778d712ad365740cef3f488d4f74c62cc79be5935896d9597a7d81033e50c54c15898fa9cc018620879307ab30d1dddc476ae705bfd5b29c145ae6938 + checksum: 10c0/7992665305cc251a984f4fdbab1449d50e88c635bc43bf2785530c61d239c61b349e5734461baa461caaee65f040ab14e2d58e694f479c0810cffd181ba5eabc languageName: node linkType: hard "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" - checksum: fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 + checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 languageName: node linkType: hard "camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" - checksum: 92ff9b443bfe8abb15f2b1513ca182d16126359ad4f955ebc83dc4ddcc4ef3fdd2c078bc223f2673dc223488e75c99b16cc4d056624374b799e6a1555cf61b23 + checksum: 10c0/92ff9b443bfe8abb15f2b1513ca182d16126359ad4f955ebc83dc4ddcc4ef3fdd2c078bc223f2673dc223488e75c99b16cc4d056624374b799e6a1555cf61b23 languageName: node linkType: hard "camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" - checksum: 0d701658219bd3116d12da3eab31acddb3f9440790c0792e0d398f0a520a6a4058018e546862b6fba89d7ae990efaeb97da71e1913e9ebf5a8b5621a3d55c710 + checksum: 10c0/0d701658219bd3116d12da3eab31acddb3f9440790c0792e0d398f0a520a6a4058018e546862b6fba89d7ae990efaeb97da71e1913e9ebf5a8b5621a3d55c710 languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001541": - version: 1.0.30001561 - resolution: "caniuse-lite@npm:1.0.30001561" - checksum: 6e84c84026fee53edbdbb5aded7a04a036aae4c2e367cf6bdc90c6783a591e2fdcfcdebcc4e774aca61092e542a61200c8c16b06659396492426033c4dbcc618 +"caniuse-lite@npm:^1.0.30001580": + version: 1.0.30001584 + resolution: "caniuse-lite@npm:1.0.30001584" + checksum: 10c0/9f353d7b14ea218bf90f9aa908947be1119f3744bb4080aeef59dd2fbca2ca663a6eecad29deba41f7d02ef9f516240353809f31208396a1ec9824b515467d87 languageName: node linkType: hard @@ -1323,7 +1330,7 @@ __metadata: ansi-styles: "npm:^3.2.1" escape-string-regexp: "npm:^1.0.5" supports-color: "npm:^5.3.0" - checksum: e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073 + checksum: 10c0/e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073 languageName: node linkType: hard @@ -1333,42 +1340,42 @@ __metadata: dependencies: ansi-styles: "npm:^4.1.0" supports-color: "npm:^7.1.0" - checksum: 4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 + checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 languageName: node linkType: hard "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" - checksum: 57a09a86371331e0be35d9083ba429e86c4f4648ecbe27455dbfb343037c16ee6fdc7f6b61f433a57cc5ded5561d71c56a150e018f40c2ffb7bc93a26dae341e + checksum: 10c0/57a09a86371331e0be35d9083ba429e86c4f4648ecbe27455dbfb343037c16ee6fdc7f6b61f433a57cc5ded5561d71c56a150e018f40c2ffb7bc93a26dae341e languageName: node linkType: hard "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" - checksum: 594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 + checksum: 10c0/594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 languageName: node linkType: hard "ci-info@npm:^3.2.0": version: 3.9.0 resolution: "ci-info@npm:3.9.0" - checksum: 6f0109e36e111684291d46123d491bc4e7b7a1934c3a20dea28cba89f1d4a03acd892f5f6a81ed3855c38647e285a150e3c9ba062e38943bef57fee6c1554c3a + checksum: 10c0/6f0109e36e111684291d46123d491bc4e7b7a1934c3a20dea28cba89f1d4a03acd892f5f6a81ed3855c38647e285a150e3c9ba062e38943bef57fee6c1554c3a languageName: node linkType: hard "cjs-module-lexer@npm:^1.0.0": version: 1.2.3 resolution: "cjs-module-lexer@npm:1.2.3" - checksum: 0de9a9c3fad03a46804c0d38e7b712fb282584a9c7ef1ed44cae22fb71d9bb600309d66a9711ac36a596fd03422f5bb03e021e8f369c12a39fa1786ae531baab + checksum: 10c0/0de9a9c3fad03a46804c0d38e7b712fb282584a9c7ef1ed44cae22fb71d9bb600309d66a9711ac36a596fd03422f5bb03e021e8f369c12a39fa1786ae531baab languageName: node linkType: hard "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" - checksum: 1f90262d5f6230a17e27d0c190b09d47ebe7efdd76a03b5a1127863f7b3c9aec4c3e6c8bb3a7bbf81d553d56a1fd35728f5a8ef4c63f867ac8d690109742a8c1 + checksum: 10c0/1f90262d5f6230a17e27d0c190b09d47ebe7efdd76a03b5a1127863f7b3c9aec4c3e6c8bb3a7bbf81d553d56a1fd35728f5a8ef4c63f867ac8d690109742a8c1 languageName: node linkType: hard @@ -1379,21 +1386,21 @@ __metadata: string-width: "npm:^4.2.0" strip-ansi: "npm:^6.0.1" wrap-ansi: "npm:^7.0.0" - checksum: 4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 + checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 languageName: node linkType: hard "co@npm:^4.6.0": version: 4.6.0 resolution: "co@npm:4.6.0" - checksum: c0e85ea0ca8bf0a50cbdca82efc5af0301240ca88ebe3644a6ffb8ffe911f34d40f8fbcf8f1d52c5ddd66706abd4d3bfcd64259f1e8e2371d4f47573b0dc8c28 + checksum: 10c0/c0e85ea0ca8bf0a50cbdca82efc5af0301240ca88ebe3644a6ffb8ffe911f34d40f8fbcf8f1d52c5ddd66706abd4d3bfcd64259f1e8e2371d4f47573b0dc8c28 languageName: node linkType: hard "collect-v8-coverage@npm:^1.0.0": version: 1.0.2 resolution: "collect-v8-coverage@npm:1.0.2" - checksum: ed7008e2e8b6852c5483b444a3ae6e976e088d4335a85aa0a9db2861c5f1d31bd2d7ff97a60469b3388deeba661a619753afbe201279fb159b4b9548ab8269a1 + checksum: 10c0/ed7008e2e8b6852c5483b444a3ae6e976e088d4335a85aa0a9db2861c5f1d31bd2d7ff97a60469b3388deeba661a619753afbe201279fb159b4b9548ab8269a1 languageName: node linkType: hard @@ -1402,7 +1409,7 @@ __metadata: resolution: "color-convert@npm:1.9.3" dependencies: color-name: "npm:1.1.3" - checksum: 5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c + checksum: 10c0/5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c languageName: node linkType: hard @@ -1411,42 +1418,42 @@ __metadata: resolution: "color-convert@npm:2.0.1" dependencies: color-name: "npm:~1.1.4" - checksum: 37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 + checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 languageName: node linkType: hard "color-name@npm:1.1.3": version: 1.1.3 resolution: "color-name@npm:1.1.3" - checksum: 566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6 + checksum: 10c0/566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6 languageName: node linkType: hard "color-name@npm:~1.1.4": version: 1.1.4 resolution: "color-name@npm:1.1.4" - checksum: a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 + checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 languageName: node linkType: hard "commander@npm:^9.4.1": version: 9.5.0 resolution: "commander@npm:9.5.0" - checksum: 5f7784fbda2aaec39e89eb46f06a999e00224b3763dc65976e05929ec486e174fe9aac2655f03ba6a5e83875bd173be5283dc19309b7c65954701c02025b3c1d + checksum: 10c0/5f7784fbda2aaec39e89eb46f06a999e00224b3763dc65976e05929ec486e174fe9aac2655f03ba6a5e83875bd173be5283dc19309b7c65954701c02025b3c1d languageName: node linkType: hard "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" - checksum: c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f + checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f languageName: node linkType: hard "convert-source-map@npm:^2.0.0": version: 2.0.0 resolution: "convert-source-map@npm:2.0.0" - checksum: 8f2f7a27a1a011cc6cc88cc4da2d7d0cfa5ee0369508baae3d98c260bb3ac520691464e5bbe4ae7cdf09860c1d69ecc6f70c63c6e7c7f7e3f18ec08484dc7d9b + checksum: 10c0/8f2f7a27a1a011cc6cc88cc4da2d7d0cfa5ee0369508baae3d98c260bb3ac520691464e5bbe4ae7cdf09860c1d69ecc6f70c63c6e7c7f7e3f18ec08484dc7d9b languageName: node linkType: hard @@ -1463,14 +1470,14 @@ __metadata: prompts: "npm:^2.0.1" bin: create-jest: bin/create-jest.js - checksum: e7e54c280692470d3398f62a6238fd396327e01c6a0757002833f06d00afc62dd7bfe04ff2b9cd145264460e6b4d1eb8386f2925b7e567f97939843b7b0e812f + checksum: 10c0/e7e54c280692470d3398f62a6238fd396327e01c6a0757002833f06d00afc62dd7bfe04ff2b9cd145264460e6b4d1eb8386f2925b7e567f97939843b7b0e812f languageName: node linkType: hard "create-require@npm:^1.1.0": version: 1.1.1 resolution: "create-require@npm:1.1.1" - checksum: 157cbc59b2430ae9a90034a5f3a1b398b6738bf510f713edc4d4e45e169bc514d3d99dd34d8d01ca7ae7830b5b8b537e46ae8f3c8f932371b0875c0151d7ec91 + checksum: 10c0/157cbc59b2430ae9a90034a5f3a1b398b6738bf510f713edc4d4e45e169bc514d3d99dd34d8d01ca7ae7830b5b8b537e46ae8f3c8f932371b0875c0151d7ec91 languageName: node linkType: hard @@ -1481,11 +1488,11 @@ __metadata: path-key: "npm:^3.1.0" shebang-command: "npm:^2.0.0" which: "npm:^2.0.1" - checksum: 5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 + checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -1493,7 +1500,7 @@ __metadata: peerDependenciesMeta: supports-color: optional: true - checksum: cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736 + checksum: 10c0/cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736 languageName: node linkType: hard @@ -1505,70 +1512,70 @@ __metadata: peerDependenciesMeta: babel-plugin-macros: optional: true - checksum: f8612cd5b00aab58b18bb95572dca08dc2d49720bfa7201a444c3dae430291e8a06d4928614a6ec8764d713927f44bce9c990d3b8238fca2f430990ddc17c070 + checksum: 10c0/f8612cd5b00aab58b18bb95572dca08dc2d49720bfa7201a444c3dae430291e8a06d4928614a6ec8764d713927f44bce9c990d3b8238fca2f430990ddc17c070 languageName: node linkType: hard "deepmerge@npm:^4.2.2": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" - checksum: e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044 + checksum: 10c0/e53481aaf1aa2c4082b5342be6b6d8ad9dfe387bc92ce197a66dea08bd4265904a087e75e464f14d1347cf2ac8afe1e4c16b266e0561cc5df29382d3c5f80044 languageName: node linkType: hard "detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" - checksum: c38cfc8eeb9fda09febb44bcd85e467c970d4e3bf526095394e5a4f18bc26dd0cf6b22c69c1fa9969261521c593836db335c2795218f6d781a512aea2fb8209d + checksum: 10c0/c38cfc8eeb9fda09febb44bcd85e467c970d4e3bf526095394e5a4f18bc26dd0cf6b22c69c1fa9969261521c593836db335c2795218f6d781a512aea2fb8209d languageName: node linkType: hard "diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" - checksum: 32e27ac7dbffdf2fb0eb5a84efd98a9ad084fbabd5ac9abb8757c6770d5320d2acd172830b28c4add29bb873d59420601dfc805ac4064330ce59b1adfd0593b2 + checksum: 10c0/32e27ac7dbffdf2fb0eb5a84efd98a9ad084fbabd5ac9abb8757c6770d5320d2acd172830b28c4add29bb873d59420601dfc805ac4064330ce59b1adfd0593b2 languageName: node linkType: hard "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" - checksum: 81b91f9d39c4eaca068eb0c1eb0e4afbdc5bb2941d197f513dd596b820b956fef43485876226d65d497bebc15666aa2aa82c679e84f65d5f2bfbf14ee46e32c1 + checksum: 10c0/81b91f9d39c4eaca068eb0c1eb0e4afbdc5bb2941d197f513dd596b820b956fef43485876226d65d497bebc15666aa2aa82c679e84f65d5f2bfbf14ee46e32c1 languageName: node linkType: hard "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" - checksum: 26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 + checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.535": - version: 1.4.579 - resolution: "electron-to-chromium@npm:1.4.579" - checksum: 71c8b603db172b06338bc84747e99f06b398b3299eb4a677c9f48ed40aab1bc225b8c59199951450ae198e1f904a6fc6a87578db16eb7fadf716518759718e1c +"electron-to-chromium@npm:^1.4.648": + version: 1.4.659 + resolution: "electron-to-chromium@npm:1.4.659" + checksum: 10c0/84658e98fed674812fc3819a4690bc38ffb5b3f9503752f068b5980a8b80de01acd4b713f0bb408f43c8c080ec80e626a58c62bca9d51bf2dcc67d3f5923930f languageName: node linkType: hard "emittery@npm:^0.13.1": version: 0.13.1 resolution: "emittery@npm:0.13.1" - checksum: 1573d0ae29ab34661b6c63251ff8f5facd24ccf6a823f19417ae8ba8c88ea450325788c67f16c99edec8de4b52ce93a10fe441ece389fd156e88ee7dab9bfa35 + checksum: 10c0/1573d0ae29ab34661b6c63251ff8f5facd24ccf6a823f19417ae8ba8c88ea450325788c67f16c99edec8de4b52ce93a10fe441ece389fd156e88ee7dab9bfa35 languageName: node linkType: hard "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" - checksum: b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 + checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 languageName: node linkType: hard "emoji-regex@npm:^9.2.2": version: 9.2.2 resolution: "emoji-regex@npm:9.2.2" - checksum: af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 + checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 languageName: node linkType: hard @@ -1577,21 +1584,21 @@ __metadata: resolution: "encoding@npm:0.1.13" dependencies: iconv-lite: "npm:^0.6.2" - checksum: 36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 + checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 languageName: node linkType: hard "env-paths@npm:^2.2.0": version: 2.2.1 resolution: "env-paths@npm:2.2.1" - checksum: 285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 + checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 languageName: node linkType: hard "err-code@npm:^2.0.2": version: 2.0.3 resolution: "err-code@npm:2.0.3" - checksum: b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 + checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 languageName: node linkType: hard @@ -1600,28 +1607,28 @@ __metadata: resolution: "error-ex@npm:1.3.2" dependencies: is-arrayish: "npm:^0.2.1" - checksum: ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce + checksum: 10c0/ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce languageName: node linkType: hard "escalade@npm:^3.1.1": - version: 3.1.1 - resolution: "escalade@npm:3.1.1" - checksum: afd02e6ca91ffa813e1108b5e7756566173d6bc0d1eb951cb44d6b21702ec17c1cf116cfe75d4a2b02e05acb0b808a7a9387d0d1ca5cf9c04ad03a8445c3e46d + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 10c0/6b4adafecd0682f3aa1cd1106b8fff30e492c7015b178bc81b2d2f75106dabea6c6d6e8508fc491bd58e597c74abb0e8e2368f943ecb9393d4162e3c2f3cf287 languageName: node linkType: hard "escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" - checksum: a968ad453dd0c2724e14a4f20e177aaf32bb384ab41b674a8454afe9a41c5e6fe8903323e0a1052f56289d04bd600f81278edf140b0fcc02f5cac98d0f5b5371 + checksum: 10c0/a968ad453dd0c2724e14a4f20e177aaf32bb384ab41b674a8454afe9a41c5e6fe8903323e0a1052f56289d04bd600f81278edf140b0fcc02f5cac98d0f5b5371 languageName: node linkType: hard "escape-string-regexp@npm:^2.0.0": version: 2.0.0 resolution: "escape-string-regexp@npm:2.0.0" - checksum: 2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507 + checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507 languageName: node linkType: hard @@ -1631,7 +1638,7 @@ __metadata: bin: esparse: ./bin/esparse.js esvalidate: ./bin/esvalidate.js - checksum: ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 + checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 languageName: node linkType: hard @@ -1648,14 +1655,14 @@ __metadata: onetime: "npm:^5.1.2" signal-exit: "npm:^3.0.3" strip-final-newline: "npm:^2.0.0" - checksum: c8e615235e8de4c5addf2fa4c3da3e3aa59ce975a3e83533b4f6a71750fb816a2e79610dc5f1799b6e28976c9ae86747a36a606655bf8cb414a74d8d507b304f + checksum: 10c0/c8e615235e8de4c5addf2fa4c3da3e3aa59ce975a3e83533b4f6a71750fb816a2e79610dc5f1799b6e28976c9ae86747a36a606655bf8cb414a74d8d507b304f languageName: node linkType: hard "exit@npm:^0.1.2": version: 0.1.2 resolution: "exit@npm:0.1.2" - checksum: 71d2ad9b36bc25bb8b104b17e830b40a08989be7f7d100b13269aaae7c3784c3e6e1e88a797e9e87523993a25ba27c8958959a554535370672cfb4d824af8989 + checksum: 10c0/71d2ad9b36bc25bb8b104b17e830b40a08989be7f7d100b13269aaae7c3784c3e6e1e88a797e9e87523993a25ba27c8958959a554535370672cfb4d824af8989 languageName: node linkType: hard @@ -1668,21 +1675,21 @@ __metadata: jest-matcher-utils: "npm:^29.7.0" jest-message-util: "npm:^29.7.0" jest-util: "npm:^29.7.0" - checksum: 2eddeace66e68b8d8ee5f7be57f3014b19770caaf6815c7a08d131821da527fb8c8cb7b3dcd7c883d2d3d8d184206a4268984618032d1e4b16dc8d6596475d41 + checksum: 10c0/2eddeace66e68b8d8ee5f7be57f3014b19770caaf6815c7a08d131821da527fb8c8cb7b3dcd7c883d2d3d8d184206a4268984618032d1e4b16dc8d6596475d41 languageName: node linkType: hard "exponential-backoff@npm:^3.1.1": version: 3.1.1 resolution: "exponential-backoff@npm:3.1.1" - checksum: 160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 + checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 languageName: node linkType: hard "fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b + checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b languageName: node linkType: hard @@ -1691,7 +1698,7 @@ __metadata: resolution: "fb-watchman@npm:2.0.2" dependencies: bser: "npm:2.1.1" - checksum: feae89ac148adb8f6ae8ccd87632e62b13563e6fb114cacb5265c51f585b17e2e268084519fb2edd133872f1d47a18e6bfd7e5e08625c0d41b93149694187581 + checksum: 10c0/feae89ac148adb8f6ae8ccd87632e62b13563e6fb114cacb5265c51f585b17e2e268084519fb2edd133872f1d47a18e6bfd7e5e08625c0d41b93149694187581 languageName: node linkType: hard @@ -1700,7 +1707,7 @@ __metadata: resolution: "fill-range@npm:7.0.1" dependencies: to-regex-range: "npm:^5.0.1" - checksum: 7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f + checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f languageName: node linkType: hard @@ -1710,7 +1717,7 @@ __metadata: dependencies: locate-path: "npm:^5.0.0" path-exists: "npm:^4.0.0" - checksum: 0406ee89ebeefa2d507feb07ec366bebd8a6167ae74aa4e34fb4c4abd06cf782a3ce26ae4194d70706f72182841733f00551c209fe575cb00bd92104056e78c1 + checksum: 10c0/0406ee89ebeefa2d507feb07ec366bebd8a6167ae74aa4e34fb4c4abd06cf782a3ce26ae4194d70706f72182841733f00551c209fe575cb00bd92104056e78c1 languageName: node linkType: hard @@ -1720,7 +1727,7 @@ __metadata: dependencies: cross-spawn: "npm:^7.0.0" signal-exit: "npm:^4.0.1" - checksum: 9700a0285628abaeb37007c9a4d92bd49f67210f09067638774338e146c8e9c825c5c877f072b2f75f41dc6a2d0be8664f79ffc03f6576649f54a84fb9b47de0 + checksum: 10c0/9700a0285628abaeb37007c9a4d92bd49f67210f09067638774338e146c8e9c825c5c877f072b2f75f41dc6a2d0be8664f79ffc03f6576649f54a84fb9b47de0 languageName: node linkType: hard @@ -1729,7 +1736,7 @@ __metadata: resolution: "fs-minipass@npm:2.1.0" dependencies: minipass: "npm:^3.0.0" - checksum: 703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 + checksum: 10c0/703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 languageName: node linkType: hard @@ -1738,14 +1745,14 @@ __metadata: resolution: "fs-minipass@npm:3.0.3" dependencies: minipass: "npm:^7.0.3" - checksum: 63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 + checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 languageName: node linkType: hard "fs.realpath@npm:^1.0.0": version: 1.0.0 resolution: "fs.realpath@npm:1.0.0" - checksum: 444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948 + checksum: 10c0/444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948 languageName: node linkType: hard @@ -1754,7 +1761,7 @@ __metadata: resolution: "fsevents@npm:2.3.3" dependencies: node-gyp: "npm:latest" - checksum: a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 + checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 conditions: os=darwin languageName: node linkType: hard @@ -1771,35 +1778,35 @@ __metadata: "function-bind@npm:^1.1.2": version: 1.1.2 resolution: "function-bind@npm:1.1.2" - checksum: d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 + checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 languageName: node linkType: hard "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" - checksum: 782aba6cba65b1bb5af3b095d96249d20edbe8df32dbf4696fd49be2583faf676173bf4809386588828e4dd76a3354fcbeb577bab1c833ccd9fc4577f26103f8 + checksum: 10c0/782aba6cba65b1bb5af3b095d96249d20edbe8df32dbf4696fd49be2583faf676173bf4809386588828e4dd76a3354fcbeb577bab1c833ccd9fc4577f26103f8 languageName: node linkType: hard "get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" - checksum: c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde + checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde languageName: node linkType: hard "get-package-type@npm:^0.1.0": version: 0.1.0 resolution: "get-package-type@npm:0.1.0" - checksum: e34cdf447fdf1902a1f6d5af737eaadf606d2ee3518287abde8910e04159368c268568174b2e71102b87b26c2020486f126bfca9c4fb1ceb986ff99b52ecd1be + checksum: 10c0/e34cdf447fdf1902a1f6d5af737eaadf606d2ee3518287abde8910e04159368c268568174b2e71102b87b26c2020486f126bfca9c4fb1ceb986ff99b52ecd1be languageName: node linkType: hard "get-stream@npm:^6.0.0": version: 6.0.1 resolution: "get-stream@npm:6.0.1" - checksum: 49825d57d3fd6964228e6200a58169464b8e8970489b3acdc24906c782fb7f01f9f56f8e6653c4a50713771d6658f7cfe051e5eb8c12e334138c9c918b296341 + checksum: 10c0/49825d57d3fd6964228e6200a58169464b8e8970489b3acdc24906c782fb7f01f9f56f8e6653c4a50713771d6658f7cfe051e5eb8c12e334138c9c918b296341 languageName: node linkType: hard @@ -1814,7 +1821,7 @@ __metadata: path-scurry: "npm:^1.10.1" bin: glob: dist/esm/bin.mjs - checksum: 13d8a1feb7eac7945f8c8480e11cd4a44b24d26503d99a8d8ac8d5aefbf3e9802a2b6087318a829fad04cb4e829f25c5f4f1110c68966c498720dd261c7e344d + checksum: 10c0/13d8a1feb7eac7945f8c8480e11cd4a44b24d26503d99a8d8ac8d5aefbf3e9802a2b6087318a829fad04cb4e829f25c5f4f1110c68966c498720dd261c7e344d languageName: node linkType: hard @@ -1828,35 +1835,35 @@ __metadata: minimatch: "npm:^3.1.1" once: "npm:^1.3.0" path-is-absolute: "npm:^1.0.0" - checksum: 65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe + checksum: 10c0/65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe languageName: node linkType: hard "globals@npm:^11.1.0": version: 11.12.0 resolution: "globals@npm:11.12.0" - checksum: 758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1 + checksum: 10c0/758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1 languageName: node linkType: hard "graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" - checksum: 386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 + checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 languageName: node linkType: hard "has-flag@npm:^3.0.0": version: 3.0.0 resolution: "has-flag@npm:3.0.0" - checksum: 1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473 + checksum: 10c0/1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473 languageName: node linkType: hard "has-flag@npm:^4.0.0": version: 4.0.0 resolution: "has-flag@npm:4.0.0" - checksum: 2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 + checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 languageName: node linkType: hard @@ -1865,21 +1872,21 @@ __metadata: resolution: "hasown@npm:2.0.0" dependencies: function-bind: "npm:^1.1.2" - checksum: 5d415b114f410661208c95e7ab4879f1cc2765b8daceff4dc8718317d1cb7b9ffa7c5d1eafd9a4389c9aab7445d6ea88e05f3096cb1e529618b55304956b87fc + checksum: 10c0/5d415b114f410661208c95e7ab4879f1cc2765b8daceff4dc8718317d1cb7b9ffa7c5d1eafd9a4389c9aab7445d6ea88e05f3096cb1e529618b55304956b87fc languageName: node linkType: hard "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" - checksum: 208e8a12de1a6569edbb14544f4567e6ce8ecc30b9394fcaa4e7bb1e60c12a7c9a1ed27e31290817157e8626f3a4f29e76c8747030822eb84a6abb15c255f0a0 + checksum: 10c0/208e8a12de1a6569edbb14544f4567e6ce8ecc30b9394fcaa4e7bb1e60c12a7c9a1ed27e31290817157e8626f3a4f29e76c8747030822eb84a6abb15c255f0a0 languageName: node linkType: hard "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" - checksum: ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc + checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc languageName: node linkType: hard @@ -1889,7 +1896,7 @@ __metadata: dependencies: agent-base: "npm:^7.1.0" debug: "npm:^4.3.4" - checksum: a11574ff39436cee3c7bc67f259444097b09474605846ddd8edf0bf4ad8644be8533db1aa463426e376865047d05dc22755e638632819317c0c2f1b2196657c8 + checksum: 10c0/a11574ff39436cee3c7bc67f259444097b09474605846ddd8edf0bf4ad8644be8533db1aa463426e376865047d05dc22755e638632819317c0c2f1b2196657c8 languageName: node linkType: hard @@ -1899,14 +1906,14 @@ __metadata: dependencies: agent-base: "npm:^7.0.2" debug: "npm:4" - checksum: 7735eb90073db087e7e79312e3d97c8c04baf7ea7ca7b013382b6a45abbaa61b281041a98f4e13c8c80d88f843785bcc84ba189165b4b4087b1e3496ba656d77 + checksum: 10c0/7735eb90073db087e7e79312e3d97c8c04baf7ea7ca7b013382b6a45abbaa61b281041a98f4e13c8c80d88f843785bcc84ba189165b4b4087b1e3496ba656d77 languageName: node linkType: hard "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" - checksum: 695edb3edfcfe9c8b52a76926cd31b36978782062c0ed9b1192b36bebc75c4c87c82e178dfcb0ed0fc27ca59d434198aac0bd0be18f5781ded775604db22304a + checksum: 10c0/695edb3edfcfe9c8b52a76926cd31b36978782062c0ed9b1192b36bebc75c4c87c82e178dfcb0ed0fc27ca59d434198aac0bd0be18f5781ded775604db22304a languageName: node linkType: hard @@ -1915,7 +1922,7 @@ __metadata: resolution: "iconv-lite@npm:0.6.3" dependencies: safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 + checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 languageName: node linkType: hard @@ -1927,21 +1934,21 @@ __metadata: resolve-cwd: "npm:^3.0.0" bin: import-local-fixture: fixtures/cli.js - checksum: c67ecea72f775fe8684ca3d057e54bdb2ae28c14bf261d2607c269c18ea0da7b730924c06262eca9aed4b8ab31e31d65bc60b50e7296c85908a56e2f7d41ecd2 + checksum: 10c0/c67ecea72f775fe8684ca3d057e54bdb2ae28c14bf261d2607c269c18ea0da7b730924c06262eca9aed4b8ab31e31d65bc60b50e7296c85908a56e2f7d41ecd2 languageName: node linkType: hard "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" - checksum: 8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 + checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 languageName: node linkType: hard "indent-string@npm:^4.0.0": version: 4.0.0 resolution: "indent-string@npm:4.0.0" - checksum: 1e1904ddb0cb3d6cce7cd09e27a90184908b7a5d5c21b92e232c93579d314f0b83c246ffb035493d0504b1e9147ba2c9b21df0030f48673fba0496ecd698161f + checksum: 10c0/1e1904ddb0cb3d6cce7cd09e27a90184908b7a5d5c21b92e232c93579d314f0b83c246ffb035493d0504b1e9147ba2c9b21df0030f48673fba0496ecd698161f languageName: node linkType: hard @@ -1951,28 +1958,28 @@ __metadata: dependencies: once: "npm:^1.3.0" wrappy: "npm:1" - checksum: 7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2 + checksum: 10c0/7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2 languageName: node linkType: hard "inherits@npm:2": version: 2.0.4 resolution: "inherits@npm:2.0.4" - checksum: 4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 + checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 languageName: node linkType: hard "ip@npm:^2.0.0": version: 2.0.0 resolution: "ip@npm:2.0.0" - checksum: 8d186cc5585f57372847ae29b6eba258c68862055e18a75cc4933327232cb5c107f89800ce29715d542eef2c254fbb68b382e780a7414f9ee7caf60b7a473958 + checksum: 10c0/8d186cc5585f57372847ae29b6eba258c68862055e18a75cc4933327232cb5c107f89800ce29715d542eef2c254fbb68b382e780a7414f9ee7caf60b7a473958 languageName: node linkType: hard "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" - checksum: e7fb686a739068bb70f860b39b67afc62acc62e36bb61c5f965768abce1873b379c563e61dd2adad96ebb7edf6651111b385e490cf508378959b0ed4cac4e729 + checksum: 10c0/e7fb686a739068bb70f860b39b67afc62acc62e36bb61c5f965768abce1873b379c563e61dd2adad96ebb7edf6651111b385e490cf508378959b0ed4cac4e729 languageName: node linkType: hard @@ -1981,63 +1988,63 @@ __metadata: resolution: "is-core-module@npm:2.13.1" dependencies: hasown: "npm:^2.0.0" - checksum: 2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518 + checksum: 10c0/2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518 languageName: node linkType: hard "is-fullwidth-code-point@npm:^3.0.0": version: 3.0.0 resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc + checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc languageName: node linkType: hard "is-generator-fn@npm:^2.0.0": version: 2.1.0 resolution: "is-generator-fn@npm:2.1.0" - checksum: 2957cab387997a466cd0bf5c1b6047bd21ecb32bdcfd8996b15747aa01002c1c88731802f1b3d34ac99f4f6874b626418bd118658cf39380fe5fff32a3af9c4d + checksum: 10c0/2957cab387997a466cd0bf5c1b6047bd21ecb32bdcfd8996b15747aa01002c1c88731802f1b3d34ac99f4f6874b626418bd118658cf39380fe5fff32a3af9c4d languageName: node linkType: hard "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" - checksum: 85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d + checksum: 10c0/85fee098ae62ba6f1e24cf22678805473c7afd0fb3978a3aa260e354cb7bcb3a5806cf0a98403188465efedec41ab4348e8e4e79305d409601323855b3839d4d languageName: node linkType: hard "is-number@npm:^7.0.0": version: 7.0.0 resolution: "is-number@npm:7.0.0" - checksum: b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 + checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 languageName: node linkType: hard "is-stream@npm:^2.0.0": version: 2.0.1 resolution: "is-stream@npm:2.0.1" - checksum: 7c284241313fc6efc329b8d7f08e16c0efeb6baab1b4cd0ba579eb78e5af1aa5da11e68559896a2067cd6c526bd29241dda4eb1225e627d5aa1a89a76d4635a5 + checksum: 10c0/7c284241313fc6efc329b8d7f08e16c0efeb6baab1b4cd0ba579eb78e5af1aa5da11e68559896a2067cd6c526bd29241dda4eb1225e627d5aa1a89a76d4635a5 languageName: node linkType: hard "isexe@npm:^2.0.0": version: 2.0.0 resolution: "isexe@npm:2.0.0" - checksum: 228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d + checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d languageName: node linkType: hard "isexe@npm:^3.1.1": version: 3.1.1 resolution: "isexe@npm:3.1.1" - checksum: 9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 + checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 languageName: node linkType: hard "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": version: 3.2.2 resolution: "istanbul-lib-coverage@npm:3.2.2" - checksum: 6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b + checksum: 10c0/6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b languageName: node linkType: hard @@ -2050,7 +2057,7 @@ __metadata: "@istanbuljs/schema": "npm:^0.1.2" istanbul-lib-coverage: "npm:^3.2.0" semver: "npm:^6.3.0" - checksum: 8a1bdf3e377dcc0d33ec32fe2b6ecacdb1e4358fd0eb923d4326bb11c67622c0ceb99600a680f3dad5d29c66fc1991306081e339b4d43d0b8a2ab2e1d910a6ee + checksum: 10c0/8a1bdf3e377dcc0d33ec32fe2b6ecacdb1e4358fd0eb923d4326bb11c67622c0ceb99600a680f3dad5d29c66fc1991306081e339b4d43d0b8a2ab2e1d910a6ee languageName: node linkType: hard @@ -2063,7 +2070,7 @@ __metadata: "@istanbuljs/schema": "npm:^0.1.2" istanbul-lib-coverage: "npm:^3.2.0" semver: "npm:^7.5.4" - checksum: 313d61aca3f82a04ad9377841d05061d603ea3d4a4dd281fdda2479ec4ddbc86dc1792c73651f21c93480570d1ecadc5f63011e2df86f30ee662b62c0c00e3d8 + checksum: 10c0/313d61aca3f82a04ad9377841d05061d603ea3d4a4dd281fdda2479ec4ddbc86dc1792c73651f21c93480570d1ecadc5f63011e2df86f30ee662b62c0c00e3d8 languageName: node linkType: hard @@ -2074,7 +2081,7 @@ __metadata: istanbul-lib-coverage: "npm:^3.0.0" make-dir: "npm:^4.0.0" supports-color: "npm:^7.1.0" - checksum: 84323afb14392de8b6a5714bd7e9af845cfbd56cfe71ed276cda2f5f1201aea673c7111901227ee33e68e4364e288d73861eb2ed48f6679d1e69a43b6d9b3ba7 + checksum: 10c0/84323afb14392de8b6a5714bd7e9af845cfbd56cfe71ed276cda2f5f1201aea673c7111901227ee33e68e4364e288d73861eb2ed48f6679d1e69a43b6d9b3ba7 languageName: node linkType: hard @@ -2085,7 +2092,7 @@ __metadata: debug: "npm:^4.1.1" istanbul-lib-coverage: "npm:^3.0.0" source-map: "npm:^0.6.1" - checksum: 19e4cc405016f2c906dff271a76715b3e881fa9faeb3f09a86cb99b8512b3a5ed19cadfe0b54c17ca0e54c1142c9c6de9330d65506e35873994e06634eebeb66 + checksum: 10c0/19e4cc405016f2c906dff271a76715b3e881fa9faeb3f09a86cb99b8512b3a5ed19cadfe0b54c17ca0e54c1142c9c6de9330d65506e35873994e06634eebeb66 languageName: node linkType: hard @@ -2095,7 +2102,7 @@ __metadata: dependencies: html-escaper: "npm:^2.0.0" istanbul-lib-report: "npm:^3.0.0" - checksum: ec3f1bdbc51b3e0b325a5b9f4ad31a247697f31001df4e81075f7980413f14da1b5adfec574fd156efd3b0464023f61320f6718efc66ee72b32d89611cef99dd + checksum: 10c0/ec3f1bdbc51b3e0b325a5b9f4ad31a247697f31001df4e81075f7980413f14da1b5adfec574fd156efd3b0464023f61320f6718efc66ee72b32d89611cef99dd languageName: node linkType: hard @@ -2108,7 +2115,7 @@ __metadata: dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: f01d8f972d894cd7638bc338e9ef5ddb86f7b208ce177a36d718eac96ec86638a6efa17d0221b10073e64b45edc2ce15340db9380b1f5d5c5d000cbc517dc111 + checksum: 10c0/f01d8f972d894cd7638bc338e9ef5ddb86f7b208ce177a36d718eac96ec86638a6efa17d0221b10073e64b45edc2ce15340db9380b1f5d5c5d000cbc517dc111 languageName: node linkType: hard @@ -2119,7 +2126,7 @@ __metadata: execa: "npm:^5.0.0" jest-util: "npm:^29.7.0" p-limit: "npm:^3.1.0" - checksum: e071384d9e2f6bb462231ac53f29bff86f0e12394c1b49ccafbad225ce2ab7da226279a8a94f421949920bef9be7ef574fd86aee22e8adfa149be73554ab828b + checksum: 10c0/e071384d9e2f6bb462231ac53f29bff86f0e12394c1b49ccafbad225ce2ab7da226279a8a94f421949920bef9be7ef574fd86aee22e8adfa149be73554ab828b languageName: node linkType: hard @@ -2147,7 +2154,7 @@ __metadata: pure-rand: "npm:^6.0.0" slash: "npm:^3.0.0" stack-utils: "npm:^2.0.3" - checksum: 8d15344cf7a9f14e926f0deed64ed190c7a4fa1ed1acfcd81e4cc094d3cc5bf7902ebb7b874edc98ada4185688f90c91e1747e0dfd7ac12463b097968ae74b5e + checksum: 10c0/8d15344cf7a9f14e926f0deed64ed190c7a4fa1ed1acfcd81e4cc094d3cc5bf7902ebb7b874edc98ada4185688f90c91e1747e0dfd7ac12463b097968ae74b5e languageName: node linkType: hard @@ -2173,7 +2180,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: a658fd55050d4075d65c1066364595962ead7661711495cfa1dfeecf3d6d0a8ffec532f3dbd8afbb3e172dd5fd2fb2e813c5e10256e7cf2fea766314942fb43a + checksum: 10c0/a658fd55050d4075d65c1066364595962ead7661711495cfa1dfeecf3d6d0a8ffec532f3dbd8afbb3e172dd5fd2fb2e813c5e10256e7cf2fea766314942fb43a languageName: node linkType: hard @@ -2211,7 +2218,7 @@ __metadata: optional: true ts-node: optional: true - checksum: bab23c2eda1fff06e0d104b00d6adfb1d1aabb7128441899c9bff2247bd26710b050a5364281ce8d52b46b499153bf7e3ee88b19831a8f3451f1477a0246a0f1 + checksum: 10c0/bab23c2eda1fff06e0d104b00d6adfb1d1aabb7128441899c9bff2247bd26710b050a5364281ce8d52b46b499153bf7e3ee88b19831a8f3451f1477a0246a0f1 languageName: node linkType: hard @@ -2223,7 +2230,7 @@ __metadata: diff-sequences: "npm:^29.6.3" jest-get-type: "npm:^29.6.3" pretty-format: "npm:^29.7.0" - checksum: 89a4a7f182590f56f526443dde69acefb1f2f0c9e59253c61d319569856c4931eae66b8a3790c443f529267a0ddba5ba80431c585deed81827032b2b2a1fc999 + checksum: 10c0/89a4a7f182590f56f526443dde69acefb1f2f0c9e59253c61d319569856c4931eae66b8a3790c443f529267a0ddba5ba80431c585deed81827032b2b2a1fc999 languageName: node linkType: hard @@ -2232,7 +2239,7 @@ __metadata: resolution: "jest-docblock@npm:29.7.0" dependencies: detect-newline: "npm:^3.0.0" - checksum: d932a8272345cf6b6142bb70a2bb63e0856cc0093f082821577ea5bdf4643916a98744dfc992189d2b1417c38a11fa42466f6111526bc1fb81366f56410f3be9 + checksum: 10c0/d932a8272345cf6b6142bb70a2bb63e0856cc0093f082821577ea5bdf4643916a98744dfc992189d2b1417c38a11fa42466f6111526bc1fb81366f56410f3be9 languageName: node linkType: hard @@ -2245,7 +2252,7 @@ __metadata: jest-get-type: "npm:^29.6.3" jest-util: "npm:^29.7.0" pretty-format: "npm:^29.7.0" - checksum: f7f9a90ebee80cc688e825feceb2613627826ac41ea76a366fa58e669c3b2403d364c7c0a74d862d469b103c843154f8456d3b1c02b487509a12afa8b59edbb4 + checksum: 10c0/f7f9a90ebee80cc688e825feceb2613627826ac41ea76a366fa58e669c3b2403d364c7c0a74d862d469b103c843154f8456d3b1c02b487509a12afa8b59edbb4 languageName: node linkType: hard @@ -2259,14 +2266,14 @@ __metadata: "@types/node": "npm:*" jest-mock: "npm:^29.7.0" jest-util: "npm:^29.7.0" - checksum: 61f04fec077f8b1b5c1a633e3612fc0c9aa79a0ab7b05600683428f1e01a4d35346c474bde6f439f9fcc1a4aa9a2861ff852d079a43ab64b02105d1004b2592b + checksum: 10c0/61f04fec077f8b1b5c1a633e3612fc0c9aa79a0ab7b05600683428f1e01a4d35346c474bde6f439f9fcc1a4aa9a2861ff852d079a43ab64b02105d1004b2592b languageName: node linkType: hard "jest-get-type@npm:^29.6.3": version: 29.6.3 resolution: "jest-get-type@npm:29.6.3" - checksum: 552e7a97a983d3c2d4e412a44eb7de0430ff773dd99f7500962c268d6dfbfa431d7d08f919c9d960530e5f7f78eb47f267ad9b318265e5092b3ff9ede0db7c2b + checksum: 10c0/552e7a97a983d3c2d4e412a44eb7de0430ff773dd99f7500962c268d6dfbfa431d7d08f919c9d960530e5f7f78eb47f267ad9b318265e5092b3ff9ede0db7c2b languageName: node linkType: hard @@ -2289,7 +2296,7 @@ __metadata: dependenciesMeta: fsevents: optional: true - checksum: 2683a8f29793c75a4728787662972fedd9267704c8f7ef9d84f2beed9a977f1cf5e998c07b6f36ba5603f53cb010c911fe8cd0ac9886e073fe28ca66beefd30c + checksum: 10c0/2683a8f29793c75a4728787662972fedd9267704c8f7ef9d84f2beed9a977f1cf5e998c07b6f36ba5603f53cb010c911fe8cd0ac9886e073fe28ca66beefd30c languageName: node linkType: hard @@ -2299,7 +2306,7 @@ __metadata: dependencies: jest-get-type: "npm:^29.6.3" pretty-format: "npm:^29.7.0" - checksum: 71bb9f77fc489acb842a5c7be030f2b9acb18574dc9fb98b3100fc57d422b1abc55f08040884bd6e6dbf455047a62f7eaff12aa4058f7cbdc11558718ca6a395 + checksum: 10c0/71bb9f77fc489acb842a5c7be030f2b9acb18574dc9fb98b3100fc57d422b1abc55f08040884bd6e6dbf455047a62f7eaff12aa4058f7cbdc11558718ca6a395 languageName: node linkType: hard @@ -2311,7 +2318,7 @@ __metadata: jest-diff: "npm:^29.7.0" jest-get-type: "npm:^29.6.3" pretty-format: "npm:^29.7.0" - checksum: 0d0e70b28fa5c7d4dce701dc1f46ae0922102aadc24ed45d594dd9b7ae0a8a6ef8b216718d1ab79e451291217e05d4d49a82666e1a3cc2b428b75cd9c933244e + checksum: 10c0/0d0e70b28fa5c7d4dce701dc1f46ae0922102aadc24ed45d594dd9b7ae0a8a6ef8b216718d1ab79e451291217e05d4d49a82666e1a3cc2b428b75cd9c933244e languageName: node linkType: hard @@ -2328,7 +2335,7 @@ __metadata: pretty-format: "npm:^29.7.0" slash: "npm:^3.0.0" stack-utils: "npm:^2.0.3" - checksum: 850ae35477f59f3e6f27efac5215f706296e2104af39232bb14e5403e067992afb5c015e87a9243ec4d9df38525ef1ca663af9f2f4766aa116f127247008bd22 + checksum: 10c0/850ae35477f59f3e6f27efac5215f706296e2104af39232bb14e5403e067992afb5c015e87a9243ec4d9df38525ef1ca663af9f2f4766aa116f127247008bd22 languageName: node linkType: hard @@ -2339,7 +2346,7 @@ __metadata: "@jest/types": "npm:^29.6.3" "@types/node": "npm:*" jest-util: "npm:^29.7.0" - checksum: 7b9f8349ee87695a309fe15c46a74ab04c853369e5c40952d68061d9dc3159a0f0ed73e215f81b07ee97a9faaf10aebe5877a9d6255068a0977eae6a9ff1d5ac + checksum: 10c0/7b9f8349ee87695a309fe15c46a74ab04c853369e5c40952d68061d9dc3159a0f0ed73e215f81b07ee97a9faaf10aebe5877a9d6255068a0977eae6a9ff1d5ac languageName: node linkType: hard @@ -2351,14 +2358,14 @@ __metadata: peerDependenciesMeta: jest-resolve: optional: true - checksum: 86eec0c78449a2de733a6d3e316d49461af6a858070e113c97f75fb742a48c2396ea94150cbca44159ffd4a959f743a47a8b37a792ef6fdad2cf0a5cba973fac + checksum: 10c0/86eec0c78449a2de733a6d3e316d49461af6a858070e113c97f75fb742a48c2396ea94150cbca44159ffd4a959f743a47a8b37a792ef6fdad2cf0a5cba973fac languageName: node linkType: hard "jest-regex-util@npm:^29.6.3": version: 29.6.3 resolution: "jest-regex-util@npm:29.6.3" - checksum: 4e33fb16c4f42111159cafe26397118dcfc4cf08bc178a67149fb05f45546a91928b820894572679d62559839d0992e21080a1527faad65daaae8743a5705a3b + checksum: 10c0/4e33fb16c4f42111159cafe26397118dcfc4cf08bc178a67149fb05f45546a91928b820894572679d62559839d0992e21080a1527faad65daaae8743a5705a3b languageName: node linkType: hard @@ -2368,7 +2375,7 @@ __metadata: dependencies: jest-regex-util: "npm:^29.6.3" jest-snapshot: "npm:^29.7.0" - checksum: b6e9ad8ae5b6049474118ea6441dfddd385b6d1fc471db0136f7c8fbcfe97137a9665e4f837a9f49f15a29a1deb95a14439b7aec812f3f99d08f228464930f0d + checksum: 10c0/b6e9ad8ae5b6049474118ea6441dfddd385b6d1fc471db0136f7c8fbcfe97137a9665e4f837a9f49f15a29a1deb95a14439b7aec812f3f99d08f228464930f0d languageName: node linkType: hard @@ -2385,7 +2392,7 @@ __metadata: resolve: "npm:^1.20.0" resolve.exports: "npm:^2.0.0" slash: "npm:^3.0.0" - checksum: 59da5c9c5b50563e959a45e09e2eace783d7f9ac0b5dcc6375dea4c0db938d2ebda97124c8161310082760e8ebbeff9f6b177c15ca2f57fb424f637a5d2adb47 + checksum: 10c0/59da5c9c5b50563e959a45e09e2eace783d7f9ac0b5dcc6375dea4c0db938d2ebda97124c8161310082760e8ebbeff9f6b177c15ca2f57fb424f637a5d2adb47 languageName: node linkType: hard @@ -2414,7 +2421,7 @@ __metadata: jest-worker: "npm:^29.7.0" p-limit: "npm:^3.1.0" source-map-support: "npm:0.5.13" - checksum: 2194b4531068d939f14c8d3274fe5938b77fa73126aedf9c09ec9dec57d13f22c72a3b5af01ac04f5c1cf2e28d0ac0b4a54212a61b05f10b5d6b47f2a1097bb4 + checksum: 10c0/2194b4531068d939f14c8d3274fe5938b77fa73126aedf9c09ec9dec57d13f22c72a3b5af01ac04f5c1cf2e28d0ac0b4a54212a61b05f10b5d6b47f2a1097bb4 languageName: node linkType: hard @@ -2444,7 +2451,7 @@ __metadata: jest-util: "npm:^29.7.0" slash: "npm:^3.0.0" strip-bom: "npm:^4.0.0" - checksum: 7cd89a1deda0bda7d0941835434e44f9d6b7bd50b5c5d9b0fc9a6c990b2d4d2cab59685ab3cb2850ed4cc37059f6de903af5a50565d7f7f1192a77d3fd6dd2a6 + checksum: 10c0/7cd89a1deda0bda7d0941835434e44f9d6b7bd50b5c5d9b0fc9a6c990b2d4d2cab59685ab3cb2850ed4cc37059f6de903af5a50565d7f7f1192a77d3fd6dd2a6 languageName: node linkType: hard @@ -2472,7 +2479,7 @@ __metadata: natural-compare: "npm:^1.4.0" pretty-format: "npm:^29.7.0" semver: "npm:^7.5.3" - checksum: 6e9003c94ec58172b4a62864a91c0146513207bedf4e0a06e1e2ac70a4484088a2683e3a0538d8ea913bcfd53dc54a9b98a98cdfa562e7fe1d1339aeae1da570 + checksum: 10c0/6e9003c94ec58172b4a62864a91c0146513207bedf4e0a06e1e2ac70a4484088a2683e3a0538d8ea913bcfd53dc54a9b98a98cdfa562e7fe1d1339aeae1da570 languageName: node linkType: hard @@ -2486,7 +2493,7 @@ __metadata: ci-info: "npm:^3.2.0" graceful-fs: "npm:^4.2.9" picomatch: "npm:^2.2.3" - checksum: bc55a8f49fdbb8f51baf31d2a4f312fb66c9db1483b82f602c9c990e659cdd7ec529c8e916d5a89452ecbcfae4949b21b40a7a59d4ffc0cd813a973ab08c8150 + checksum: 10c0/bc55a8f49fdbb8f51baf31d2a4f312fb66c9db1483b82f602c9c990e659cdd7ec529c8e916d5a89452ecbcfae4949b21b40a7a59d4ffc0cd813a973ab08c8150 languageName: node linkType: hard @@ -2500,7 +2507,7 @@ __metadata: jest-get-type: "npm:^29.6.3" leven: "npm:^3.1.0" pretty-format: "npm:^29.7.0" - checksum: a20b930480c1ed68778c739f4739dce39423131bc070cd2505ddede762a5570a256212e9c2401b7ae9ba4d7b7c0803f03c5b8f1561c62348213aba18d9dbece2 + checksum: 10c0/a20b930480c1ed68778c739f4739dce39423131bc070cd2505ddede762a5570a256212e9c2401b7ae9ba4d7b7c0803f03c5b8f1561c62348213aba18d9dbece2 languageName: node linkType: hard @@ -2516,7 +2523,7 @@ __metadata: emittery: "npm:^0.13.1" jest-util: "npm:^29.7.0" string-length: "npm:^4.0.1" - checksum: ec6c75030562fc8f8c727cb8f3b94e75d831fc718785abfc196e1f2a2ebc9a2e38744a15147170039628a853d77a3b695561ce850375ede3a4ee6037a2574567 + checksum: 10c0/ec6c75030562fc8f8c727cb8f3b94e75d831fc718785abfc196e1f2a2ebc9a2e38744a15147170039628a853d77a3b695561ce850375ede3a4ee6037a2574567 languageName: node linkType: hard @@ -2528,7 +2535,7 @@ __metadata: jest-util: "npm:^29.7.0" merge-stream: "npm:^2.0.0" supports-color: "npm:^8.0.0" - checksum: 5570a3a005b16f46c131968b8a5b56d291f9bbb85ff4217e31c80bd8a02e7de799e59a54b95ca28d5c302f248b54cbffde2d177c2f0f52ffcee7504c6eabf660 + checksum: 10c0/5570a3a005b16f46c131968b8a5b56d291f9bbb85ff4217e31c80bd8a02e7de799e59a54b95ca28d5c302f248b54cbffde2d177c2f0f52ffcee7504c6eabf660 languageName: node linkType: hard @@ -2547,14 +2554,14 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: f40eb8171cf147c617cc6ada49d062fbb03b4da666cb8d39cdbfb739a7d75eea4c3ca150fb072d0d273dce0c753db4d0467d54906ad0293f59c54f9db4a09d8b + checksum: 10c0/f40eb8171cf147c617cc6ada49d062fbb03b4da666cb8d39cdbfb739a7d75eea4c3ca150fb072d0d273dce0c753db4d0467d54906ad0293f59c54f9db4a09d8b languageName: node linkType: hard "js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" - checksum: e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed + checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed languageName: node linkType: hard @@ -2566,7 +2573,7 @@ __metadata: esprima: "npm:^4.0.0" bin: js-yaml: bin/js-yaml.js - checksum: 6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b + checksum: 10c0/6746baaaeac312c4db8e75fa22331d9a04cccb7792d126ed8ce6a0bbcfef0cedaddd0c5098fade53db067c09fe00aa1c957674b4765610a8b06a5a189e46433b languageName: node linkType: hard @@ -2575,14 +2582,14 @@ __metadata: resolution: "jsesc@npm:2.5.2" bin: jsesc: bin/jsesc - checksum: dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88 + checksum: 10c0/dbf59312e0ebf2b4405ef413ec2b25abb5f8f4d9bc5fb8d9f90381622ebca5f2af6a6aa9a8578f65903f9e33990a6dc798edd0ce5586894bf0e9e31803a1de88 languageName: node linkType: hard "json-parse-even-better-errors@npm:^2.3.0": version: 2.3.1 resolution: "json-parse-even-better-errors@npm:2.3.1" - checksum: 140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3 + checksum: 10c0/140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3 languageName: node linkType: hard @@ -2591,28 +2598,28 @@ __metadata: resolution: "json5@npm:2.2.3" bin: json5: lib/cli.js - checksum: 5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c + checksum: 10c0/5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c languageName: node linkType: hard "kleur@npm:^3.0.3": version: 3.0.3 resolution: "kleur@npm:3.0.3" - checksum: cd3a0b8878e7d6d3799e54340efe3591ca787d9f95f109f28129bdd2915e37807bf8918bb295ab86afb8c82196beec5a1adcaf29042ce3f2bd932b038fe3aa4b + checksum: 10c0/cd3a0b8878e7d6d3799e54340efe3591ca787d9f95f109f28129bdd2915e37807bf8918bb295ab86afb8c82196beec5a1adcaf29042ce3f2bd932b038fe3aa4b languageName: node linkType: hard "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" - checksum: cd778ba3fbab0f4d0500b7e87d1f6e1f041507c56fdcd47e8256a3012c98aaee371d4c15e0a76e0386107af2d42e2b7466160a2d80688aaa03e66e49949f42df + checksum: 10c0/cd778ba3fbab0f4d0500b7e87d1f6e1f041507c56fdcd47e8256a3012c98aaee371d4c15e0a76e0386107af2d42e2b7466160a2d80688aaa03e66e49949f42df languageName: node linkType: hard "lines-and-columns@npm:^1.1.6": version: 1.2.4 resolution: "lines-and-columns@npm:1.2.4" - checksum: 3da6ee62d4cd9f03f5dc90b4df2540fb85b352081bee77fe4bbcd12c9000ead7f35e0a38b8d09a9bb99b13223446dd8689ff3c4959807620726d788701a83d2d + checksum: 10c0/3da6ee62d4cd9f03f5dc90b4df2540fb85b352081bee77fe4bbcd12c9000ead7f35e0a38b8d09a9bb99b13223446dd8689ff3c4959807620726d788701a83d2d languageName: node linkType: hard @@ -2621,21 +2628,28 @@ __metadata: resolution: "locate-path@npm:5.0.0" dependencies: p-locate: "npm:^4.1.0" - checksum: 33a1c5247e87e022f9713e6213a744557a3e9ec32c5d0b5efb10aa3a38177615bf90221a5592674857039c1a0fd2063b82f285702d37b792d973e9e72ace6c59 + checksum: 10c0/33a1c5247e87e022f9713e6213a744557a3e9ec32c5d0b5efb10aa3a38177615bf90221a5592674857039c1a0fd2063b82f285702d37b792d973e9e72ace6c59 languageName: node linkType: hard "lodash.memoize@npm:4.x": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" - checksum: c8713e51eccc650422716a14cece1809cfe34bc5ab5e242b7f8b4e2241c2483697b971a604252807689b9dd69bfe3a98852e19a5b89d506b000b4187a1285df8 + checksum: 10c0/c8713e51eccc650422716a14cece1809cfe34bc5ab5e242b7f8b4e2241c2483697b971a604252807689b9dd69bfe3a98852e19a5b89d506b000b4187a1285df8 + languageName: node + linkType: hard + +"lodash@npm:^4.17.21": + version: 4.17.21 + resolution: "lodash@npm:4.17.21" + checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c languageName: node linkType: hard "lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.0.1 - resolution: "lru-cache@npm:10.0.1" - checksum: 982dabfb227b9a2daf56d712ae0e72e01115a28c0a2068cd71277bca04568f3417bbf741c6c7941abc5c620fd8059e34f15607f90ebccbfa0a17533322d27a8e + version: 10.2.0 + resolution: "lru-cache@npm:10.2.0" + checksum: 10c0/c9847612aa2daaef102d30542a8d6d9b2c2bb36581c1bf0dc3ebf5e5f3352c772a749e604afae2e46873b930a9e9523743faac4e5b937c576ab29196774712ee languageName: node linkType: hard @@ -2644,7 +2658,7 @@ __metadata: resolution: "lru-cache@npm:5.1.1" dependencies: yallist: "npm:^3.0.2" - checksum: 89b2ef2ef45f543011e38737b8a8622a2f8998cddf0e5437174ef8f1f70a8b9d14a918ab3e232cb3ba343b7abddffa667f0b59075b2b80e6b4d63c3de6127482 + checksum: 10c0/89b2ef2ef45f543011e38737b8a8622a2f8998cddf0e5437174ef8f1f70a8b9d14a918ab3e232cb3ba343b7abddffa667f0b59075b2b80e6b4d63c3de6127482 languageName: node linkType: hard @@ -2653,7 +2667,7 @@ __metadata: resolution: "lru-cache@npm:6.0.0" dependencies: yallist: "npm:^4.0.0" - checksum: cb53e582785c48187d7a188d3379c181b5ca2a9c78d2bce3e7dee36f32761d1c42983da3fe12b55cb74e1779fa94cdc2e5367c028a9b35317184ede0c07a30a9 + checksum: 10c0/cb53e582785c48187d7a188d3379c181b5ca2a9c78d2bce3e7dee36f32761d1c42983da3fe12b55cb74e1779fa94cdc2e5367c028a9b35317184ede0c07a30a9 languageName: node linkType: hard @@ -2662,14 +2676,14 @@ __metadata: resolution: "make-dir@npm:4.0.0" dependencies: semver: "npm:^7.5.3" - checksum: 69b98a6c0b8e5c4fe9acb61608a9fbcfca1756d910f51e5dbe7a9e5cfb74fca9b8a0c8a0ffdf1294a740826c1ab4871d5bf3f62f72a3049e5eac6541ddffed68 + checksum: 10c0/69b98a6c0b8e5c4fe9acb61608a9fbcfca1756d910f51e5dbe7a9e5cfb74fca9b8a0c8a0ffdf1294a740826c1ab4871d5bf3f62f72a3049e5eac6541ddffed68 languageName: node linkType: hard "make-error@npm:1.x, make-error@npm:^1.1.1": version: 1.3.6 resolution: "make-error@npm:1.3.6" - checksum: 171e458d86854c6b3fc46610cfacf0b45149ba043782558c6875d9f42f222124384ad0b468c92e996d815a8a2003817a710c0a160e49c1c394626f76fa45396f + checksum: 10c0/171e458d86854c6b3fc46610cfacf0b45149ba043782558c6875d9f42f222124384ad0b468c92e996d815a8a2003817a710c0a160e49c1c394626f76fa45396f languageName: node linkType: hard @@ -2688,7 +2702,7 @@ __metadata: negotiator: "npm:^0.6.3" promise-retry: "npm:^2.0.1" ssri: "npm:^10.0.0" - checksum: 43b9f6dcbc6fe8b8604cb6396957c3698857a15ba4dbc38284f7f0e61f248300585ef1eb8cc62df54e9c724af977e45b5cdfd88320ef7f53e45070ed3488da55 + checksum: 10c0/43b9f6dcbc6fe8b8604cb6396957c3698857a15ba4dbc38284f7f0e61f248300585ef1eb8cc62df54e9c724af977e45b5cdfd88320ef7f53e45070ed3488da55 languageName: node linkType: hard @@ -2697,14 +2711,14 @@ __metadata: resolution: "makeerror@npm:1.0.12" dependencies: tmpl: "npm:1.0.5" - checksum: b0e6e599780ce6bab49cc413eba822f7d1f0dfebd1c103eaa3785c59e43e22c59018323cf9e1708f0ef5329e94a745d163fcbb6bff8e4c6742f9be9e86f3500c + checksum: 10c0/b0e6e599780ce6bab49cc413eba822f7d1f0dfebd1c103eaa3785c59e43e22c59018323cf9e1708f0ef5329e94a745d163fcbb6bff8e4c6742f9be9e86f3500c languageName: node linkType: hard "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" - checksum: 867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5 + checksum: 10c0/867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5 languageName: node linkType: hard @@ -2714,14 +2728,14 @@ __metadata: dependencies: braces: "npm:^3.0.2" picomatch: "npm:^2.3.1" - checksum: 3d6505b20f9fa804af5d8c596cb1c5e475b9b0cd05f652c5b56141cf941bd72adaeb7a436fda344235cef93a7f29b7472efc779fcdb83b478eab0867b95cdeff + checksum: 10c0/3d6505b20f9fa804af5d8c596cb1c5e475b9b0cd05f652c5b56141cf941bd72adaeb7a436fda344235cef93a7f29b7472efc779fcdb83b478eab0867b95cdeff languageName: node linkType: hard "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" - checksum: b26f5479d7ec6cc2bce275a08f146cf78f5e7b661b18114e2506dd91ec7ec47e7a25bf4360e5438094db0560bcc868079fb3b1fb3892b833c1ecbf63f80c95a4 + checksum: 10c0/b26f5479d7ec6cc2bce275a08f146cf78f5e7b661b18114e2506dd91ec7ec47e7a25bf4360e5438094db0560bcc868079fb3b1fb3892b833c1ecbf63f80c95a4 languageName: node linkType: hard @@ -2730,7 +2744,7 @@ __metadata: resolution: "minimatch@npm:3.1.2" dependencies: brace-expansion: "npm:^1.1.7" - checksum: 0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 + checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 languageName: node linkType: hard @@ -2739,16 +2753,16 @@ __metadata: resolution: "minimatch@npm:9.0.3" dependencies: brace-expansion: "npm:^2.0.1" - checksum: 85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac + checksum: 10c0/85f407dcd38ac3e180f425e86553911d101455ca3ad5544d6a7cec16286657e4f8a9aa6695803025c55e31e35a91a2252b5dc8e7d527211278b8b65b4dbd5eac languageName: node linkType: hard -"minipass-collect@npm:^1.0.2": - version: 1.0.2 - resolution: "minipass-collect@npm:1.0.2" +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" dependencies: - minipass: "npm:^3.0.0" - checksum: 8f82bd1f3095b24f53a991b04b67f4c710c894e518b813f0864a31de5570441a509be1ca17e0bb92b047591a8fdbeb886f502764fefb00d2f144f4011791e898 + minipass: "npm:^7.0.3" + checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e languageName: node linkType: hard @@ -2763,7 +2777,7 @@ __metadata: dependenciesMeta: encoding: optional: true - checksum: 1b63c1f3313e88eeac4689f1b71c9f086598db9a189400e3ee960c32ed89e06737fa23976c9305c2d57464fb3fcdc12749d3378805c9d6176f5569b0d0ee8a75 + checksum: 10c0/1b63c1f3313e88eeac4689f1b71c9f086598db9a189400e3ee960c32ed89e06737fa23976c9305c2d57464fb3fcdc12749d3378805c9d6176f5569b0d0ee8a75 languageName: node linkType: hard @@ -2772,7 +2786,7 @@ __metadata: resolution: "minipass-flush@npm:1.0.5" dependencies: minipass: "npm:^3.0.0" - checksum: 2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd + checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd languageName: node linkType: hard @@ -2781,7 +2795,7 @@ __metadata: resolution: "minipass-pipeline@npm:1.2.4" dependencies: minipass: "npm:^3.0.0" - checksum: cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 + checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 languageName: node linkType: hard @@ -2790,7 +2804,7 @@ __metadata: resolution: "minipass-sized@npm:1.0.3" dependencies: minipass: "npm:^3.0.0" - checksum: 298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb + checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb languageName: node linkType: hard @@ -2799,21 +2813,21 @@ __metadata: resolution: "minipass@npm:3.3.6" dependencies: yallist: "npm:^4.0.0" - checksum: a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c + checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c languageName: node linkType: hard "minipass@npm:^5.0.0": version: 5.0.0 resolution: "minipass@npm:5.0.0" - checksum: a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 + checksum: 10c0/a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 languageName: node linkType: hard "minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": version: 7.0.4 resolution: "minipass@npm:7.0.4" - checksum: 6c7370a6dfd257bf18222da581ba89a5eaedca10e158781232a8b5542a90547540b4b9b7e7f490e4cda43acfbd12e086f0453728ecf8c19e0ef6921bc5958ac5 + checksum: 10c0/6c7370a6dfd257bf18222da581ba89a5eaedca10e158781232a8b5542a90547540b4b9b7e7f490e4cda43acfbd12e086f0453728ecf8c19e0ef6921bc5958ac5 languageName: node linkType: hard @@ -2823,7 +2837,7 @@ __metadata: dependencies: minipass: "npm:^3.0.0" yallist: "npm:^4.0.0" - checksum: 64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 + checksum: 10c0/64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 languageName: node linkType: hard @@ -2832,14 +2846,14 @@ __metadata: resolution: "mkdirp@npm:1.0.4" bin: mkdirp: bin/cmd.js - checksum: 46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf + checksum: 10c0/46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf languageName: node linkType: hard "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" - checksum: a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc + checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc languageName: node linkType: hard @@ -2848,21 +2862,21 @@ __metadata: resolution: "mustache@npm:4.2.0" bin: mustache: bin/mustache - checksum: 1f8197e8a19e63645a786581d58c41df7853da26702dbc005193e2437c98ca49b255345c173d50c08fe4b4dbb363e53cb655ecc570791f8deb09887248dd34a2 + checksum: 10c0/1f8197e8a19e63645a786581d58c41df7853da26702dbc005193e2437c98ca49b255345c173d50c08fe4b4dbb363e53cb655ecc570791f8deb09887248dd34a2 languageName: node linkType: hard "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" - checksum: f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447 + checksum: 10c0/f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447 languageName: node linkType: hard "negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" - checksum: 3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 + checksum: 10c0/3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 languageName: node linkType: hard @@ -2882,21 +2896,21 @@ __metadata: which: "npm:^4.0.0" bin: node-gyp: bin/node-gyp.js - checksum: abddfff7d873312e4ed4a5fb75ce893a5c4fb69e7fcb1dfa71c28a6b92a7f1ef6b62790dffb39181b5a82728ba8f2f32d229cf8cbe66769fe02cea7db4a555aa + checksum: 10c0/abddfff7d873312e4ed4a5fb75ce893a5c4fb69e7fcb1dfa71c28a6b92a7f1ef6b62790dffb39181b5a82728ba8f2f32d229cf8cbe66769fe02cea7db4a555aa languageName: node linkType: hard "node-int64@npm:^0.4.0": version: 0.4.0 resolution: "node-int64@npm:0.4.0" - checksum: a6a4d8369e2f2720e9c645255ffde909c0fbd41c92ea92a5607fc17055955daac99c1ff589d421eee12a0d24e99f7bfc2aabfeb1a4c14742f6c099a51863f31a + checksum: 10c0/a6a4d8369e2f2720e9c645255ffde909c0fbd41c92ea92a5607fc17055955daac99c1ff589d421eee12a0d24e99f7bfc2aabfeb1a4c14742f6c099a51863f31a languageName: node linkType: hard -"node-releases@npm:^2.0.13": - version: 2.0.13 - resolution: "node-releases@npm:2.0.13" - checksum: 2fb44bf70fc949d27f3a48a7fd1a9d1d603ddad4ccd091f26b3fb8b1da976605d919330d7388ccd55ca2ade0dc8b2e12841ba19ef249c8bb29bf82532d401af7 +"node-releases@npm:^2.0.14": + version: 2.0.14 + resolution: "node-releases@npm:2.0.14" + checksum: 10c0/199fc93773ae70ec9969bc6d5ac5b2bbd6eb986ed1907d751f411fef3ede0e4bfdb45ceb43711f8078bea237b6036db8b1bf208f6ff2b70c7d615afd157f3ab9 languageName: node linkType: hard @@ -2907,14 +2921,14 @@ __metadata: abbrev: "npm:^2.0.0" bin: nopt: bin/nopt.js - checksum: 9bd7198df6f16eb29ff16892c77bcf7f0cc41f9fb5c26280ac0def2cf8cf319f3b821b3af83eba0e74c85807cc430a16efe0db58fe6ae1f41e69519f585b6aff + checksum: 10c0/9bd7198df6f16eb29ff16892c77bcf7f0cc41f9fb5c26280ac0def2cf8cf319f3b821b3af83eba0e74c85807cc430a16efe0db58fe6ae1f41e69519f585b6aff languageName: node linkType: hard "normalize-path@npm:^3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" - checksum: e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 + checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 languageName: node linkType: hard @@ -2923,7 +2937,7 @@ __metadata: resolution: "npm-run-path@npm:4.0.1" dependencies: path-key: "npm:^3.0.0" - checksum: 6f9353a95288f8455cf64cbeb707b28826a7f29690244c1e4bb61ec573256e021b6ad6651b394eb1ccfd00d6ec50147253aba2c5fe58a57ceb111fad62c519ac + checksum: 10c0/6f9353a95288f8455cf64cbeb707b28826a7f29690244c1e4bb61ec573256e021b6ad6651b394eb1ccfd00d6ec50147253aba2c5fe58a57ceb111fad62c519ac languageName: node linkType: hard @@ -2932,7 +2946,7 @@ __metadata: resolution: "once@npm:1.4.0" dependencies: wrappy: "npm:1" - checksum: 5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 + checksum: 10c0/5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 languageName: node linkType: hard @@ -2941,7 +2955,7 @@ __metadata: resolution: "onetime@npm:5.1.2" dependencies: mimic-fn: "npm:^2.1.0" - checksum: ffcef6fbb2692c3c40749f31ea2e22677a876daea92959b8a80b521d95cca7a668c884d8b2045d1d8ee7d56796aa405c405462af112a1477594cc63531baeb8f + checksum: 10c0/ffcef6fbb2692c3c40749f31ea2e22677a876daea92959b8a80b521d95cca7a668c884d8b2045d1d8ee7d56796aa405c405462af112a1477594cc63531baeb8f languageName: node linkType: hard @@ -2950,7 +2964,7 @@ __metadata: resolution: "p-limit@npm:2.3.0" dependencies: p-try: "npm:^2.0.0" - checksum: 8da01ac53efe6a627080fafc127c873da40c18d87b3f5d5492d465bb85ec7207e153948df6b9cbaeb130be70152f874229b8242ee2be84c0794082510af97f12 + checksum: 10c0/8da01ac53efe6a627080fafc127c873da40c18d87b3f5d5492d465bb85ec7207e153948df6b9cbaeb130be70152f874229b8242ee2be84c0794082510af97f12 languageName: node linkType: hard @@ -2959,7 +2973,7 @@ __metadata: resolution: "p-limit@npm:3.1.0" dependencies: yocto-queue: "npm:^0.1.0" - checksum: 9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a + checksum: 10c0/9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a languageName: node linkType: hard @@ -2968,7 +2982,7 @@ __metadata: resolution: "p-locate@npm:4.1.0" dependencies: p-limit: "npm:^2.2.0" - checksum: 1b476ad69ad7f6059744f343b26d51ce091508935c1dbb80c4e0a2f397ffce0ca3a1f9f5cd3c7ce19d7929a09719d5c65fe70d8ee289c3f267cd36f2881813e9 + checksum: 10c0/1b476ad69ad7f6059744f343b26d51ce091508935c1dbb80c4e0a2f397ffce0ca3a1f9f5cd3c7ce19d7929a09719d5c65fe70d8ee289c3f267cd36f2881813e9 languageName: node linkType: hard @@ -2977,14 +2991,14 @@ __metadata: resolution: "p-map@npm:4.0.0" dependencies: aggregate-error: "npm:^3.0.0" - checksum: 592c05bd6262c466ce269ff172bb8de7c6975afca9b50c975135b974e9bdaafbfe80e61aaaf5be6d1200ba08b30ead04b88cfa7e25ff1e3b93ab28c9f62a2c75 + checksum: 10c0/592c05bd6262c466ce269ff172bb8de7c6975afca9b50c975135b974e9bdaafbfe80e61aaaf5be6d1200ba08b30ead04b88cfa7e25ff1e3b93ab28c9f62a2c75 languageName: node linkType: hard "p-try@npm:^2.0.0": version: 2.2.0 resolution: "p-try@npm:2.2.0" - checksum: c36c19907734c904b16994e6535b02c36c2224d433e01a2f1ab777237f4d86e6289fd5fd464850491e940379d4606ed850c03e0f9ab600b0ebddb511312e177f + checksum: 10c0/c36c19907734c904b16994e6535b02c36c2224d433e01a2f1ab777237f4d86e6289fd5fd464850491e940379d4606ed850c03e0f9ab600b0ebddb511312e177f languageName: node linkType: hard @@ -2996,35 +3010,35 @@ __metadata: error-ex: "npm:^1.3.1" json-parse-even-better-errors: "npm:^2.3.0" lines-and-columns: "npm:^1.1.6" - checksum: 77947f2253005be7a12d858aedbafa09c9ae39eb4863adf330f7b416ca4f4a08132e453e08de2db46459256fb66afaac5ee758b44fe6541b7cdaf9d252e59585 + checksum: 10c0/77947f2253005be7a12d858aedbafa09c9ae39eb4863adf330f7b416ca4f4a08132e453e08de2db46459256fb66afaac5ee758b44fe6541b7cdaf9d252e59585 languageName: node linkType: hard "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" - checksum: 8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b + checksum: 10c0/8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b languageName: node linkType: hard "path-is-absolute@npm:^1.0.0": version: 1.0.1 resolution: "path-is-absolute@npm:1.0.1" - checksum: 127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078 + checksum: 10c0/127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078 languageName: node linkType: hard "path-key@npm:^3.0.0, path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" - checksum: 748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c + checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c languageName: node linkType: hard "path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" - checksum: 11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 + checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 languageName: node linkType: hard @@ -3034,28 +3048,28 @@ __metadata: dependencies: lru-cache: "npm:^9.1.1 || ^10.0.0" minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: e5dc78a7348d25eec61ab166317e9e9c7b46818aa2c2b9006c507a6ff48c672d011292d9662527213e558f5652ce0afcc788663a061d8b59ab495681840c0c1e + checksum: 10c0/e5dc78a7348d25eec61ab166317e9e9c7b46818aa2c2b9006c507a6ff48c672d011292d9662527213e558f5652ce0afcc788663a061d8b59ab495681840c0c1e languageName: node linkType: hard "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" - checksum: 20a5b249e331c14479d94ec6817a182fd7a5680debae82705747b2db7ec50009a5f6648d0621c561b0572703f84dbef0858abcbd5856d3c5511426afcb1961f7 + checksum: 10c0/20a5b249e331c14479d94ec6817a182fd7a5680debae82705747b2db7ec50009a5f6648d0621c561b0572703f84dbef0858abcbd5856d3c5511426afcb1961f7 languageName: node linkType: hard "picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" - checksum: 26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be + checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be languageName: node linkType: hard "pirates@npm:^4.0.4": version: 4.0.6 resolution: "pirates@npm:4.0.6" - checksum: 00d5fa51f8dded94d7429700fb91a0c1ead00ae2c7fd27089f0c5b63e6eca36197fe46384631872690a66f390c5e27198e99006ab77ae472692ab9c2ca903f36 + checksum: 10c0/00d5fa51f8dded94d7429700fb91a0c1ead00ae2c7fd27089f0c5b63e6eca36197fe46384631872690a66f390c5e27198e99006ab77ae472692ab9c2ca903f36 languageName: node linkType: hard @@ -3064,7 +3078,7 @@ __metadata: resolution: "pkg-dir@npm:4.2.0" dependencies: find-up: "npm:^4.0.0" - checksum: c56bda7769e04907a88423feb320babaed0711af8c436ce3e56763ab1021ba107c7b0cafb11cde7529f669cfc22bffcaebffb573645cbd63842ea9fb17cd7728 + checksum: 10c0/c56bda7769e04907a88423feb320babaed0711af8c436ce3e56763ab1021ba107c7b0cafb11cde7529f669cfc22bffcaebffb573645cbd63842ea9fb17cd7728 languageName: node linkType: hard @@ -3075,14 +3089,14 @@ __metadata: "@jest/schemas": "npm:^29.6.3" ansi-styles: "npm:^5.0.0" react-is: "npm:^18.0.0" - checksum: edc5ff89f51916f036c62ed433506b55446ff739358de77207e63e88a28ca2894caac6e73dcb68166a606e51c8087d32d400473e6a9fdd2dbe743f46c9c0276f + checksum: 10c0/edc5ff89f51916f036c62ed433506b55446ff739358de77207e63e88a28ca2894caac6e73dcb68166a606e51c8087d32d400473e6a9fdd2dbe743f46c9c0276f languageName: node linkType: hard "proc-log@npm:^3.0.0": version: 3.0.0 resolution: "proc-log@npm:3.0.0" - checksum: f66430e4ff947dbb996058f6fd22de2c66612ae1a89b097744e17fb18a4e8e7a86db99eda52ccf15e53f00b63f4ec0b0911581ff2aac0355b625c8eac509b0dc + checksum: 10c0/f66430e4ff947dbb996058f6fd22de2c66612ae1a89b097744e17fb18a4e8e7a86db99eda52ccf15e53f00b63f4ec0b0911581ff2aac0355b625c8eac509b0dc languageName: node linkType: hard @@ -3092,7 +3106,7 @@ __metadata: dependencies: err-code: "npm:^2.0.2" retry: "npm:^0.12.0" - checksum: 9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 + checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 languageName: node linkType: hard @@ -3102,28 +3116,28 @@ __metadata: dependencies: kleur: "npm:^3.0.3" sisteransi: "npm:^1.0.5" - checksum: 16f1ac2977b19fe2cf53f8411cc98db7a3c8b115c479b2ca5c82b5527cd937aa405fa04f9a5960abeb9daef53191b53b4d13e35c1f5d50e8718c76917c5f1ea4 + checksum: 10c0/16f1ac2977b19fe2cf53f8411cc98db7a3c8b115c479b2ca5c82b5527cd937aa405fa04f9a5960abeb9daef53191b53b4d13e35c1f5d50e8718c76917c5f1ea4 languageName: node linkType: hard "pure-rand@npm:^6.0.0": version: 6.0.4 resolution: "pure-rand@npm:6.0.4" - checksum: 0fe7b12f25b10ea5b804598a6f37e4bcf645d2be6d44fe963741f014bf0095bdb6ff525106d6da6e76addc8142358fd380f1a9b8c62ea4d5516bf26a96a37c95 + checksum: 10c0/0fe7b12f25b10ea5b804598a6f37e4bcf645d2be6d44fe963741f014bf0095bdb6ff525106d6da6e76addc8142358fd380f1a9b8c62ea4d5516bf26a96a37c95 languageName: node linkType: hard "react-is@npm:^18.0.0": version: 18.2.0 resolution: "react-is@npm:18.2.0" - checksum: 6eb5e4b28028c23e2bfcf73371e72cd4162e4ac7ab445ddae2afe24e347a37d6dc22fae6e1748632cd43c6d4f9b8f86dcf26bf9275e1874f436d129952528ae0 + checksum: 10c0/6eb5e4b28028c23e2bfcf73371e72cd4162e4ac7ab445ddae2afe24e347a37d6dc22fae6e1748632cd43c6d4f9b8f86dcf26bf9275e1874f436d129952528ae0 languageName: node linkType: hard "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" - checksum: 83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 + checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 languageName: node linkType: hard @@ -3132,21 +3146,21 @@ __metadata: resolution: "resolve-cwd@npm:3.0.0" dependencies: resolve-from: "npm:^5.0.0" - checksum: e608a3ebd15356264653c32d7ecbc8fd702f94c6703ea4ac2fb81d9c359180cba0ae2e6b71faa446631ed6145454d5a56b227efc33a2d40638ac13f8beb20ee4 + checksum: 10c0/e608a3ebd15356264653c32d7ecbc8fd702f94c6703ea4ac2fb81d9c359180cba0ae2e6b71faa446631ed6145454d5a56b227efc33a2d40638ac13f8beb20ee4 languageName: node linkType: hard "resolve-from@npm:^5.0.0": version: 5.0.0 resolution: "resolve-from@npm:5.0.0" - checksum: b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 + checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 languageName: node linkType: hard "resolve.exports@npm:^2.0.0": version: 2.0.2 resolution: "resolve.exports@npm:2.0.2" - checksum: cc4cffdc25447cf34730f388dca5021156ba9302a3bad3d7f168e790dc74b2827dff603f1bc6ad3d299bac269828dca96dd77e036dc9fba6a2a1807c47ab5c98 + checksum: 10c0/cc4cffdc25447cf34730f388dca5021156ba9302a3bad3d7f168e790dc74b2827dff603f1bc6ad3d299bac269828dca96dd77e036dc9fba6a2a1807c47ab5c98 languageName: node linkType: hard @@ -3159,7 +3173,7 @@ __metadata: supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 07e179f4375e1fd072cfb72ad66d78547f86e6196c4014b31cb0b8bb1db5f7ca871f922d08da0fbc05b94e9fd42206f819648fa3b5b873ebbc8e1dc68fec433a + checksum: 10c0/07e179f4375e1fd072cfb72ad66d78547f86e6196c4014b31cb0b8bb1db5f7ca871f922d08da0fbc05b94e9fd42206f819648fa3b5b873ebbc8e1dc68fec433a languageName: node linkType: hard @@ -3172,21 +3186,21 @@ __metadata: supports-preserve-symlinks-flag: "npm:^1.0.0" bin: resolve: bin/resolve - checksum: 0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729 + checksum: 10c0/0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729 languageName: node linkType: hard "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" - checksum: 59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe + checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe languageName: node linkType: hard "safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" - checksum: 7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 + checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 languageName: node linkType: hard @@ -3195,18 +3209,18 @@ __metadata: resolution: "semver@npm:6.3.1" bin: semver: bin/semver.js - checksum: e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d + checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d languageName: node linkType: hard "semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4": - version: 7.5.4 - resolution: "semver@npm:7.5.4" + version: 7.6.0 + resolution: "semver@npm:7.6.0" dependencies: lru-cache: "npm:^6.0.0" bin: semver: bin/semver.js - checksum: 5160b06975a38b11c1ab55950cb5b8a23db78df88275d3d8a42ccf1f29e55112ac995b3a26a522c36e3b5f76b0445f1eef70d696b8c7862a2b4303d7b0e7609e + checksum: 10c0/fbfe717094ace0aa8d6332d7ef5ce727259815bd8d8815700853f4faf23aacbd7192522f0dc5af6df52ef4fa85a355ebd2f5d39f554bd028200d6cf481ab9b53 languageName: node linkType: hard @@ -3215,49 +3229,49 @@ __metadata: resolution: "shebang-command@npm:2.0.0" dependencies: shebang-regex: "npm:^3.0.0" - checksum: a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e + checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e languageName: node linkType: hard "shebang-regex@npm:^3.0.0": version: 3.0.0 resolution: "shebang-regex@npm:3.0.0" - checksum: 1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 + checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 languageName: node linkType: hard "signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" - checksum: 25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 + checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 languageName: node linkType: hard "signal-exit@npm:^4.0.1": version: 4.1.0 resolution: "signal-exit@npm:4.1.0" - checksum: 41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 + checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 languageName: node linkType: hard "sisteransi@npm:^1.0.5": version: 1.0.5 resolution: "sisteransi@npm:1.0.5" - checksum: 230ac975cca485b7f6fe2b96a711aa62a6a26ead3e6fb8ba17c5a00d61b8bed0d7adc21f5626b70d7c33c62ff4e63933017a6462942c719d1980bb0b1207ad46 + checksum: 10c0/230ac975cca485b7f6fe2b96a711aa62a6a26ead3e6fb8ba17c5a00d61b8bed0d7adc21f5626b70d7c33c62ff4e63933017a6462942c719d1980bb0b1207ad46 languageName: node linkType: hard "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" - checksum: e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b + checksum: 10c0/e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b languageName: node linkType: hard "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" - checksum: a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 + checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 languageName: node linkType: hard @@ -3268,7 +3282,7 @@ __metadata: agent-base: "npm:^7.0.2" debug: "npm:^4.3.4" socks: "npm:^2.7.1" - checksum: a842402fc9b8848a31367f2811ca3cd14c4106588b39a0901cd7a69029998adfc6456b0203617c18ed090542ad0c24ee4e9d4c75a0c4b75071e214227c177eb7 + checksum: 10c0/a842402fc9b8848a31367f2811ca3cd14c4106588b39a0901cd7a69029998adfc6456b0203617c18ed090542ad0c24ee4e9d4c75a0c4b75071e214227c177eb7 languageName: node linkType: hard @@ -3278,7 +3292,7 @@ __metadata: dependencies: ip: "npm:^2.0.0" smart-buffer: "npm:^4.2.0" - checksum: 43f69dbc9f34fc8220bc51c6eea1c39715ab3cfdb115d6e3285f6c7d1a603c5c75655668a5bbc11e3c7e2c99d60321fb8d7ab6f38cda6a215fadd0d6d0b52130 + checksum: 10c0/43f69dbc9f34fc8220bc51c6eea1c39715ab3cfdb115d6e3285f6c7d1a603c5c75655668a5bbc11e3c7e2c99d60321fb8d7ab6f38cda6a215fadd0d6d0b52130 languageName: node linkType: hard @@ -3288,21 +3302,21 @@ __metadata: dependencies: buffer-from: "npm:^1.0.0" source-map: "npm:^0.6.0" - checksum: 137539f8c453fa0f496ea42049ab5da4569f96781f6ac8e5bfda26937be9494f4e8891f523c5f98f0e85f71b35d74127a00c46f83f6a4f54672b58d53202565e + checksum: 10c0/137539f8c453fa0f496ea42049ab5da4569f96781f6ac8e5bfda26937be9494f4e8891f523c5f98f0e85f71b35d74127a00c46f83f6a4f54672b58d53202565e languageName: node linkType: hard "source-map@npm:^0.6.0, source-map@npm:^0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" - checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 + checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 languageName: node linkType: hard "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" - checksum: ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb + checksum: 10c0/ecadcfe4c771890140da5023d43e190b7566d9cf8b2d238600f31bec0fc653f328da4450eb04bd59a431771a8e9cc0e118f0aa3974b683a4981b4e07abc2a5bb languageName: node linkType: hard @@ -3311,7 +3325,7 @@ __metadata: resolution: "ssri@npm:10.0.5" dependencies: minipass: "npm:^7.0.3" - checksum: b091f2ae92474183c7ac5ed3f9811457e1df23df7a7e70c9476eaa9a0c4a0c8fc190fb45acefbf023ca9ee864dd6754237a697dc52a0fb182afe65d8e77443d8 + checksum: 10c0/b091f2ae92474183c7ac5ed3f9811457e1df23df7a7e70c9476eaa9a0c4a0c8fc190fb45acefbf023ca9ee864dd6754237a697dc52a0fb182afe65d8e77443d8 languageName: node linkType: hard @@ -3320,7 +3334,7 @@ __metadata: resolution: "stack-utils@npm:2.0.6" dependencies: escape-string-regexp: "npm:^2.0.0" - checksum: 651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a + checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a languageName: node linkType: hard @@ -3330,7 +3344,7 @@ __metadata: dependencies: char-regex: "npm:^1.0.2" strip-ansi: "npm:^6.0.0" - checksum: 1cd77409c3d7db7bc59406f6bcc9ef0783671dcbabb23597a1177c166906ef2ee7c8290f78cae73a8aec858768f189d2cb417797df5e15ec4eb5e16b3346340c + checksum: 10c0/1cd77409c3d7db7bc59406f6bcc9ef0783671dcbabb23597a1177c166906ef2ee7c8290f78cae73a8aec858768f189d2cb417797df5e15ec4eb5e16b3346340c languageName: node linkType: hard @@ -3341,7 +3355,7 @@ __metadata: emoji-regex: "npm:^8.0.0" is-fullwidth-code-point: "npm:^3.0.0" strip-ansi: "npm:^6.0.1" - checksum: 1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b + checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b languageName: node linkType: hard @@ -3352,7 +3366,7 @@ __metadata: eastasianwidth: "npm:^0.2.0" emoji-regex: "npm:^9.2.2" strip-ansi: "npm:^7.0.1" - checksum: ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca + checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca languageName: node linkType: hard @@ -3361,7 +3375,7 @@ __metadata: resolution: "strip-ansi@npm:6.0.1" dependencies: ansi-regex: "npm:^5.0.1" - checksum: 1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 + checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 languageName: node linkType: hard @@ -3370,28 +3384,28 @@ __metadata: resolution: "strip-ansi@npm:7.1.0" dependencies: ansi-regex: "npm:^6.0.1" - checksum: a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 + checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 languageName: node linkType: hard "strip-bom@npm:^4.0.0": version: 4.0.0 resolution: "strip-bom@npm:4.0.0" - checksum: 26abad1172d6bc48985ab9a5f96c21e440f6e7e476686de49be813b5a59b3566dccb5c525b831ec54fe348283b47f3ffb8e080bc3f965fde12e84df23f6bb7ef + checksum: 10c0/26abad1172d6bc48985ab9a5f96c21e440f6e7e476686de49be813b5a59b3566dccb5c525b831ec54fe348283b47f3ffb8e080bc3f965fde12e84df23f6bb7ef languageName: node linkType: hard "strip-final-newline@npm:^2.0.0": version: 2.0.0 resolution: "strip-final-newline@npm:2.0.0" - checksum: bddf8ccd47acd85c0e09ad7375409d81653f645fda13227a9d459642277c253d877b68f2e5e4d819fe75733b0e626bac7e954c04f3236f6d196f79c94fa4a96f + checksum: 10c0/bddf8ccd47acd85c0e09ad7375409d81653f645fda13227a9d459642277c253d877b68f2e5e4d819fe75733b0e626bac7e954c04f3236f6d196f79c94fa4a96f languageName: node linkType: hard "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" - checksum: 9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd + checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd languageName: node linkType: hard @@ -3400,7 +3414,7 @@ __metadata: resolution: "supports-color@npm:5.5.0" dependencies: has-flag: "npm:^3.0.0" - checksum: 6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05 + checksum: 10c0/6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05 languageName: node linkType: hard @@ -3409,7 +3423,7 @@ __metadata: resolution: "supports-color@npm:7.2.0" dependencies: has-flag: "npm:^4.0.0" - checksum: afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 + checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 languageName: node linkType: hard @@ -3418,14 +3432,14 @@ __metadata: resolution: "supports-color@npm:8.1.1" dependencies: has-flag: "npm:^4.0.0" - checksum: ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 + checksum: 10c0/ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 languageName: node linkType: hard "supports-preserve-symlinks-flag@npm:^1.0.0": version: 1.0.0 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 + checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 languageName: node linkType: hard @@ -3439,7 +3453,7 @@ __metadata: minizlib: "npm:^2.1.1" mkdirp: "npm:^1.0.3" yallist: "npm:^4.0.0" - checksum: 02ca064a1a6b4521fef88c07d389ac0936730091f8c02d30ea60d472e0378768e870769ab9e986d87807bfee5654359cf29ff4372746cc65e30cbddc352660d8 + checksum: 10c0/02ca064a1a6b4521fef88c07d389ac0936730091f8c02d30ea60d472e0378768e870769ab9e986d87807bfee5654359cf29ff4372746cc65e30cbddc352660d8 languageName: node linkType: hard @@ -3447,11 +3461,14 @@ __metadata: version: 0.0.0-use.local resolution: "terra-test@workspace:." dependencies: + "@agoraio-extensions/cxx-parser": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser" "@agoraio-extensions/terra": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra" "@agoraio-extensions/terra-core": "git@github.com:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core" "@agoraio-extensions/terra-legacy-cxx-parser": "git@github.com:AgoraIO-Extensions/terra-legacy-cxx-parser.git#head=main" "@agoraio-extensions/terra_shared_configs": "git@github.com:AgoraIO-Extensions/terra_shared_configs.git#head=main" + "@types/lodash": "npm:^4" "@types/node": "npm:^20.6.0" + lodash: "npm:^4.17.21" ts-node: "npm:^10.9.1" typescript: "npm:^5.1.6" languageName: unknown @@ -3464,21 +3481,21 @@ __metadata: "@istanbuljs/schema": "npm:^0.1.2" glob: "npm:^7.1.4" minimatch: "npm:^3.0.4" - checksum: 019d33d81adff3f9f1bfcff18125fb2d3c65564f437d9be539270ee74b994986abb8260c7c2ce90e8f30162178b09dbbce33c6389273afac4f36069c48521f57 + checksum: 10c0/019d33d81adff3f9f1bfcff18125fb2d3c65564f437d9be539270ee74b994986abb8260c7c2ce90e8f30162178b09dbbce33c6389273afac4f36069c48521f57 languageName: node linkType: hard "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" - checksum: f935537799c2d1922cb5d6d3805f594388f75338fe7a4a9dac41504dd539704ca4db45b883b52e7b0aa5b2fd5ddadb1452bf95cd23a69da2f793a843f9451cc9 + checksum: 10c0/f935537799c2d1922cb5d6d3805f594388f75338fe7a4a9dac41504dd539704ca4db45b883b52e7b0aa5b2fd5ddadb1452bf95cd23a69da2f793a843f9451cc9 languageName: node linkType: hard "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" - checksum: b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7 + checksum: 10c0/b214d21dbfb4bce3452b6244b336806ffea9c05297148d32ebb428d5c43ce7545bdfc65a1ceb58c9ef4376a65c0cb2854d645f33961658b3e3b4f84910ddcdd7 languageName: node linkType: hard @@ -3487,13 +3504,13 @@ __metadata: resolution: "to-regex-range@npm:5.0.1" dependencies: is-number: "npm:^7.0.0" - checksum: 487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 + checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 languageName: node linkType: hard "ts-jest@npm:^29.1.0": - version: 29.1.1 - resolution: "ts-jest@npm:29.1.1" + version: 29.1.2 + resolution: "ts-jest@npm:29.1.2" dependencies: bs-logger: "npm:0.x" fast-json-stable-stringify: "npm:2.x" @@ -3520,13 +3537,13 @@ __metadata: optional: true bin: ts-jest: cli.js - checksum: 6c45e0aeeff9cc54a64f931c43e1b99f4a1f0ddf44786cc128e7e55603ab7473c8c8f62fd83bd7e51bfe83e3c0c683132152efaeb844516bf7c923f4e92d157d + checksum: 10c0/c2f51f0241f89d127d41392decbcb83b5dfd5e57ab9d50220aa7b7e2f9b3f3b07ccdbba33311284df1c41941879e4ddfad44b15a9d0da4b74bd1b98702b729df languageName: node linkType: hard "ts-node@npm:^10.9.1": - version: 10.9.1 - resolution: "ts-node@npm:10.9.1" + version: 10.9.2 + resolution: "ts-node@npm:10.9.2" dependencies: "@cspotcode/source-map-support": "npm:^0.8.0" "@tsconfig/node10": "npm:^1.0.7" @@ -3558,48 +3575,48 @@ __metadata: ts-node-script: dist/bin-script.js ts-node-transpile-only: dist/bin-transpile.js ts-script: dist/bin-script-deprecated.js - checksum: 95187932fb83f3901e22546bd2feeac7d2feb4f412f42ac3a595f049a23e8dcf70516dffb51866391228ea2dbcfaea039e250fb2bb334d48a86ab2b6aea0ae2d + checksum: 10c0/5f29938489f96982a25ba650b64218e83a3357d76f7bede80195c65ab44ad279c8357264639b7abdd5d7e75fc269a83daa0e9c62fd8637a3def67254ecc9ddc2 languageName: node linkType: hard "type-detect@npm:4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" - checksum: 8fb9a51d3f365a7de84ab7f73b653534b61b622aa6800aecdb0f1095a4a646d3f5eb295322127b6573db7982afcd40ab492d038cf825a42093a58b1e1353e0bd + checksum: 10c0/8fb9a51d3f365a7de84ab7f73b653534b61b622aa6800aecdb0f1095a4a646d3f5eb295322127b6573db7982afcd40ab492d038cf825a42093a58b1e1353e0bd languageName: node linkType: hard "type-fest@npm:^0.21.3": version: 0.21.3 resolution: "type-fest@npm:0.21.3" - checksum: 902bd57bfa30d51d4779b641c2bc403cdf1371fb9c91d3c058b0133694fcfdb817aef07a47f40faf79039eecbaa39ee9d3c532deff244f3a19ce68cea71a61e8 + checksum: 10c0/902bd57bfa30d51d4779b641c2bc403cdf1371fb9c91d3c058b0133694fcfdb817aef07a47f40faf79039eecbaa39ee9d3c532deff244f3a19ce68cea71a61e8 languageName: node linkType: hard "typescript@npm:^5.1.6": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" + version: 5.3.3 + resolution: "typescript@npm:5.3.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 91ae3e6193d0ddb8656d4c418a033f0f75dec5e077ebbc2bd6d76439b93f35683936ee1bdc0e9cf94ec76863aa49f27159b5788219b50e1cd0cd6d110aa34b07 + checksum: 10c0/e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f languageName: node linkType: hard "typescript@patch:typescript@npm%3A^5.1.6#optional!builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441" + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 062c1cee1990e6b9419ce8a55162b8dc917eb87f807e4de0327dbc1c2fa4e5f61bc0dd4e034d38ff541d1ed0479b53bcee8e4de3a4075c51a1724eb6216cb6f5 + checksum: 10c0/1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 languageName: node linkType: hard "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" - checksum: bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 + checksum: 10c0/bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 languageName: node linkType: hard @@ -3608,7 +3625,7 @@ __metadata: resolution: "unique-filename@npm:3.0.0" dependencies: unique-slug: "npm:^4.0.0" - checksum: 6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f + checksum: 10c0/6363e40b2fa758eb5ec5e21b3c7fb83e5da8dcfbd866cc0c199d5534c42f03b9ea9ab069769cc388e1d7ab93b4eeef28ef506ab5f18d910ef29617715101884f languageName: node linkType: hard @@ -3617,7 +3634,7 @@ __metadata: resolution: "unique-slug@npm:4.0.0" dependencies: imurmurhash: "npm:^0.1.4" - checksum: cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 + checksum: 10c0/cb811d9d54eb5821b81b18205750be84cb015c20a4a44280794e915f5a0a70223ce39066781a354e872df3572e8155c228f43ff0cce94c7cbf4da2cc7cbdd635 languageName: node linkType: hard @@ -3631,25 +3648,25 @@ __metadata: browserslist: ">= 4.21.0" bin: update-browserslist-db: cli.js - checksum: e52b8b521c78ce1e0c775f356cd16a9c22c70d25f3e01180839c407a5dc787fb05a13f67560cbaf316770d26fa99f78f1acd711b1b54a4f35d4820d4ea7136e6 + checksum: 10c0/e52b8b521c78ce1e0c775f356cd16a9c22c70d25f3e01180839c407a5dc787fb05a13f67560cbaf316770d26fa99f78f1acd711b1b54a4f35d4820d4ea7136e6 languageName: node linkType: hard "v8-compile-cache-lib@npm:^3.0.1": version: 3.0.1 resolution: "v8-compile-cache-lib@npm:3.0.1" - checksum: bdc36fb8095d3b41df197f5fb6f11e3a26adf4059df3213e3baa93810d8f0cc76f9a74aaefc18b73e91fe7e19154ed6f134eda6fded2e0f1c8d2272ed2d2d391 + checksum: 10c0/bdc36fb8095d3b41df197f5fb6f11e3a26adf4059df3213e3baa93810d8f0cc76f9a74aaefc18b73e91fe7e19154ed6f134eda6fded2e0f1c8d2272ed2d2d391 languageName: node linkType: hard "v8-to-istanbul@npm:^9.0.1": - version: 9.1.3 - resolution: "v8-to-istanbul@npm:9.1.3" + version: 9.2.0 + resolution: "v8-to-istanbul@npm:9.2.0" dependencies: "@jridgewell/trace-mapping": "npm:^0.3.12" "@types/istanbul-lib-coverage": "npm:^2.0.1" convert-source-map: "npm:^2.0.0" - checksum: 7acfc460731b629a0d547b231e9d510aaa826df67f4deeaeeb991b492f78faf3bb1aa4b54fa0f9b06d815bc69eb0a04a6c2180c16ba43a83cc5e5490fa160a96 + checksum: 10c0/e691ba4dd0dea4a884e52c37dbda30cce6f9eeafe9b26721e449429c6bb0f4b6d1e33fabe7711d0f67f7a34c3bfd56c873f7375bba0b1534e6a2843ce99550e5 languageName: node linkType: hard @@ -3658,7 +3675,7 @@ __metadata: resolution: "walker@npm:1.0.8" dependencies: makeerror: "npm:1.0.12" - checksum: a17e037bccd3ca8a25a80cb850903facdfed0de4864bd8728f1782370715d679fa72e0a0f5da7c1c1379365159901e5935f35be531229da53bbfc0efdabdb48e + checksum: 10c0/a17e037bccd3ca8a25a80cb850903facdfed0de4864bd8728f1782370715d679fa72e0a0f5da7c1c1379365159901e5935f35be531229da53bbfc0efdabdb48e languageName: node linkType: hard @@ -3669,7 +3686,7 @@ __metadata: isexe: "npm:^2.0.0" bin: node-which: ./bin/node-which - checksum: 66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f + checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f languageName: node linkType: hard @@ -3680,7 +3697,7 @@ __metadata: isexe: "npm:^3.1.1" bin: node-which: bin/which.js - checksum: 449fa5c44ed120ccecfe18c433296a4978a7583bf2391c50abce13f76878d2476defde04d0f79db8165bdf432853c1f8389d0485ca6e8ebce3bbcded513d5e6a + checksum: 10c0/449fa5c44ed120ccecfe18c433296a4978a7583bf2391c50abce13f76878d2476defde04d0f79db8165bdf432853c1f8389d0485ca6e8ebce3bbcded513d5e6a languageName: node linkType: hard @@ -3691,7 +3708,7 @@ __metadata: ansi-styles: "npm:^4.0.0" string-width: "npm:^4.1.0" strip-ansi: "npm:^6.0.0" - checksum: d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da + checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da languageName: node linkType: hard @@ -3702,14 +3719,14 @@ __metadata: ansi-styles: "npm:^6.1.0" string-width: "npm:^5.0.1" strip-ansi: "npm:^7.0.1" - checksum: 138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 + checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 languageName: node linkType: hard "wrappy@npm:1": version: 1.0.2 resolution: "wrappy@npm:1.0.2" - checksum: 56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 + checksum: 10c0/56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 languageName: node linkType: hard @@ -3719,42 +3736,42 @@ __metadata: dependencies: imurmurhash: "npm:^0.1.4" signal-exit: "npm:^3.0.7" - checksum: a2c282c95ef5d8e1c27b335ae897b5eca00e85590d92a3fd69a437919b7b93ff36a69ea04145da55829d2164e724bc62202cdb5f4b208b425aba0807889375c7 + checksum: 10c0/a2c282c95ef5d8e1c27b335ae897b5eca00e85590d92a3fd69a437919b7b93ff36a69ea04145da55829d2164e724bc62202cdb5f4b208b425aba0807889375c7 languageName: node linkType: hard "y18n@npm:^5.0.5": version: 5.0.8 resolution: "y18n@npm:5.0.8" - checksum: 4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 + checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 languageName: node linkType: hard "yallist@npm:^3.0.2": version: 3.1.1 resolution: "yallist@npm:3.1.1" - checksum: c66a5c46bc89af1625476f7f0f2ec3653c1a1791d2f9407cfb4c2ba812a1e1c9941416d71ba9719876530e3340a99925f697142989371b72d93b9ee628afd8c1 + checksum: 10c0/c66a5c46bc89af1625476f7f0f2ec3653c1a1791d2f9407cfb4c2ba812a1e1c9941416d71ba9719876530e3340a99925f697142989371b72d93b9ee628afd8c1 languageName: node linkType: hard "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0" - checksum: 2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a + checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a languageName: node linkType: hard "yaml@npm:^2.1.3": version: 2.3.4 resolution: "yaml@npm:2.3.4" - checksum: cf03b68f8fef5e8516b0f0b54edaf2459f1648317fc6210391cf606d247e678b449382f4bd01f77392538429e306c7cba8ff46ff6b37cac4de9a76aff33bd9e1 + checksum: 10c0/cf03b68f8fef5e8516b0f0b54edaf2459f1648317fc6210391cf606d247e678b449382f4bd01f77392538429e306c7cba8ff46ff6b37cac4de9a76aff33bd9e1 languageName: node linkType: hard "yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" - checksum: f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 + checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 languageName: node linkType: hard @@ -3769,20 +3786,20 @@ __metadata: string-width: "npm:^4.2.3" y18n: "npm:^5.0.5" yargs-parser: "npm:^21.1.1" - checksum: ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 + checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 languageName: node linkType: hard "yn@npm:3.1.1": version: 3.1.1 resolution: "yn@npm:3.1.1" - checksum: 0732468dd7622ed8a274f640f191f3eaf1f39d5349a1b72836df484998d7d9807fbea094e2f5486d6b0cd2414aad5775972df0e68f8604db89a239f0f4bf7443 + checksum: 10c0/0732468dd7622ed8a274f640f191f3eaf1f39d5349a1b72836df484998d7d9807fbea094e2f5486d6b0cd2414aad5775972df0e68f8604db89a239f0f4bf7443 languageName: node linkType: hard "yocto-queue@npm:^0.1.0": version: 0.1.0 resolution: "yocto-queue@npm:0.1.0" - checksum: dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f + checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f languageName: node linkType: hard diff --git a/tool/testcase_gen/bin/event_handler_gen_config.dart b/tool/testcase_gen/bin/event_handler_gen_config.dart index 18b00ecfa..1fd534f4e 100644 --- a/tool/testcase_gen/bin/event_handler_gen_config.dart +++ b/tool/testcase_gen/bin/event_handler_gen_config.dart @@ -18,7 +18,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -29,6 +31,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); {{TEST_CASE_BODY}} @@ -61,7 +64,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -72,6 +77,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); {{TEST_CASE_BODY}} @@ -100,7 +106,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -111,6 +119,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); {{TEST_CASE_BODY}} @@ -139,7 +148,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -150,6 +161,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); {{TEST_CASE_BODY}} @@ -178,7 +190,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -189,6 +203,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); {{TEST_CASE_BODY}} @@ -218,7 +233,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -229,6 +246,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); {{TEST_CASE_BODY}} @@ -258,7 +276,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -269,6 +289,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); {{TEST_CASE_BODY}} @@ -298,7 +319,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -309,6 +332,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -340,7 +364,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -351,6 +377,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); MediaPlayerController mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -382,7 +409,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -393,6 +422,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); MediaPlayerController mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -424,7 +454,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -435,6 +467,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); MediaPlayerController mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas()); await mediaPlayerController.initialize(); @@ -466,7 +499,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -477,6 +512,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaRecorder = (await rtcEngine.createMediaRecorder( RecorderStreamInfo(channelId: 'hello', uid: 0)))!; @@ -509,7 +545,9 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void generatedTestCases(IrisTester irisTester) { +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { {{TEST_CASES_CONTENT}} } ''', @@ -520,6 +558,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: 'app_id', areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); const musicContentCenterConfiguration = MusicContentCenterConfiguration( @@ -539,6 +578,50 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { registerFunctionName: 'registerEventHandler', unregisterFunctionName: 'unregisterEventHandler', ), + EventHandlerTemplatedTestCase( + callerObjClassName: 'H265Transcoder', + className: 'H265TranscoderObserver', + testCaseFileTemplate: ''' +$defaultHeader + +import 'dart:async'; +import 'dart:typed_data'; + +import 'package:agora_rtc_engine/agora_rtc_engine.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:iris_tester/iris_tester.dart'; +import 'package:iris_method_channel/iris_method_channel.dart'; + +import '../testcases/event_ids_mapping.dart'; + +void generatedTestCases(ValueGetter irisTester) { + {{TEST_CASES_CONTENT}} +} +''', + testCaseTemplate: ''' +testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { + RtcEngine rtcEngine = createAgoraRtcEngine(); + await rtcEngine.initialize(RtcEngineContext( + appId: 'app_id', + areaCode: AreaCode.areaCodeGlob.value(), + )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); + + final h265Transcoder = rtcEngine.getH265Transcoder(); + + {{TEST_CASE_BODY}} + + await rtcEngine.release(); + }, + timeout: const Timeout(Duration(minutes: 2)), +); +''', + callerObjName: 'h265Transcoder', + outputDir: outputDir, + registerFunctionName: 'registerTranscoderObserver', + unregisterFunctionName: 'unregisterTranscoderObserver', + ), ]; return templatedTestCases; } diff --git a/tool/testcase_gen/bin/method_call_gen_config.dart b/tool/testcase_gen/bin/method_call_gen_config.dart index d2776854b..19aa6f8a9 100644 --- a/tool/testcase_gen/bin/method_call_gen_config.dart +++ b/tool/testcase_gen/bin/method_call_gen_config.dart @@ -30,6 +30,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerCacheManager = getMediaPlayerCacheManager(rtcEngine); @@ -87,6 +88,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); try { {{TEST_CASE_BODY}} @@ -152,6 +154,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngineEx.setParameters('{"rtc.enable_debug_log": true}'); try { {{TEST_CASE_BODY}} @@ -213,6 +216,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final audioDeviceManager = rtcEngine.getAudioDeviceManager(); @@ -266,6 +270,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final videoDeviceManager = rtcEngine.getVideoDeviceManager(); @@ -321,6 +326,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaPlayerController = MediaPlayerController( rtcEngine: rtcEngine, canvas: const VideoCanvas(uid: 0)); @@ -378,6 +384,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaEngine = rtcEngine.getMediaEngine(); @@ -432,6 +439,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final mediaRecorder = (await rtcEngine.createMediaRecorder( RecorderStreamInfo(channelId: 'hello', uid: 0)))!; @@ -487,8 +495,10 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + await localSpatialAudioEngine.initialize(); try { {{TEST_CASE_BODY}} @@ -512,12 +522,14 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { ''', methodInvokeObjectName: 'localSpatialAudioEngine', outputDir: outputDir, - skipMemberFunctions: [], + skipMemberFunctions: [ + 'updateSelfPosition', + 'updateSelfPositionEx', + ], outputFileSuffixName: 'fake_test', ), - // paraphrase not support find the base class of class at this time, so we define the base class here MethoCallTemplatedTestCase( - className: 'BaseSpatialAudioEngine', + className: 'H265Transcoder', testCaseFileTemplate: ''' $defaultHeader @@ -527,7 +539,7 @@ import 'package:flutter/foundation.dart'; import 'package:iris_tester/iris_tester.dart'; import 'package:iris_method_channel/iris_method_channel.dart'; -void localSpatialAudioEngineSmokeTestCases() { +void generatedTestCases() { {{TEST_CASES_CONTENT}} } ''', @@ -541,8 +553,9 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); - final localSpatialAudioEngine = rtcEngine.getLocalSpatialAudioEngine(); + final h265Transcoder = rtcEngine.getH265Transcoder(); try { {{TEST_CASE_BODY}} @@ -558,19 +571,15 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { } } - await localSpatialAudioEngine.release(); await rtcEngine.release(); }, // skip: {{TEST_CASE_SKIP}}, ); ''', - methodInvokeObjectName: 'localSpatialAudioEngine', + methodInvokeObjectName: 'h265Transcoder', outputDir: outputDir, outputFileSuffixName: 'fake_test', - skipMemberFunctions: [ - 'updateSelfPosition', - 'updateSelfPositionEx', - ], + skipMemberFunctions: [], ), MethoCallTemplatedTestCase( className: 'MusicContentCenter', @@ -598,6 +607,7 @@ testWidgets('{{TEST_CASE_NAME}}', (WidgetTester tester) async { appId: engineAppId, areaCode: AreaCode.areaCodeGlob.value(), )); + await rtcEngine.setParameters('{"rtc.enable_debug_log": true}'); final musicContentCenter = rtcEngine.getMusicContentCenter(); diff --git a/tool/testcase_gen/bin/testcase_gen.dart b/tool/testcase_gen/bin/testcase_gen.dart index 10de7405c..0c00bb3b8 100644 --- a/tool/testcase_gen/bin/testcase_gen.dart +++ b/tool/testcase_gen/bin/testcase_gen.dart @@ -58,6 +58,7 @@ void main(List arguments) { path.join(srcDir, 'agora_spatial_audio.dart'), path.join(srcDir, 'agora_media_recorder.dart'), path.join(srcDir, 'agora_music_content_center.dart'), + path.join(srcDir, 'agora_h265_transcoder.dart'), path.join(srcDir, 'render/media_player_controller.dart'), ]; diff --git a/tool/testcase_gen/lib/default_generator.dart b/tool/testcase_gen/lib/default_generator.dart index 5436adda8..329980908 100644 --- a/tool/testcase_gen/lib/default_generator.dart +++ b/tool/testcase_gen/lib/default_generator.dart @@ -64,77 +64,83 @@ abstract class DefaultGenerator implements Generator { final parameterClass = parseResult.getClazz(parameter.type.type)[0]; final initBlockParameterListBuilder = StringBuffer(); final initBlockBuilder = StringBuffer(); - if (parameterClass.constructors.isEmpty) { - return ''; - } - - final constructor = parameterClass.constructors[0]; - - initBlockBuilder.write(parameterClass.name); - initBlockBuilder.write('('); - bool shouldBeConst = constructor.isConst; - - for (final cp in parameterClass.constructors[0].parameters) { - final adjustedParamName = _concatParamName(parameter.name, cp.name); - if (cp.isNamed) { - if (cp.type.type == 'Function') { - shouldBeConst = false; - stdout.writeln( - 'cp.type.parameters: ${cp.type.parameters.map((e) => e.name.toString()).toString()}'); - final functionParamsList = cp.type.parameters - .map((t) => '${t.type.type} ${t.name}') - .join(', '); - - initBlockBuilder.write('${cp.name}:($functionParamsList) { },'); - } else if (cp.isPrimitiveType) { - if (getParamType(cp) == 'Uint8List') { + bool shouldBeConst = false; + bool isNullable = false; + if (parameterClass.constructors.isEmpty) { + // If there're not constructors found, default to null. + shouldBeConst = true; + isNullable = true; + initBlockBuilder.write('null'); + } else { + final constructor = parameterClass.constructors[0]; + + initBlockBuilder.write(parameterClass.name); + initBlockBuilder.write('('); + + shouldBeConst = constructor.isConst; + + for (final cp in parameterClass.constructors[0].parameters) { + final adjustedParamName = _concatParamName(parameter.name, cp.name); + if (cp.isNamed) { + if (cp.type.type == 'Function') { shouldBeConst = false; - initBlockParameterListBuilder.writeln( - '${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + stdout.writeln( + 'cp.type.parameters: ${cp.type.parameters.map((e) => e.name.toString()).toString()}'); + final functionParamsList = cp.type.parameters + .map((t) => '${t.type.type} ${t.name}') + .join(', '); + + initBlockBuilder.write('${cp.name}:($functionParamsList) { },'); + } else if (cp.isPrimitiveType) { + if (getParamType(cp) == 'Uint8List') { + shouldBeConst = false; + initBlockParameterListBuilder.writeln( + '${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + } else { + initBlockParameterListBuilder.writeln( + 'const ${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + } + + initBlockBuilder.write('${cp.name}: $adjustedParamName,'); } else { - initBlockParameterListBuilder.writeln( - 'const ${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + createConstructorInitializerForMethodParameter( + parseResult, parameter, cp, initializerBuilder); + initBlockBuilder.write('${cp.name}: $adjustedParamName,'); } - - initBlockBuilder.write('${cp.name}: $adjustedParamName,'); } else { - createConstructorInitializerForMethodParameter( - parseResult, parameter, cp, initializerBuilder); - initBlockBuilder.write('${cp.name}: $adjustedParamName,'); - } - } else { - if (cp.type.type == 'Function') { - final functionParamsList = cp.type.parameters - .map((t) => '${t.type.type} ${t.name}') - .join(', '); - - initBlockBuilder.write('${cp.name}:($functionParamsList) { },'); - } else if (cp.isPrimitiveType) { - if (getParamType(cp) == 'Uint8List') { - initBlockParameterListBuilder.writeln( - '${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + if (cp.type.type == 'Function') { + final functionParamsList = cp.type.parameters + .map((t) => '${t.type.type} ${t.name}') + .join(', '); + + initBlockBuilder.write('${cp.name}:($functionParamsList) { },'); + } else if (cp.isPrimitiveType) { + if (getParamType(cp) == 'Uint8List') { + initBlockParameterListBuilder.writeln( + '${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + } else { + initBlockParameterListBuilder.writeln( + 'const ${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + } + + initBlockBuilder.write('$adjustedParamName,'); } else { - initBlockParameterListBuilder.writeln( - 'const ${getParamType(cp)} $adjustedParamName = ${cp.primitiveDefualtValue()};'); + createConstructorInitializerForMethodParameter( + parseResult, parameter, cp, initializerBuilder); + initBlockBuilder.write('$adjustedParamName,'); } - - initBlockBuilder.write('$adjustedParamName,'); - } else { - createConstructorInitializerForMethodParameter( - parseResult, parameter, cp, initializerBuilder); - initBlockBuilder.write('$adjustedParamName,'); } } - } - initBlockBuilder.write(')'); + initBlockBuilder.write(')'); + } initializerBuilder.write(initBlockParameterListBuilder.toString()); final keywordPrefix = shouldBeConst ? 'const' : 'final'; initializerBuilder.writeln( - '$keywordPrefix ${getParamType(parameter)} ${_concatParamName(rootParameter?.name, parameter.name)} = ${initBlockBuilder.toString()};'); + '$keywordPrefix ${getParamType(parameter)}${isNullable ? '?' : ''} ${_concatParamName(rootParameter?.name, parameter.name)} = ${initBlockBuilder.toString()};'); return _concatParamName(rootParameter?.name, parameter.name); } @@ -214,8 +220,8 @@ abstract class DefaultGenerator implements Generator { } } - String testCase = - testCaseTemplate.replaceAll('{{TEST_CASE_NAME}}', methodName); + String testCase = testCaseTemplate.replaceAll( + '{{TEST_CASE_NAME}}', '${clazz.name}.$methodName'); testCase = testCase.replaceAll('{{TEST_CASE_BODY}}', pb.toString()); testCase = testCase.replaceAll('{{TEST_CASE_SKIP}}', skipExpression); testCases.add(testCase); diff --git a/tool/testcase_gen/lib/templated_generator.dart b/tool/testcase_gen/lib/templated_generator.dart index d662b2206..639991bd5 100644 --- a/tool/testcase_gen/lib/templated_generator.dart +++ b/tool/testcase_gen/lib/templated_generator.dart @@ -239,38 +239,26 @@ class TemplatedGenerator extends DefaultGenerator { '${fireEventSuffix[0].toUpperCase()}${fireEventSuffix.substring(1)}'; } - fireEventImplBuffer.writeln('{'); - fireEventImplBuffer.writeln(pb.toString()); - fireEventImplBuffer.writeln(jsonBuffer.toString()); - fireEventImplBuffer.writeln('if (!kIsWeb) {'); - fireEventImplBuffer.writeln( - 'irisTester.fireEvent(\'${eventHandlerClazz.name}_$fireEventSuffix\', params: eventJson);'); - if (eventPrefixOverride != null) { - fireEventImplBuffer.writeln( - 'irisTester.fireEvent(\'${eventPrefixOverride}_$fireEventSuffix\', params: eventJson);'); - } - fireEventImplBuffer.writeln('} else {'); - // On web, the callback with the `RtcConnection` is appended `Ex` suffix - if (isSuffixEx) { - fireEventSuffix = '${fireEventSuffix}Ex'; - } - fireEventImplBuffer.writeln( - 'final ret = irisTester.fireEvent(\'${eventHandlerClazz.name}_$fireEventSuffix\', params: eventJson);'); - + final event = '${eventHandlerClazz.name}_$fireEventSuffix'; fireEventImplBuffer.writeln(''' -// Delay 200 milliseconds to ensure the callback is called. -await Future.delayed(const Duration(milliseconds: 200)); -// TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. -if (ret) { - if (!$eventCompleterName.isCompleted) { - $eventCompleterName.complete(true); +{ + ${pb.toString()} + ${jsonBuffer.toString()} + final eventIds = eventIdsMapping['$event'] ?? []; + for (final event in eventIds) { + final ret = irisTester().fireEvent(event, params: eventJson); + // Delay 200 milliseconds to ensure the callback is called. + await Future.delayed(const Duration(milliseconds: 200)); + // TODO(littlegnal): Most of callbacks on web are not implemented, we're temporarily skip these callbacks at this time. + if (kIsWeb && ret) { + if (!$eventCompleterName.isCompleted) { + $eventCompleterName.complete(true); + } + } } } '''); - fireEventImplBuffer.writeln('}'); - fireEventImplBuffer.writeln('}'); - bodyBuffer.writeln(''' final $eventCompleterName = Completer(); final $eventHandlerName = ${eventHandlerClazz.name}( @@ -296,8 +284,8 @@ expect(eventCalled, isTrue); await Future.delayed(const Duration(milliseconds: 500)); '''); - String testCase = - testCasesContentTemplate.replaceAll('{{TEST_CASE_NAME}}', eventName); + String testCase = testCasesContentTemplate.replaceAll( + '{{TEST_CASE_NAME}}', '${eventHandlerClazz.name}.$eventName'); testCase = testCase.replaceAll('{{TEST_CASE_BODY}}', bodyBuffer.toString()); diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 42f4ff576..61bcead74 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -12,8 +12,8 @@ project(${PROJECT_NAME} LANGUAGES CXX) # not be changed set(PLUGIN_NAME "agora_rtc_engine_plugin") -set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.2.6-build.3_DCG_Windows_Video_20231116_0243.zip") -set(IRIS_SDK_DOWNLOAD_NAME "iris_4.2.6-build.3_DCG_Windows") +set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.3.0-build.2_DCG_Windows_Video_20240219_0110.zip") +set(IRIS_SDK_DOWNLOAD_NAME "iris_4.3.0-build.2_DCG_Windows") set(RTC_SDK_DOWNLOAD_NAME "Agora_Native_SDK_for_Windows_FULL") set(IRIS_SDK_VERSION "v3_6_2_fix.1")