diff --git a/CHANGELOG.md b/CHANGELOG.md index ca423562ad..d739c5a13e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog +[0.13.1] - 2025-04-03 + +* [Android] fix: remove setPreferredInputDevice when getUserAduio. (#1808) +* [Web] fix: race condition in RTCVideoRenderer for Web (#1805) +* [Android] fix: Migrate from onSurfaceDestroyed to onSurfaceCleanup for SurfaceProducer.Callback. (#1806) + [0.13.0] - 2025-03-24 * [All] feat: add getBufferedAmount for DataChannel. (#1796) diff --git a/android/src/main/java/com/cloudwebrtc/webrtc/GetUserMediaImpl.java b/android/src/main/java/com/cloudwebrtc/webrtc/GetUserMediaImpl.java index b72236600f..a03494a44e 100755 --- a/android/src/main/java/com/cloudwebrtc/webrtc/GetUserMediaImpl.java +++ b/android/src/main/java/com/cloudwebrtc/webrtc/GetUserMediaImpl.java @@ -365,17 +365,6 @@ private ConstraintsMap getUserAudio(ConstraintsMap constraints, MediaStream stre String trackId = stateProvider.getNextTrackUUID(); PeerConnectionFactory pcFactory = stateProvider.getPeerConnectionFactory(); AudioSource audioSource = pcFactory.createAudioSource(audioConstraints); - - if (deviceId != null) { - try { - if (VERSION.SDK_INT >= VERSION_CODES.M) { - setPreferredInputDevice(deviceId); - } - } catch (Exception e) { - Log.e(TAG, "setPreferredInputDevice failed", e); - } - } - AudioTrack track = pcFactory.createAudioTrack(trackId, audioSource); stream.addTrack(track); diff --git a/android/src/main/java/com/cloudwebrtc/webrtc/SurfaceTextureRenderer.java b/android/src/main/java/com/cloudwebrtc/webrtc/SurfaceTextureRenderer.java index c4daa8acdd..faa783a351 100755 --- a/android/src/main/java/com/cloudwebrtc/webrtc/SurfaceTextureRenderer.java +++ b/android/src/main/java/com/cloudwebrtc/webrtc/SurfaceTextureRenderer.java @@ -122,7 +122,7 @@ public void onSurfaceAvailable() { } @Override - public void onSurfaceDestroyed() { + public void onSurfaceCleanup() { surfaceDestroyed(); } } diff --git a/lib/src/web/rtc_video_renderer_impl.dart b/lib/src/web/rtc_video_renderer_impl.dart index 826a7f3dac..70580fc717 100644 --- a/lib/src/web/rtc_video_renderer_impl.dart +++ b/lib/src/web/rtc_video_renderer_impl.dart @@ -92,12 +92,12 @@ class RTCVideoRenderer extends ValueNotifier String get viewType => 'RTCVideoRenderer-$textureId'; - void _updateAllValues() { - final element = findHtmlView(); + void _updateAllValues(web.HTMLVideoElement fallback) { + final element = findHtmlView() ?? fallback; value = value.copyWith( rotation: 0, - width: element?.videoWidth.toDouble() ?? 0.0, - height: element?.videoHeight.toDouble() ?? 0.0, + width: element.videoWidth.toDouble(), + height: element.videoHeight.toDouble(), renderVideo: renderVideo, ); } @@ -273,13 +273,13 @@ class RTCVideoRenderer extends ValueNotifier _subscriptions.add( element.onCanPlay.listen((dynamic _) { - _updateAllValues(); + _updateAllValues(element); }), ); _subscriptions.add( element.onResize.listen((dynamic _) { - _updateAllValues(); + _updateAllValues(element); onResize?.call(); }), ); diff --git a/pubspec.yaml b/pubspec.yaml index 5359459f74..bfac287e6d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_webrtc description: Flutter WebRTC plugin for iOS/Android/Destkop/Web, based on GoogleWebRTC. -version: 0.13.0 +version: 0.13.1 homepage: https://github.com/cloudwebrtc/flutter-webrtc environment: sdk: '>=3.3.0 <4.0.0' pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy