Skip to content

Commit 82e2b24

Browse files
committed
Merge branch 'original_main' into chore/sync_0.13.1
# Conflicts: # CHANGELOG.md # android/src/main/java/io/getstream/webrtc/flutter/GetUserMediaImpl.java # android/src/main/java/io/getstream/webrtc/flutter/SurfaceTextureRenderer.java # pubspec.yaml
2 parents 27f4312 + 44af4a5 commit 82e2b24

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11

22
# Changelog
33

4+
[1.0.2] - 2025-03-03
5+
* Synced flutter-webrtc v0.13.1
6+
* [Android] fix: remove setPreferredInputDevice when getUserAduio. (#1808)
7+
* [Web] fix: race condition in RTCVideoRenderer for Web (#1805)
8+
* [Android] fix: Migrate from onSurfaceDestroyed to onSurfaceCleanup for SurfaceProducer.Callback. (#1806)
9+
410
[1.0.1] - 2025-04-01
511
* Fixed the dart_webrtc version constraint
612

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,6 @@ private ConstraintsMap getUserAudio(ConstraintsMap constraints, MediaStream stre
376376

377377
mAudioSources.put(trackId, audioSource);
378378

379-
if (deviceId != null) {
380-
try {
381-
if (VERSION.SDK_INT >= VERSION_CODES.M) {
382-
setPreferredInputDevice(deviceId);
383-
}
384-
} catch (Exception e) {
385-
Log.e(TAG, "setPreferredInputDevice failed", e);
386-
}
387-
}
388-
389379
AudioTrack track = pcFactory.createAudioTrack(trackId, audioSource);
390380
stream.addTrack(track);
391381

lib/src/web/rtc_video_renderer_impl.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ class RTCVideoRenderer extends ValueNotifier<RTCVideoValue>
9292

9393
String get viewType => 'RTCVideoRenderer-$textureId';
9494

95-
void _updateAllValues() {
96-
final element = findHtmlView();
95+
void _updateAllValues(web.HTMLVideoElement fallback) {
96+
final element = findHtmlView() ?? fallback;
9797
value = value.copyWith(
9898
rotation: 0,
99-
width: element?.videoWidth.toDouble() ?? 0.0,
100-
height: element?.videoHeight.toDouble() ?? 0.0,
99+
width: element.videoWidth.toDouble(),
100+
height: element.videoHeight.toDouble(),
101101
renderVideo: renderVideo,
102102
);
103103
}
@@ -273,13 +273,13 @@ class RTCVideoRenderer extends ValueNotifier<RTCVideoValue>
273273

274274
_subscriptions.add(
275275
element.onCanPlay.listen((dynamic _) {
276-
_updateAllValues();
276+
_updateAllValues(element);
277277
}),
278278
);
279279

280280
_subscriptions.add(
281281
element.onResize.listen((dynamic _) {
282-
_updateAllValues();
282+
_updateAllValues(element);
283283
onResize?.call();
284284
}),
285285
);

0 commit comments

Comments
 (0)