- 모든 메세지는 아래 양식을 따름.
{
"id": "{Evnet_ID}",
"property1": "property1_content",
"property2": "property2_content",
...
}
- 메세지는
id
를 가지고 있고, id
를 기준으로 이벤트를 처리
- 각 이벤트에 필요한
property
는 메세지별 세부 정의를 확인
구분 |
메세지 ID |
설명 |
요청에 대한 응답 메세지 |
req-1 |
joinRoom |
방 접속 |
새로운 유저: existingParticipants 기존 유저: newParticipantArrived
|
req-2 |
receiveVideoFrom |
SDP 정보 전송 |
receiveVideoAnswer |
req-3 |
onIceCandidate |
ICE Candidate 정보 전송 |
iceCandidate |
req-4 |
leaveRoom |
방 나가기 |
participantLeft |
req-5 |
videoStateFrom |
비디오 설정 변경 |
videoStateAnswer |
req-6 |
audioStateFrom |
오디오 설정 변경 |
audioStateAnswer |
구분 |
메세지 ID |
설명 |
res-1 |
existingParticipants |
방에 접속한 유저의 명단 |
res-2 |
newParticipantArrived |
새로운 유저 입장 |
res-3 |
receiveVideoAnswer |
SDP 정보 전송에 대한 응답 |
res-4 |
iceCandidate |
ICE Candidate 정보 전송 |
res-5 |
participantLeft |
유저 나감 |
res-6 |
videoStateAnswer |
화면 설정 변경에 대한 응답 |
res-7 |
audioStateAnswer |
오디오 설정 변경에 대한 응답 |
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
joinRoom |
token |
String |
엑세스토큰 |
|
userId |
String |
유저 아이디 |
|
communityId |
String |
커뮤니티 아이디 |
DM의 경우 0
|
roomId |
String |
채널 아이디 - 커뮤니티 내 음성 채널일 경우 : c-{channelId} (ex. c-10) - DM일 경우 : r-{roomId} (ex. r-5) |
|
video |
boolean |
비디오 상태 |
false : 꺼짐, true : 켜짐 |
audio |
boolean |
오디오 상태 |
false : 꺼짐, true : 켜짐 |
{
"id": "joinRoom",
"token": "128eqdioq90amx.d09sad192je0129.das9jd1j",
"userId": "1",
"communityId: "1",
"roomId": "c-10",
"video": false,
"audio": false
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
receiveVideoFrom |
userId |
String |
유저 아이디 |
|
sdpOffer |
String |
SDP 정보 |
|
{
"id": "receiveVideoFrom",
"userId": "1",
"sdpOffer" : "v=0\r\no=- 4993863236499815601 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS pm15AJDxqQxKcn1zx9PtI31hOCI6yV9bTEgx\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:aKkH\r\na=ice-pwd:sYPssR5Gs1iz7VeRPzhB2uKN\r\na=ice-options:trickle\r\na=fingerprint:sha-256 E8:D9:1E:40:69:14:D1:3D:25:10:3F:B1:E6:CA:CE:B5:C1:54:B1:0E:17:3C:B0:77:27:0E:7E:0F:B6:4A:5A:61\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4..."
}
req-3 : ICE Candidate 정보 전송
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
onIceCandidate |
userId |
String |
유저 아이디 |
|
candidate |
Object |
candidate 정보 |
|
candidate.candidate |
String |
candidate 정보 |
|
candidate.sdpMid |
String |
candidate 식별 태그 |
|
candidate.sdpMLineIndex |
int |
candidate와 연결된 미디어 의미 |
|
{
"id": "onIceCandidate",
"userId": "1",
"candidate": {
"candidate": "candidate:2776107695 1 udp 2122194687 192.168.0.137 64922 typ host generation 0 ufrag aKkH network-id 2 network-cost 10",
"sdpMid": "0",
"sdpMLineIndex": 0
}
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
leaveRoom |
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
videoStateFrom |
userId |
String |
유저 아이디 |
|
video |
String |
ON/OFF 여부 |
false : 꺼짐, true : 켜짐 |
{
"id": "videoStateFrom",
"userId": "1",
"video": true
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
audioStateFrom |
userId |
String |
유저 아이디 |
|
audio |
boolean |
ON/OFF 여부 |
false : 꺼짐, true : 켜짐 |
{
"id": "audioStateFrom",
"userId": "1",
"audio": true
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
existingParticipants |
members |
List |
방에 접속해 있는 유저들의 명단 |
|
members[i] |
Object |
유저 정보 |
|
members[i].userId |
String |
유저 아이디 |
|
members[i].video |
boolean |
비디오 상태 |
false : 꺼짐, true : 켜짐 |
members[i].audio |
boolean |
오디오 상태 |
false : 꺼짐, true : 켜짐 |
{
"id": "existingParticipants",
"members": [
{
"userId": "2",
"video": false,
"audio": true
},
{
"userId": "4",
"video": true,
"audio": true
}
]
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
newParticipantArrived |
member |
Object |
유저 정보 |
|
member.userId |
String |
새로 접속한 유저 아이디 |
|
member.video |
String |
비디오 상태 |
false : 꺼짐, true : 켜짐 |
member.audio |
String |
오디오 상태 |
false : 꺼짐, true : 켜짐 |
{
"id": "newParticipantArrived",
"member": {
"userId": "1",
"video": false,
"audio": true
}
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
receiveVideoAnswer |
userId |
String |
유저 아이디 |
|
sdpAnswer |
String |
서버에 전송한 SDP 정보 확인 |
|
{
"id": "receiveVideoAnswer",
"userId": "1",
"sdpAnswer" :"v=0\r\no=- 3852684837 3852684837 IN IP4 0.0.0.0\r\ns=Kurento Media Server\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=extmap-allow-mixed:\r\na=msid-semantic: WMS pm15AJDxqQxKcn1zx9PtI31hOCI6yV9bTEgx\r\na=group:BUNDLE 0 1\r\nm=audio 1 UDP/TLS/RTP/SAVPF 111 0\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=recvonly\r\na=mid:0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=rtpmap:111 opus/48000/2\r\na=rtpmap:0 PCMU/8000\r\na=setup:active\r\na=rtcp-mux\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=ssrc:1855102669 cname:user3868562591@host-b5558a2a\r\na=ice-ufrag:vR2M\r\na=ice-pwd:Znae2TR333giBk1GH4vOks\r\na=fingerprint:sha-256 ..."
}
res-4 : ICE Candidate 정보 전송
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
iceCandidate |
userId |
String |
유저 아이디 |
|
candidate |
Object |
candidate 정보 |
|
candidate.candidate |
String |
candidate 정보 |
|
candidate.sdpMid |
String |
candidate 식별 태그 |
|
candidate.sdpMLineIndex |
int |
candidate와 연결된 미디어 의미 |
|
{
"id": "iceCandidate",
"userId": "1",
"candidate": {
"candidate": "candidate:2776107695 1 udp 2122194687 192.168.0.137 63192 typ host generation 0 ufrag hYKB network-id 2 network-cost 10",
"sdpMid": "0",
"sdpMLineIndex": 0
}
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
participantLeft |
userId |
String |
유저 아이디 |
|
{
"id": "participantLeft",
"userId": "1"
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
videoStateAnswer |
userId |
String |
유저 아이디 |
|
video |
boolean |
ON/OFF 여부 |
false : 꺼짐, true : 켜짐 |
{
"id": "videoStateAnswer",
"userId": "1",
"video": true
}
Property |
Type |
Description |
Default |
id |
String |
이벤트 아이디 |
audioStateAnswer |
userId |
String |
유저 아이디 |
|
audio |
boolean |
ON/OFF 여부 |
false : 꺼짐, true : 켜짐 |
{
"id": "audioStateAnswer",
"userId": "1",
"audio": true
}