Skip to content

Commit 4055b1a

Browse files
authored
Merge pull request #41 from GetStream/chore/onSurfaceDestroyed-fixed
chore: deprecated onSurfaceDestroyed changed to onSurfaceCleanup
2 parents b52f283 + 6fcf4ba commit 4055b1a

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
[1.0.12] - 2025-09-30
55
* [Android] Changed the configuration used when creating EGL rendering context to one that supports alpha channel to fix an issue with Impeller blending background with video texture on some devices.
6+
* [Android] Migrate from onSurfaceDestroyed to onSurfaceCleanup for SurfaceProducer.Callback.
67

78
[1.0.11] - 2025-08-13
89
* [Android] Added option to configure Android audio attributes in AudioFocusManager

android/src/main/java/io/getstream/webrtc/flutter/SurfaceTextureRenderer.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,20 @@ public void surfaceCreated(final TextureRegistry.SurfaceProducer producer) {
115115
ThreadUtils.checkIsOnMainThread();
116116
this.producer = producer;
117117
this.producer.setCallback(
118-
new TextureRegistry.SurfaceProducer.Callback() {
119-
@Override
120-
public void onSurfaceAvailable() {
121-
// Do surface initialization here, and draw the current frame.
122-
}
118+
new TextureRegistry.SurfaceProducer.Callback() {
119+
@Override
120+
public void onSurfaceAvailable() {
121+
// Do surface initialization here, and draw the current frame.
122+
}
123123

124-
@Override
125-
public void onSurfaceDestroyed() {
126-
surfaceDestroyed();
127-
}
128-
}
129-
);
124+
@Override
125+
public void onSurfaceCleanup() {
126+
onSurfaceCleanup();
127+
}
128+
});
130129
}
131130

132-
public void surfaceDestroyed() {
131+
public void onSurfaceCleanup() {
133132
ThreadUtils.checkIsOnMainThread();
134133
final CountDownLatch completionLatch = new CountDownLatch(1);
135134
releaseEglSurface(completionLatch::countDown);

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: Flutter WebRTC plugin for iOS/Android/Destkop/Web, based on GoogleW
33
version: 1.0.12
44
homepage: https://github.com/GetStream/webrtc-flutter
55
environment:
6-
sdk: ">=3.3.0 <4.0.0"
7-
flutter: ">=1.22.0"
6+
sdk: ">=3.6.0 <4.0.0"
7+
flutter: ">=3.27.0"
88

99
dependencies:
1010
collection: ^1.17.0

0 commit comments

Comments
 (0)