@readerseye2/cr_type 1.0.179 → 1.0.182
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,6 +45,16 @@ export interface ClientToServerEvents {
|
|
|
45
45
|
'webrtc:hangup': (payload: {
|
|
46
46
|
targetIdx: number;
|
|
47
47
|
}) => void;
|
|
48
|
+
/**
|
|
49
|
+
* WebRTC 진단 정보 (부모→서버, 단방향)
|
|
50
|
+
* - iceCandidateType: 부모 측 selected candidate pair의 local candidate type
|
|
51
|
+
* - endReason: 비정상 종료 시에만 동봉 (정상 종료는 'webrtc:hangup' 사용)
|
|
52
|
+
*/
|
|
53
|
+
'webrtc:diag': (payload: {
|
|
54
|
+
targetChildIdx: number;
|
|
55
|
+
iceCandidateType: 'host' | 'srflx' | 'relay' | null;
|
|
56
|
+
endReason?: 'ice-failed' | 'connection-failed';
|
|
57
|
+
}) => void;
|
|
48
58
|
}
|
|
49
59
|
export interface NoticeToServerEvents {
|
|
50
60
|
'notice-message:send': (msg: MessageRequest) => void;
|
|
@@ -2,6 +2,12 @@ import { MessageReadResponse, MessageResponse, NoticeMessageResult } from "./soc
|
|
|
2
2
|
import { ConnectedUser, ConnectedUsersGrouped } from "./connected-user.types";
|
|
3
3
|
import { UnifiedSessionInfo, SessionSegmentChangedPayload, SessionHistoryListResult, SessionHistoryGetResult, UnifiedChunksResult, UnifiedSegmentResult, SessionHistoryDeleteResult } from "./unified-session.types";
|
|
4
4
|
import { LiveReadingState } from "../book/child-reading-progress.type";
|
|
5
|
+
/** WebRTC ICE 서버 설정 (STUN/TURN) */
|
|
6
|
+
export interface IceServerConfig {
|
|
7
|
+
urls: string | string[];
|
|
8
|
+
username?: string;
|
|
9
|
+
credential?: string;
|
|
10
|
+
}
|
|
5
11
|
export interface ServerToClientEvents {
|
|
6
12
|
connect: () => void;
|
|
7
13
|
disconnect: () => void;
|
|
@@ -56,16 +62,21 @@ export interface ServerToClientEvents {
|
|
|
56
62
|
'reading:child-offline': (payload: {
|
|
57
63
|
testeeIdx: number;
|
|
58
64
|
}) => void;
|
|
59
|
-
/** 부모의 offer 수신 (자녀 측) */
|
|
65
|
+
/** 부모의 offer 수신 (자녀 측) — iceServers 포함 */
|
|
60
66
|
'webrtc:offer': (payload: {
|
|
61
67
|
fromParentIdx: number;
|
|
62
68
|
sdp: string;
|
|
69
|
+
iceServers?: IceServerConfig[];
|
|
63
70
|
}) => void;
|
|
64
71
|
/** 자녀의 answer 수신 (부모 측) */
|
|
65
72
|
'webrtc:answer': (payload: {
|
|
66
73
|
fromChildIdx: number;
|
|
67
74
|
sdp: string;
|
|
68
75
|
}) => void;
|
|
76
|
+
/** TURN credential 포함 ICE 서버 설정 (부모 측, offer 직후 수신) */
|
|
77
|
+
'webrtc:ice-servers': (payload: {
|
|
78
|
+
iceServers: IceServerConfig[];
|
|
79
|
+
}) => void;
|
|
69
80
|
/** ICE candidate 수신 (양방향) */
|
|
70
81
|
'webrtc:ice-candidate': (payload: {
|
|
71
82
|
fromIdx: number;
|