@readerseye2/cr_type 1.0.178 → 1.0.180
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.
|
@@ -26,6 +26,25 @@ export interface ClientToServerEvents {
|
|
|
26
26
|
'reading:watch-children': (childIdxList: number[]) => void;
|
|
27
27
|
/** 자녀 읽기 상태 구독 해제 */
|
|
28
28
|
'reading:unwatch-children': () => void;
|
|
29
|
+
/** 부모→자녀 offer */
|
|
30
|
+
'webrtc:offer': (payload: {
|
|
31
|
+
targetChildIdx: number;
|
|
32
|
+
sdp: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
/** 자녀→부모 answer */
|
|
35
|
+
'webrtc:answer': (payload: {
|
|
36
|
+
targetParentIdx: number;
|
|
37
|
+
sdp: string;
|
|
38
|
+
}) => void;
|
|
39
|
+
/** ICE candidate 교환 (양방향) */
|
|
40
|
+
'webrtc:ice-candidate': (payload: {
|
|
41
|
+
targetIdx: number;
|
|
42
|
+
candidate: string;
|
|
43
|
+
}) => void;
|
|
44
|
+
/** 연결 종료 (양방향) */
|
|
45
|
+
'webrtc:hangup': (payload: {
|
|
46
|
+
targetIdx: number;
|
|
47
|
+
}) => void;
|
|
29
48
|
}
|
|
30
49
|
export interface NoticeToServerEvents {
|
|
31
50
|
'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,6 +62,30 @@ export interface ServerToClientEvents {
|
|
|
56
62
|
'reading:child-offline': (payload: {
|
|
57
63
|
testeeIdx: number;
|
|
58
64
|
}) => void;
|
|
65
|
+
/** 부모의 offer 수신 (자녀 측) — iceServers 포함 */
|
|
66
|
+
'webrtc:offer': (payload: {
|
|
67
|
+
fromParentIdx: number;
|
|
68
|
+
sdp: string;
|
|
69
|
+
iceServers?: IceServerConfig[];
|
|
70
|
+
}) => void;
|
|
71
|
+
/** 자녀의 answer 수신 (부모 측) */
|
|
72
|
+
'webrtc:answer': (payload: {
|
|
73
|
+
fromChildIdx: number;
|
|
74
|
+
sdp: string;
|
|
75
|
+
}) => void;
|
|
76
|
+
/** TURN credential 포함 ICE 서버 설정 (부모 측, offer 직후 수신) */
|
|
77
|
+
'webrtc:ice-servers': (payload: {
|
|
78
|
+
iceServers: IceServerConfig[];
|
|
79
|
+
}) => void;
|
|
80
|
+
/** ICE candidate 수신 (양방향) */
|
|
81
|
+
'webrtc:ice-candidate': (payload: {
|
|
82
|
+
fromIdx: number;
|
|
83
|
+
candidate: string;
|
|
84
|
+
}) => void;
|
|
85
|
+
/** 연결 종료 수신 (양방향) */
|
|
86
|
+
'webrtc:hangup': (payload: {
|
|
87
|
+
fromIdx: number;
|
|
88
|
+
}) => void;
|
|
59
89
|
}
|
|
60
90
|
export interface NoticeToClientEvents {
|
|
61
91
|
'notice-message:result': (payload: NoticeMessageResult) => void;
|