diff --git a/lib/pods/chat/call.dart b/lib/pods/chat/call.dart index f7703587..10992875 100644 --- a/lib/pods/chat/call.dart +++ b/lib/pods/chat/call.dart @@ -94,8 +94,9 @@ class CallNotifier extends _$CallNotifier { // Subscribe to websocket updates return const CallState( isConnected: false, - isMicrophoneEnabled: true, - isCameraEnabled: false, + isMicrophoneEnabled: + true, // Audio enabled by default (matches WebRTC init) + isCameraEnabled: true, // Video enabled by default (matches WebRTC init) isScreenSharing: false, isSpeakerphone: true, ); diff --git a/lib/pods/chat/webrtc_manager.dart b/lib/pods/chat/webrtc_manager.dart index c416a2c0..9dd28d38 100644 --- a/lib/pods/chat/webrtc_manager.dart +++ b/lib/pods/chat/webrtc_manager.dart @@ -167,6 +167,13 @@ class WebRTCManager { if (participant != null) { participant.remoteStream = event.streams[0]; participant.isConnected = true; + + // Detect video tracks and update video enabled state + final videoTracks = event.streams[0].getVideoTracks(); + if (videoTracks.isNotEmpty) { + participant.isVideoEnabled = true; + } + _participantController.add(participant); } }