Skip to content

chore: sync with flutter_webrtc 0.13.1 #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

# Changelog

[1.0.2] - 2025-03-03
* Synced flutter-webrtc v0.13.1
* [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)

[1.0.1] - 2025-04-01
* Fixed the dart_webrtc version constraint

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,6 @@ private ConstraintsMap getUserAudio(ConstraintsMap constraints, MediaStream stre

mAudioSources.put(trackId, audioSource);

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);

Expand Down
2 changes: 1 addition & 1 deletion ios/stream_webrtc_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'stream_webrtc_flutter'
s.version = '1.0.0'
s.version = '1.0.2'
s.summary = 'Flutter WebRTC plugin for iOS.'
s.description = <<-DESC
A new flutter plugin project.
Expand Down
12 changes: 6 additions & 6 deletions lib/src/web/rtc_video_renderer_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ class RTCVideoRenderer extends ValueNotifier<RTCVideoValue>

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,
);
}
Expand Down Expand Up @@ -273,13 +273,13 @@ class RTCVideoRenderer extends ValueNotifier<RTCVideoValue>

_subscriptions.add(
element.onCanPlay.listen((dynamic _) {
_updateAllValues();
_updateAllValues(element);
}),
);

_subscriptions.add(
element.onResize.listen((dynamic _) {
_updateAllValues();
_updateAllValues(element);
onResize?.call();
}),
);
Expand Down
2 changes: 1 addition & 1 deletion macos/stream_webrtc_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'stream_webrtc_flutter'
s.version = '1.0.0'
s.version = '1.0.2'
s.summary = 'Flutter WebRTC plugin for macOS.'
s.description = <<-DESC
A new flutter plugin project.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: stream_webrtc_flutter
description: Flutter WebRTC plugin for iOS/Android/Destkop/Web, based on GoogleWebRTC.
version: 1.0.1
version: 1.0.2
homepage: https://github.com/GetStream/webrtc-flutter
environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down