# Event Message

옴니톡 SDK에서 제공하는 이벤트는 다음과 같으며 필요에 따라 자유롭게 활용하시면 됩니다.&#x20;

해당 페이지에서는 Event Message 이름과 각각의 예시를 보여 줍니다.

플랫폼별 이벤트 메시지 수신 방법은 각 API Reference 본문을 참조 바랍니다.

## 플랫폼별 API Reference 링크

* [Javascript API](/javascript/api-reference.md)
* [Typescript API](https://docs.omnitalk.io/typescript/api-reference)
* [React-Native API](/react-native/api-reference.md)
* [Flutter API](/flutter/api-reference.md)
* [iOS API](/ios/api-reference.md)

<table><thead><tr><th width="281">Event Name</th><th>Description</th></tr></thead><tbody><tr><td>RINGBACK_EVENT</td><td>offerCall() 호출 성공 시</td></tr><tr><td>RINGING_EVENT</td><td>offerCall( ) 수신 시</td></tr><tr><td>BROADCASTING_EVENT</td><td>영상 회의 publish() 성공 시</td></tr><tr><td>CONNECTED_EVENT</td><td><p>통화 - 상대방과 연결 성공 시</p><p>회의 - 새로운 참가자 입장 시</p></td></tr><tr><td>MUTE_EVENT</td><td>음소거 / 로컬 비디오 화면 송출 off 시</td></tr><tr><td>UNMUTE_EVENT</td><td>음소거 해제 / 로컬 비디오 화면 송출 on 시</td></tr><tr><td>SCREEN_SHARE_EVENT</td><td>screenShare() 호출 성공 시</td></tr><tr><td>SCREEN_UNSHARE_EVENT</td><td>screenUnshare() 호출 시</td></tr><tr><td>MESSAGE_EVENT</td><td>채팅 메시지 이벤트 수신 시</td></tr><tr><td>LEAVE_EVENT</td><td>참가자 퇴장 시</td></tr><tr><td>KICKOUT_EVENT</td><td>참가자 강제 퇴장 시</td></tr><tr><td></td><td></td></tr></tbody></table>

### RINGBACK\_EVENT

* caller(발신자)가 offerCall() 호출에 성공 했을 때, **발신자 본인에게 발생**하는 이벤트 메세지

```jsx
{
"cmd" : "RINGBACK_EVENT",
"session":"YjQ1ZGUzYzA3MmJhMTY4NjcxMD",
"caller": "alice",
"callee": "bob",
"call_type": "audiocall"
}
```

### RINGING\_EVENT

* caller(발신자)가 offerCall() 호출에 성공 했을 때, **callee(수신자)에게 발생**하는 이벤트 메세지

```jsx
{
"cmd" : "RINGBACK_EVENT",
"session":"YjQ1ZGUzYzA3MmJhMTY4NjcxMD",
"user_id":"gOEEdpqGJP",
"caller": "alice",
"callee": "bob",
"room_type": "audiocall",
"call_type": "audiocall",
}
```

### BROADCASTING\_EVENT

* 영상 회의(videoroom) 에서만 발생하는 이벤트 메세지.
* 특정 **참가자가 방송을 송출** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```jsx
{
"cmd" : "BROADCASTING_EVENT",
"session": "YzMyYWE1YTA3MmJhMTY4NjE0MDAwNTcyNi01MzM=",
"user_id" : "gOEEdpqGJP",
"room_type": "audiocall",
"call_type": "audiocall",
}                                        
```

### CONNECTED\_EVENT

* (음성, 영상) **통화일 경우**는 상대방과 연결이 성공 했을 때, **caller와 callee 모두에게 발생**하는 이벤트 메세지
* (음성, 영상) **회의일 경우**는 새로운 참가자가 입장 했을 때, **기존 참가자들에게 발생**하는 이벤트 메세지

```jsx
{
"cmd" : "CONNECTED_EVENT",
"session": "YjQ1ZGUzYzA3MmJhMTY4NjE0MzU0NjI1My01MDM=",
"user_id": "AaalBCeHdL",
"room_type": "videoroom",
"call_type": "audiocall",
}

```

### MUTE\_EVENT

* 특정 참가자가 **음성 또는 영상을 mute** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```javascript
{
"cmd" : "MUTE_EVENT",
"session": "YjQ1ZGUzYzA3MmJhMTY4Njgy",
"track":"audio"
}
```

### UNMUTE\_EVENT

* 특정 참가자가 **음성 또는 영상을 unmute** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```javascript
{
"cmd" : "UNMUTE_EVENT",
"session": "YjQ1ZGUzYzA3MmJhMTY4Njgy",
"track":"audio"
}
```

### SCREEN\_SHARE\_EVENT

* 특정 참가자가 **화면 공유**를 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```javascript
{
"cmd" : "SCREEN_SHARE_EVENT",
"session": "YjQ1ZGUzYzA3MmJhMTY4Njgy",
"user_id": "gOEEdpqGJP",
"room_type": "videoroom",
"call_type": "videocall"
}
```

### SCREEN\_UNSHARE\_EVENT

* 특정 참가자가 **화면 공유를 취소** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```javascript
{
"cmd" : "SCREEN_UNSHARE_EVENT",
"session": "YjQ1ZGUzYzA3MmJhMTY4Njgy",
"user_id": "gOEEdpqGJP",
"room_type": "videoroom",
"call_type": "videocall"
}
```

### MESSAGE\_EVENT

* message action은 4가지로 구분됩니다.
  * send: 특정 참가자가 **채팅 메세지를 전송** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지
  * whisper: 특정 참가자가 다른 참가자에게 **귓속말을 전송** 했을때, **귓속말 대상자에게 발생**하는 이벤트 메세지
  * join: 새로운 **참가자가 입장** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지
  * leave: **참가자가 퇴장** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```javascript
{
"cmd" : "MESSAGE_EVENT",
"action": "join", 
"session": "aGZTTUpDVG1JSDE2ODg4OTE4MDMtNA==", 
"timestamp": 1688891816, 
"user_id": "11", 
"user_name": "mXPkkkEOgQ"
}
```

### LEAVE\_EVENT

* 특정 참가자가 **퇴장** 했을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```jsx
{
"cmd" : "LEAVE_EVENT",
"session": "YzMyYWE1YTA3MmJhMTY4NjE0MzUzOTMxNS01Mzg=",
}
```

### KICKOUT\_EVENT

* 특정 참가자를 강제 **퇴장**시켰을 때, **다른 참가자들에게 발생**하는 이벤트 메세지

```jsx
{
"cmd" : "KICKOUT_EVENT",
"session": "YjQ1ZGUzYzA3MmJhMTY4Njgy",
"room_type" : "videoroom"
}
```

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.omnitalk.io/commons/event-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
