Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8b31a5e
fix: eliminate video playback flicker during resolution changes (#2306)
peilinok May 21, 2025
a7a5a01
chore: upgrade dependency to 4.5.2-build.2 for macOS (#2338)
peilinok Jun 10, 2025
3ddeae4
chore: add swift package manager support (#2327)
alejandro-all-win-software Jun 16, 2025
c5e724b
fix: windows-2019 is deprecated (#2352)
peilinok Jun 25, 2025
a2ddae1
fix: compile issue of example with lower version of flutter (#2351)
peilinok Jun 25, 2025
40ae7e1
chore: upgrade iris_method_channel to 2.2.3 (#2353)
peilinok Jun 25, 2025
a4426d0
feat: support Picture-in-Picture for iOS and Android (#2316)
peilinok Jun 25, 2025
9ec9c72
fix: use pip from iris to fix renderer issue (#2357) (#2358)
peilinok Jul 2, 2025
7690fa4
fix: upgrade sdk from build.4 to build.5 for iOS (#2370)
peilinok Jul 4, 2025
8715a7c
fix: upgrade sdk from build.4 to build.6 for iOS (#2374)
peilinok Jul 7, 2025
c5eaf3b
chore: update example project gradle config
ZGaopeng Jul 11, 2025
8dc0bc5
feat: migrate CI to use Flutter stable channel and update dependencies
ZGaopeng Jul 11, 2025
c194987
ci: optimize Flutter version management in GitHub Actions workflow
ZGaopeng Jul 11, 2025
c9b3d52
fix: resolve env context access issue in reusable workflow matrix
ZGaopeng Jul 11, 2025
083736f
test: fix Android and web rendering test build configuration
ZGaopeng Jul 14, 2025
9bbea21
chore: upgrade gradle wrapper to 8.10 for test applications
ZGaopeng Jul 14, 2025
0d4efd7
chore: add namespace configuration for AGP compatibility
ZGaopeng Jul 14, 2025
642d7a2
chore: update Android SDK and dependencies for test apps
ZGaopeng Jul 14, 2025
19d3731
ci: optimize GitHub Actions workflow configuration
ZGaopeng Jul 16, 2025
2e496da
fix: add delay before dispose in rendering tests
ZGaopeng Jul 21, 2025
1095bef
feat: increase Gradle JVM memory allocation
ZGaopeng Jul 21, 2025
56d2ea9
fix: update the maximum difference value for video rendering
ZGaopeng Jul 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 85 additions & 37 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ concurrency:

on:
workflow_call:
inputs:
flutter-versions:
description: 'Flutter versions to test (JSON array)'
required: false
default: '["3.32.5"]'
type: string
secrets:
APP_ID:
required: true
Expand Down Expand Up @@ -71,6 +77,7 @@ jobs:
with:
name: agora_rtc_engine_docs.zip
path: agora_rtc_engine_docs.zip

pub_publish_check:
name: pub publish check
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
Expand All @@ -84,12 +91,12 @@ jobs:
- run: bash ci/dart_pub_publish_check.sh

integration_test_android:
name: Run Flutter Android Integration Tests
name: Run Flutter Android Integration Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.0", "3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: ubuntu-latest
timeout-minutes: 120
env:
Expand Down Expand Up @@ -122,12 +129,12 @@ jobs:
script: bash ci/run_flutter_integration_test_android.sh

integration_test_ios:
name: Run Flutter iOS Integration Tests
name: Run Flutter iOS Integration Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.0", "3.16"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: macos-latest
timeout-minutes: 120
env:
Expand Down Expand Up @@ -164,12 +171,12 @@ jobs:
path: logs-ios/*

integration_test_macos:
name: Run Flutter macOS Integration Tests
name: Run Flutter macOS Integration Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.0"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: macos-latest
timeout-minutes: 120
env:
Expand Down Expand Up @@ -209,14 +216,42 @@ jobs:
name: iris-logs-macos-${{ matrix.version }}
path: iris-logs-macos/*

integration_test_swiftpm:
name: Run Flutter SwiftPM Integration Tests (${{ matrix.os }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
os: ["macos", "ios"]
runs-on: macos-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Run flutter integration test swiftpm for ${{ matrix.os }}
if: ${{ matrix.os == 'macos' }}
run: |
flutter pub get
flutter build ${{ matrix.os }}
working-directory: test_shard/integration_test_swiftpm
- name: Run flutter integration test swiftpm for ${{ matrix.os }}
if: ${{ matrix.os == 'ios' }}
run: |
flutter pub get
flutter build ${{ matrix.os }} --no-codesign
working-directory: test_shard/integration_test_swiftpm

integration_test_windows:
name: Run Flutter Windows Integration Tests
name: Run Flutter Windows Integration Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.0", "3.24.5"]
runs-on: windows-2019
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: windows-2022
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.APP_ID }}
Expand All @@ -243,11 +278,12 @@ jobs:
path: ./CrashDumps/*

integration_test_web:
name: Run Flutter Web Integration Tests
name: Run Flutter Web Integration Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
Expand All @@ -265,12 +301,12 @@ jobs:
bash ci/run_flutter_integration_test_web.sh

build_android_ubuntu:
name: Build Android on Ubuntu
name: Build Android on Ubuntu ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.12", "3.24.5"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -289,13 +325,13 @@ jobs:
working-directory: example

build_android_windows:
name: Build Android on Windows
name: Build Android on Windows ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.12", "3.24.5"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838
runs-on: windows-2019
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Install JDK
Expand All @@ -313,12 +349,12 @@ jobs:
working-directory: example

build_ios:
name: Build iOS
name: Build iOS ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.0"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: macos-latest
timeout-minutes: 120
steps:
Expand All @@ -334,11 +370,12 @@ jobs:

# This job aim to cover https://github.com/flutter/flutter/issues/135739
build_ios_xcode_15:
name: Build iOS with xcode 15.x
name: Build iOS with xcode 15.x ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: macos-13
timeout-minutes: 120
steps:
Expand All @@ -359,12 +396,12 @@ jobs:
working-directory: example

build_web:
name: Build Web
name: Build Web ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.7.0", "3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
Expand All @@ -381,10 +418,16 @@ jobs:
rendering_test_android:
name: Run Flutter Android Rendering Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: ubuntu-latest
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.APP_ID }}
GRADLE_OPTS: "-Xmx16384M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
ORG_GRADLE_PROJECT_GRADLE_OPTS: "-Xmx8192M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
steps:
- uses: actions/checkout@v3
- name: Install JDK
Expand All @@ -394,7 +437,7 @@ jobs:
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.5"
flutter-version: ${{ matrix.version }}
cache: true
- name: Enable KVM
run: |
Expand All @@ -407,9 +450,9 @@ jobs:
api-level: 31
arch: x86_64
profile: pixel_5
ram-size: 2048M
heap-size: 4096M
disk-size: 8192M
ram-size: 4096M
heap-size: 8192M
disk-size: 16384M
script: bash ci/rendering_test_android.sh

- uses: actions/upload-artifact@v4
Expand All @@ -419,11 +462,12 @@ jobs:
path: test_shard/rendering_test/screenshot/*.debug.png

rendering_test_ios:
name: Run Flutter iOS Rendering Tests
name: Run Flutter iOS Rendering Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: macos-13 # Rendering test on ios simulator need macos 13+
timeout-minutes: 60
env:
Expand All @@ -446,11 +490,12 @@ jobs:
path: test_shard/rendering_test/screenshot/*.debug.png

rendering_test_macos:
name: Run Flutter macOS Rendering Tests
name: Run Flutter macOS Rendering Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: macos-latest
timeout-minutes: 120
env:
Expand All @@ -473,12 +518,13 @@ jobs:
path: test_shard/rendering_test/screenshot/*.debug.png

rendering_test_windows:
name: Run Flutter Windows Rendering Tests
name: Run Flutter Windows Rendering Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.24.5"]
runs-on: windows-2019
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: windows-2022
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.APP_ID }}
Expand All @@ -502,11 +548,12 @@ jobs:
path: test_shard/rendering_test/screenshot/*.debug.png

rendering_test_web:
name: Run Flutter Web Rendering Tests
name: Run Flutter Web Rendering Tests ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
Expand All @@ -532,11 +579,12 @@ jobs:
path: test_shard/rendering_test/screenshot/*.debug.png

check_android15_16k_page_alignment:
name: Check android15 16k page size alignment
name: Check android15 16k page size alignment ( ${{ matrix.version }})
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
fail-fast: false
matrix:
version: ["3.24.5"]
version: ${{ fromJSON(inputs.flutter-versions) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ third_party/
test_shard/**/scripts/iris_web_version.js
test_shard/**/web/iris_web_version.js

artifacts
artifacts
DerivedData
5 changes: 4 additions & 1 deletion .pubignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
integration_test_app/
tool/
test_shard/
test_shard/
docs/
ci/
scripts/
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ Please refer to the [Flutter documentation](https://docs.flutter.dev/platform-in
* [Windows](https://api-ref.agora.io/en/video-sdk/cpp/4.x/API/rtc_api_overview_ng.html)
* [Web](https://api-ref.agora.io/en/video-sdk/web/4.x/index.html)

## Integration document

* [Picture-in-Picture](docs/integration/Picture-in-Picture.md)

## Feedback

If you have any problems or suggestions regarding the sample projects, feel free to file an [issue](https://github.com/AgoraIO-Community/agora_rtc_engine/issues) OR pull request.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {
api fileTree(dir: "libs", include: ["*.jar"])
} else {
// iris dependencies start
api 'io.agora.rtc:iris-rtc:4.5.2-build.1'
api 'io.agora.rtc:iris-rtc:4.5.2.140-build.4'
// iris dependencies end

// native dependencies start
Expand Down
8 changes: 7 additions & 1 deletion android/src/main/cpp/iris_rtc_rendering_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ class NativeTextureRenderer final
env->DeleteLocalRef(j_caller_class);

native_windows_ = ANativeWindow_fromSurface(env, surface_jni);
gl_context_ = std::make_shared<GLContext>(native_windows_);

IrisRtcVideoFrameConfig config;
config.uid = uid;
Expand Down Expand Up @@ -739,6 +738,13 @@ class NativeTextureRenderer final
NotifySizeChangeCallback(video_frame->width, video_frame->height);
width_ = video_frame->width;
height_ = video_frame->height;

rendering_op_.reset();
gl_context_.reset();
}

if (!gl_context_) {
gl_context_ = std::make_shared<GLContext>(native_windows_);
}

if (!gl_context_->SetupSurface(native_windows_)) {
Expand Down
Loading
Loading