feat(vide_calls): gms calls handling

This commit is contained in:
misha
2026-05-25 08:07:20 +03:00
parent 1acb158f36
commit 73cec1a01e
35 changed files with 2288 additions and 618 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,59 @@
import 'package:eatvio_app/features/video_calls/presentation/bloc/video_call_session/video_call_session_state.dart';
class VideoCallManagerSnapshot {
const VideoCallManagerSnapshot({
required this.conversationUuid,
this.counterpartName,
this.localParticipantName,
required this.micEnabled,
required this.videoEnabled,
this.connectError,
required this.connectPhase,
required this.linkIssue,
this.systemAudioInterrupted = false,
});
final String conversationUuid;
final String? counterpartName;
final String? localParticipantName;
final bool micEnabled;
final bool videoEnabled;
final String? connectError;
final VideoCallConnectPhase connectPhase;
final VideoCallLinkIssue linkIssue;
final bool systemAudioInterrupted;
static const initial = VideoCallManagerSnapshot(
conversationUuid: '',
micEnabled: false,
videoEnabled: false,
connectPhase: VideoCallConnectPhase.idle,
linkIssue: VideoCallLinkIssue.none,
);
VideoCallManagerSnapshot copyWith({
String? conversationUuid,
String? counterpartName,
String? localParticipantName,
bool? micEnabled,
bool? videoEnabled,
String? connectError,
VideoCallConnectPhase? connectPhase,
VideoCallLinkIssue? linkIssue,
bool? systemAudioInterrupted,
bool clearConnectError = false,
}) {
return VideoCallManagerSnapshot(
conversationUuid: conversationUuid ?? this.conversationUuid,
counterpartName: counterpartName ?? this.counterpartName,
localParticipantName: localParticipantName ?? this.localParticipantName,
micEnabled: micEnabled ?? this.micEnabled,
videoEnabled: videoEnabled ?? this.videoEnabled,
connectError: clearConnectError ? null : (connectError ?? this.connectError),
connectPhase: connectPhase ?? this.connectPhase,
linkIssue: linkIssue ?? this.linkIssue,
systemAudioInterrupted:
systemAudioInterrupted ?? this.systemAudioInterrupted,
);
}
}