修正同步各种问题

This commit is contained in:
mtvpls
2025-12-07 23:48:29 +08:00
parent c38d1bbdad
commit 7911e4cc5f
8 changed files with 346 additions and 73 deletions

View File

@@ -77,6 +77,7 @@ export interface ServerToClientEvents {
'voice:offer': (data: { userId: string; offer: RTCSessionDescriptionInit }) => void;
'voice:answer': (data: { userId: string; answer: RTCSessionDescriptionInit }) => void;
'voice:ice': (data: { userId: string; candidate: RTCIceCandidateInit }) => void;
'state:cleared': () => void;
'error': (message: string) => void;
}
@@ -114,6 +115,8 @@ export interface ClientToServerEvents {
'voice:answer': (data: { targetUserId: string; answer: RTCSessionDescriptionInit }) => void;
'voice:ice': (data: { targetUserId: string; candidate: RTCIceCandidateInit }) => void;
'state:clear': (callback?: (response: { success: boolean; error?: string }) => void) => void;
'heartbeat': () => void;
}