# WebRTC Related Events

Acquire WebRTC related event in you can use multiple events and manage custom easily. When you connect video or voice call after all events call. RTC Event in chat start after just call **`'rtcroom-incall'`** api. This api in given user's response true or false and default response given false. User receive voice or video call after this API response given true.

### WebRTC Related Events&#x20;

**`rtcroom-incall`**: true/false

Acquire WebRTC event type **`'cobrowse-request'`** users request send after call and this API given user's response true or false. if you want to use video or voice call connect and disconnect after action then use this event.

```javascript
<script>
    window.acquire = window.acquire || [];
    window.acquire.push(function(app){
        app.on("rtcroom-incall", function (rtcroom_incall) {
            console.log("rtcroom-incall", rtcroom_incall);
			// response true/false
        });
    });
</script>
```

**`rtcroom`**

Event **`'rtcroom'`** in two type parameter using first RTCRoom object, and second  RTCRoomUser object. This event will given **rtcroom object** whenever gets ready and RTCRoomUser which is current's user's object and is responsible for making calls and picking calls.

```javascript
<script>
    window.acquire.push(function(app){
        app.on("rtcroom", function (rtcroom,rtcroom_user) {
            console.log("rtcroom", rtcroom);
            //console only for example
            console.log("rtcroom1", rtcroom_user);
        });
    });
</script>
```

#### RTCRoomUser Object

&#x20;**`'rtcroom'`** event in second object RTCRoomUser Object available. This object in video or voice call status event available.&#x20;

Status three type in divided. first **`'standby'`** mode by default available or second status type **`'incall'`** video or voice call before joined available and last status type **`'joined'`** user call receive time available.

**`status()`** : Status user's video or voice call track and position check. Status three type in divide.

* **`standby`**: This event before call and by default available in object.
* **`incall`** : This event is user's in call video or voice but before call join available.
* **`joined`** : User video and voice call joined after available this event type.

If you want to track call position then use this event status and manage your action.

**`video_mute();`**

**`'video_mute();'`** in pass true then video call mute and pass false then video call unmute. You can use your action on this event easily.

**`audio_mute();`**

**`'audio_mute();'`** in pass true then audio/voice call mute and pass false then audio/voice call unmute this is working same as video\_mute. You can use your action on this event easily.&#x20;

**`stopRTCCall();`**

If you want to disconnect audio or video call then use this function by API and disconnect your call.


---

# 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://developer.acquire.io/master/acquire-api-events/webrtc-related-events.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.
