diff --git a/lib/features/calls/presentation/call_screen.dart b/lib/features/calls/presentation/call_screen.dart index d5d5dc7..40af8e3 100644 --- a/lib/features/calls/presentation/call_screen.dart +++ b/lib/features/calls/presentation/call_screen.dart @@ -109,11 +109,15 @@ class _CallScreenState extends ConsumerState { /// Listens to the LiveKit Room's ChangeNotifier so it rebuilds when /// remote participants join/leave or publish/unpublish tracks. +/// Also watches callControllerProvider so it rebuilds when the call state +/// transitions (connecting → active) — that's when activeRoom becomes non-null. class _RemoteVideoView extends ConsumerWidget { const _RemoteVideoView(); @override Widget build(BuildContext context, WidgetRef ref) { + // Watch call state to trigger rebuild when call connects. + ref.watch(callControllerProvider); final room = ref.watch(liveKitServiceProvider).activeRoom; if (room == null) { return const _NoVideoPlaceholder(); @@ -154,6 +158,7 @@ class _LocalVideoPip extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { + ref.watch(callControllerProvider); // rebuild when call state changes final room = ref.watch(liveKitServiceProvider).activeRoom; if (room == null) return const SizedBox.shrink();