Skip to content

Commit f58cb72

Browse files
authored
chore(repo): bump webrtc version (#1116)
* bump webrtc version * tweak
1 parent 4f7a90c commit f58cb72

File tree

8 files changed

+35
-11
lines changed

8 files changed

+35
-11
lines changed

melos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ command:
2222
device_info_plus: ^12.1.0
2323
share_plus: ^11.0.0
2424
stream_chat_flutter: ^9.17.0
25-
stream_webrtc_flutter: ^2.1.0
25+
stream_webrtc_flutter: ^2.2.0
2626
stream_video: ^0.11.2
2727
stream_video_flutter: ^0.11.2
2828
stream_video_noise_cancellation: ^0.11.2

packages/stream_video/lib/src/webrtc/rtc_media_device/rtc_media_device_notifier.dart

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ class RtcMediaDeviceNotifier {
4444
/// [onInterruptionStart] is called when the call interruption begins.
4545
/// [onInterruptionEnd] is called when the call interruption ends.
4646
/// [androidInterruptionSource] specifies the source of the interruption on Android.
47-
/// [androidAudioAttributesUsageType] and [androidAudioAttributesContentType] allow you to specify
48-
/// the audio attributes that will be used when requesting audio focus.
4947
///
5048
/// On iOS, interruptions can occur due to:
5149
/// - Incoming phone calls
@@ -71,15 +69,19 @@ class RtcMediaDeviceNotifier {
7169
void Function()? onInterruptionEnd,
7270
rtc.AndroidInterruptionSource androidInterruptionSource =
7371
rtc.AndroidInterruptionSource.audioFocusAndTelephony,
72+
@Deprecated(
73+
'Audio focus is now handled in a way that does not require this parameter. It will be removed in the next major version.',
74+
)
7475
rtc.AndroidAudioAttributesUsageType? androidAudioAttributesUsageType,
76+
@Deprecated(
77+
'Audio focus is now handled in a way that does not require this parameter. It will be removed in the next major version.',
78+
)
7579
rtc.AndroidAudioAttributesContentType? androidAudioAttributesContentType,
7680
}) {
7781
return rtc.handleCallInterruptionCallbacks(
7882
onInterruptionStart,
7983
onInterruptionEnd,
8084
androidInterruptionSource: androidInterruptionSource,
81-
androidAudioAttributesUsageType: androidAudioAttributesUsageType,
82-
androidAudioAttributesContentType: androidAudioAttributesContentType,
8385
);
8486
}
8587

@@ -173,4 +175,26 @@ class RtcMediaDeviceNotifier {
173175
Future<void> triggeriOSAudioRouteSelectionUI() {
174176
return rtc.Helper.triggeriOSAudioRouteSelectionUI();
175177
}
178+
179+
/// Temporarily mutes all audio output (playout) from the app.
180+
/// This does not affect the microphone or remote track subscriptions.
181+
/// Use as a global "mute all sounds" toggle or when the app goes to background.
182+
Future<void> pauseAudioPlayout() {
183+
return rtc.Helper.pauseAudioPlayout();
184+
}
185+
186+
/// Resumes audio output (playout) muted via [pauseAudioPlayout].
187+
/// Does not change microphone state or remote track subscriptions.
188+
Future<void> resumeAudioPlayout() {
189+
return rtc.Helper.resumeAudioPlayout();
190+
}
191+
192+
/// Regains Android audio focus if it was lost.
193+
///
194+
/// Note: On Android, audio focus may not be restored automatically.
195+
/// To ensure you receive `onInterruptionEnd`, explicitly call
196+
/// [resumeAudioPlayout] (e.g., when the app resumes from background).
197+
Future<void> regainAndroidAudioFocus() {
198+
return rtc.Helper.regainAndroidAudioFocus();
199+
}
176200
}

packages/stream_video/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies:
3131
rxdart: ^0.28.0
3232
sdp_transform: ^0.3.2
3333
state_notifier: ^1.0.0
34-
stream_webrtc_flutter: ^2.1.0
34+
stream_webrtc_flutter: ^2.2.0
3535
synchronized: ^3.1.0
3636
system_info2: ^4.0.0
3737
tart: ^0.6.0

packages/stream_video_filters/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
sdk: flutter
1616
plugin_platform_interface: ^2.0.2
1717
stream_video: ^0.11.2
18-
stream_webrtc_flutter: ^2.1.0
18+
stream_webrtc_flutter: ^2.2.0
1919

2020
dev_dependencies:
2121
flutter_lints: ^6.0.0

packages/stream_video_flutter/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies:
3131
stream_video: ^0.11.2
3232
stream_video_flutter: ^0.11.2
3333
stream_video_push_notification: ^0.11.2
34-
stream_webrtc_flutter: ^2.1.0
34+
stream_webrtc_flutter: ^2.2.0
3535

3636
dependency_overrides:
3737
stream_video:

packages/stream_video_flutter/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
rate_limiter: ^1.0.0
2626
rxdart: ^0.28.0
2727
stream_video: ^0.11.2
28-
stream_webrtc_flutter: ^2.1.0
28+
stream_webrtc_flutter: ^2.2.0
2929
visibility_detector: ^0.4.0+2
3030

3131
dev_dependencies:

packages/stream_video_noise_cancellation/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
sdk: flutter
1616
plugin_platform_interface: ^2.0.2
1717
stream_video: ^0.11.2
18-
stream_webrtc_flutter: ^2.1.0
18+
stream_webrtc_flutter: ^2.2.0
1919

2020
dev_dependencies:
2121
flutter_lints: ^6.0.0

packages/stream_video_push_notification/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies:
2323
shared_preferences: ^2.5.3
2424
stream_video: ^0.11.2
2525
stream_video_flutter: ^0.11.2
26-
stream_webrtc_flutter: ^2.1.0
26+
stream_webrtc_flutter: ^2.2.0
2727
uuid: ^4.5.1
2828

2929
dev_dependencies:

0 commit comments

Comments
 (0)