🐛 Trying to fix something

This commit is contained in:
2025-10-19 18:31:05 +08:00
parent 0910be88ef
commit 43d767bc03
2 changed files with 10 additions and 2 deletions

View File

@@ -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,
);

View File

@@ -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);
}
}