Fake call audio level

This commit is contained in:
2025-10-19 19:34:22 +08:00
parent 844efcda1a
commit 0622498f4e
4 changed files with 164 additions and 18 deletions

View File

@@ -247,8 +247,15 @@ class CallControlsBar extends HookConsumerWidget {
String deviceType,
) async {
try {
// TODO: Implement device switching for WebRTC
// This would require restarting the media stream with the new device
final callNotifier = ref.read(callNotifierProvider.notifier);
if (callNotifier.webrtcManager == null) return;
if (deviceType == 'videoinput') {
await callNotifier.webrtcManager!.switchCamera(device.deviceId);
} else if (deviceType == 'audioinput') {
await callNotifier.webrtcManager!.switchMicrophone(device.deviceId);
}
if (context.mounted) {
showSnackBar(
'switchedTo'.tr(

View File

@@ -16,8 +16,7 @@ class SpeakingRippleAvatar extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final avatarRadius = size / 2;
// TODO: Implement audio level detection for WebRTC
final clampedLevel = 0.0;
final clampedLevel = live.audioLevel.clamp(0.0, 1.0);
final rippleRadius = avatarRadius + clampedLevel * (size * 0.333);
return SizedBox(
width: size + 8,