✨ Fake call audio level
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user