feat(video_calls): added system android pip for calls

This commit is contained in:
misha
2026-06-10 09:32:43 +03:00
parent 27fe4afd81
commit de795c5274
15 changed files with 436 additions and 33 deletions

View File

@@ -142,5 +142,32 @@ void main() {
expect(cubit.state, const VideoCallSessionState());
});
test('tracks whether call screen route is visible', () async {
when(
mockManager.startCall(
conversationUuid: anyNamed('conversationUuid'),
counterpartName: anyNamed('counterpartName'),
localParticipantName: anyNamed('localParticipantName'),
micEnabled: anyNamed('micEnabled'),
videoEnabled: anyNamed('videoEnabled'),
),
).thenAnswer((_) async {});
await cubit.onCallScreenVisible(conversationUuid: 'uuid');
expect(cubit.isCallScreenRouteVisible, isTrue);
cubit.emit(
const VideoCallSessionState(
conversationUuid: 'uuid',
connectPhase: VideoCallConnectPhase.connected,
callStageEntered: true,
uiMode: VideoCallUiMode.pip,
),
);
cubit.onCallScreenDisposed();
expect(cubit.isCallScreenRouteVisible, isFalse);
});
});
}