feat(wsService, WebRTCManager): enhance call handling with media type support and negotiation improvements
Some checks failed
Frontend CI / ota-android (push) Successful in 11m25s
Frontend CI / build-and-push-web (push) Successful in 11m30s
Frontend CI / build-android-apk (push) Has been cancelled

- Added optional media_type to WSCallIncomingMessage for better call type differentiation.
- Updated call_type assignment in WebSocketService to prioritize media_type if available.
- Removed initialOfferCreated flag in WebRTCManager to simplify negotiation logic.
- Improved negotiation handling by releasing the negotiation lock after offer creation, ensuring smoother call setup.
This commit is contained in:
lafay
2026-03-28 01:06:51 +08:00
parent f6176c945b
commit 7c33409624
2 changed files with 14 additions and 11 deletions

View File

@@ -48,6 +48,7 @@ export interface WSCallIncomingMessage {
conversation_id: string;
caller_id: string;
call_type: string;
media_type?: string;
created_at: number;
lifetime?: number;
ice_servers?: ICEServerConfig[];
@@ -621,7 +622,7 @@ class WebSocketService {
call_id: payload.call_id,
conversation_id: payload.conversation_id,
caller_id: payload.caller_id,
call_type: payload.call_type,
call_type: payload.media_type || payload.call_type,
created_at: payload.created_at,
lifetime: payload.lifetime,
ice_servers: payload.ice_servers,