Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions calls/javascript/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
CometChatCalls.muteAudio();
```

### Unmute Audio

Check warning on line 20 in calls/javascript/actions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/actions.mdx#L20

Did you really mean 'Unmute'?

Unmutes your local microphone, resuming audio transmission.

Check warning on line 22 in calls/javascript/actions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/actions.mdx#L22

Did you really mean 'Unmutes'?

```javascript
CometChatCalls.unMuteAudio();
CometChatCalls.unmuteAudio();
```

## Video Controls
Expand Down Expand Up @@ -344,21 +344,3 @@
CometChatCalls.setVideoInputDevice(deviceId);
```

## Picture-in-Picture

### Enable Picture-in-Picture Layout

Enables Picture-in-Picture mode for the call.

```javascript
CometChatCalls.enablePictureInPictureLayout();
```

### Disable Picture-in-Picture Layout

Disables Picture-in-Picture mode.

```javascript
CometChatCalls.disablePictureInPictureLayout();
```

6 changes: 3 additions & 3 deletions calls/javascript/angular-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ export class CometChatCallsService {
CometChatCalls.muteAudio();
}

unMuteAudio(): void {
CometChatCalls.unMuteAudio();
unmuteAudio(): void {
CometChatCalls.unmuteAudio();
}

// Video controls
Expand Down Expand Up @@ -392,7 +392,7 @@ export class CallScreenComponent implements OnInit, OnDestroy {
*/
toggleAudio(): void {
if (this.isMuted) {
this.callsService.unMuteAudio();
this.callsService.unmuteAudio();
} else {
this.callsService.muteAudio();
}
Expand Down
6 changes: 3 additions & 3 deletions calls/javascript/custom-control-panel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// Mute/unmute microphone
function toggleAudio(isMuted) {
if (isMuted) {
CometChatCalls.unMuteAudio();
CometChatCalls.unmuteAudio();
} else {
CometChatCalls.muteAudio();
}
Expand Down Expand Up @@ -172,7 +172,7 @@

// Button handlers
document.getElementById("audio-btn").onclick = () => {
isAudioMuted ? CometChatCalls.unMuteAudio() : CometChatCalls.muteAudio();
isAudioMuted ? CometChatCalls.unmuteAudio() : CometChatCalls.muteAudio();
};

document.getElementById("video-btn").onclick = () => {
Expand All @@ -196,7 +196,7 @@
| Action | Method |
|--------|--------|
| Mute audio | `CometChatCalls.muteAudio()` |
| Unmute audio | `CometChatCalls.unMuteAudio()` |
| Unmute audio | `CometChatCalls.unmuteAudio()` |

Check warning on line 199 in calls/javascript/custom-control-panel.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/custom-control-panel.mdx#L199

Did you really mean 'Unmute'?
| Pause video | `CometChatCalls.pauseVideo()` |
| Resume video | `CometChatCalls.resumeVideo()` |
| Start screen share | `CometChatCalls.startScreenSharing()` |
Expand Down
4 changes: 2 additions & 2 deletions calls/javascript/idle-timeout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Set the timeout periods when joining a session:
```javascript
const callSettings = {
idleTimeoutPeriodBeforePrompt: 60000, // 60 seconds before showing prompt
idleTimeoutPeriodAfterPrompt: 120000, // 120 seconds after prompt before ending
idleTimeoutPeriodAfterPrompt: 180000, // 180 seconds (3 minutes) after prompt before ending
// ... other settings
};

Expand All @@ -30,7 +30,7 @@ await CometChatCalls.joinSession(callToken, callSettings, container);
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| `idleTimeoutPeriodBeforePrompt` | Number | `60000` | Time in milliseconds before showing the timeout prompt |
| `idleTimeoutPeriodAfterPrompt` | Number | `120000` | Time in milliseconds after the prompt before ending the session |
| `idleTimeoutPeriodAfterPrompt` | Number | `180000` | Time in milliseconds after the prompt before ending the session |

## Session Timeout Event

Expand Down
10 changes: 5 additions & 5 deletions calls/javascript/ionic-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This guide walks you through integrating the CometChat Calls SDK into an Ionic application. By the end, you'll have a working video call implementation with proper authentication and lifecycle handling. This guide covers Ionic with Angular, React, and Vue.

<Note>
For native mobile features like CallKit, VoIP push notifications, and background handling, consider using the native [iOS](/calls/ios/overview) or [Android](/calls/android/overview) SDKs.

Check warning on line 11 in calls/javascript/ionic-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/ionic-integration.mdx#L11

Did you really mean 'SDKs'?
</Note>

## Prerequisites
Expand Down Expand Up @@ -125,8 +125,8 @@
CometChatCalls.muteAudio();
}

unMuteAudio() {
CometChatCalls.unMuteAudio();
unmuteAudio() {
CometChatCalls.unmuteAudio();
}

pauseVideo() {
Expand Down Expand Up @@ -280,7 +280,7 @@
}

toggleAudio() {
this.isMuted ? this.callsService.unMuteAudio() : this.callsService.muteAudio();
this.isMuted ? this.callsService.unmuteAudio() : this.callsService.muteAudio();
}

toggleVideo() {
Expand Down Expand Up @@ -689,7 +689,7 @@

// Control handlers
const toggleAudio = () => {
isMuted ? CometChatCalls.unMuteAudio() : CometChatCalls.muteAudio();
isMuted ? CometChatCalls.unmuteAudio() : CometChatCalls.muteAudio();
};

const toggleVideo = () => {
Expand Down Expand Up @@ -886,9 +886,9 @@

## Ionic Vue

### Step 2: Create the Composable

Check warning on line 889 in calls/javascript/ionic-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/ionic-integration.mdx#L889

Did you really mean 'Composable'?

Create a composable that handles SDK initialization and authentication:

Check warning on line 891 in calls/javascript/ionic-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/ionic-integration.mdx#L891

Did you really mean 'composable'?

```typescript
// src/composables/useCometChatCalls.ts
Expand Down Expand Up @@ -1131,7 +1131,7 @@
}

function toggleAudio() {
isMuted.value ? CometChatCalls.unMuteAudio() : CometChatCalls.muteAudio();
isMuted.value ? CometChatCalls.unmuteAudio() : CometChatCalls.muteAudio();
}

function toggleVideo() {
Expand Down
26 changes: 8 additions & 18 deletions calls/javascript/migration-guide-v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- **Granular event listeners** — subscribe to specific events like `onParticipantJoined` or `onSessionLeft` instead of one monolithic `OngoingCallListener`
- **Dedicated `login()` method** — the Calls SDK now handles its own authentication instead of depending on the Chat SDK's auth token or REST APIs
- **Simplified initialization** — pass plain objects to `init()` and `joinSession()` instead of using builder classes
- **Strongly-typed enums** — `LayoutType`, `SessionType` instead of raw strings

Check warning on line 29 in calls/javascript/migration-guide-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/migration-guide-v5.mdx#L29

Did you really mean 'enums'?

---

Expand Down Expand Up @@ -79,9 +79,9 @@
<Tab title="v4">
```javascript
// No dedicated Calls SDK login — relied on Chat SDK for auth token
const authToken = CometChat.getUserAuthToken();

Check warning on line 82 in calls/javascript/migration-guide-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/migration-guide-v5.mdx#L82

Did you really mean 'authToken'?

// Had to pass authToken manually

Check warning on line 84 in calls/javascript/migration-guide-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/migration-guide-v5.mdx#L84

Did you really mean 'authToken'?
CometChatCalls.generateToken(sessionId, authToken).then(
(token) => { /* use token to start session */ },
(error) => { }
Expand All @@ -91,7 +91,7 @@
<Tab title="v5">
```javascript
// Login to the Calls SDK once (after your Chat SDK login)
CometChatCalls.login(authToken).then(
CometChatCalls.loginWithAuthToken(authToken).then(
(user) => { /* Calls SDK is now authenticated */ },
(error) => { }
);
Expand All @@ -106,7 +106,7 @@
</Tabs>

<Note>
Call `CometChatCalls.login()` once after your user authenticates. The SDK stores the auth token internally, so subsequent calls like `generateToken()` and `joinSession()` use it automatically.
Call `CometChatCalls.loginWithAuthToken()` once after your user authenticates. The SDK stores the auth token internally, so subsequent calls like `generateToken()` and `joinSession()` use it automatically.
</Note>

---
Expand All @@ -118,7 +118,7 @@
<Tabs>
<Tab title="v4">
```javascript
const callSettings = new CometChatCalls.CallSettingsBuilder()

Check warning on line 121 in calls/javascript/migration-guide-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/migration-guide-v5.mdx#L121

Did you really mean 'callSettings'?
.enableDefaultLayout(true)
.setIsAudioOnlyCall(true)
.showEndCallButton(true)
Expand All @@ -126,7 +126,7 @@
.showPauseVideoButton(true)
.showRecordingButton(true)
.showScreenShareButton(true)
.showSwitchModeButton(true)
.showModeButton(true)
.startWithAudioMuted(false)
.startWithVideoMuted(false)
.setMode("DEFAULT")
Expand All @@ -135,15 +135,15 @@
onCallEndButtonPressed: () => { },
onUserJoined: (user) => { },
onUserLeft: (user) => { },
onUserListUpdated: (userList) => { },

Check warning on line 138 in calls/javascript/migration-guide-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/migration-guide-v5.mdx#L138

Did you really mean 'userList'?
onError: (error) => { },

Check warning on line 139 in calls/javascript/migration-guide-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/migration-guide-v5.mdx#L139

Did you really mean 'onError'?
}))
.build();
```
</Tab>
<Tab title="v5">
```javascript
const sessionSettings = {

Check warning on line 146 in calls/javascript/migration-guide-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/javascript/migration-guide-v5.mdx#L146

Did you really mean 'sessionSettings'?
sessionType: "VIDEO", // or "VOICE"
layout: "TILE", // or "SPOTLIGHT", "SIDEBAR"
startAudioMuted: false,
Expand Down Expand Up @@ -172,7 +172,7 @@
| `showPauseVideoButton(bool)` | `hideToggleVideoButton: !bool` | Inverted logic |
| `showRecordingButton(bool)` | `hideRecordingButton: !bool` | Inverted logic |
| `showScreenShareButton(bool)` | `hideScreenSharingButton: !bool` | Inverted logic |
| `showSwitchModeButton(bool)` | `hideChangeLayoutButton: !bool` | Inverted logic |
| `showModeButton(bool)` | `hideChangeLayoutButton: !bool` | Inverted logic |
| `startWithAudioMuted(bool)` | `startAudioMuted: bool` | Same logic |
| `startWithVideoMuted(bool)` | `startVideoPaused: bool` | Same logic |
| `setMode("DEFAULT")` | `layout: "SIDEBAR"` | `"DEFAULT"` maps to `"SIDEBAR"` |
Expand All @@ -195,13 +195,10 @@
</Tab>
<Tab title="v5">
```javascript
// Option A: With token
// Generate a call token for the session, then join with it
CometChatCalls.generateToken(sessionId).then((token) => {
CometChatCalls.joinSession(token, sessionSettings, document.getElementById("callContainer"));
});

// Option B: With session ID (recommended)
CometChatCalls.joinSession(sessionId, sessionSettings, document.getElementById("callContainer"));
```
</Tab>
</Tabs>
Expand All @@ -223,8 +220,6 @@
| `CometChatCalls.setMode(mode)` | `CometChatCalls.setLayout(layout)` |
| `CometChatCalls.startScreenShare()` | `CometChatCalls.startScreenSharing()` |
| `CometChatCalls.stopScreenShare()` | `CometChatCalls.stopScreenSharing()` |
| `CometChatCalls.enterPIPMode()` | `CometChatCalls.enablePictureInPictureLayout()` |
| `CometChatCalls.exitPIPMode()` | `CometChatCalls.disablePictureInPictureLayout()` |
| `CometChatCalls.openVirtualBackground()` | `CometChatCalls.showVirtualBackgroundDialog()` |
| `CometChatCalls.closeVirtualBackground()` | `CometChatCalls.hideVirtualBackgroundDialog()` |
| `CometChatCalls.setBackgroundBlur(level)` | `CometChatCalls.setVirtualBackgroundBlurLevel(level)` |
Expand All @@ -250,9 +245,9 @@
onUserJoined: (user) => { },
onUserLeft: (user) => { },
onUserListUpdated: (userList) => { },
onAudioModeChanged: (audioModeList) => { },
onUserMuted: (muteInfo) => { },
onRecordingToggled: (recordingInfo) => { },
onRecordingStarted: (recordingInfo) => { },
onRecordingStopped: () => { },
onError: (error) => { },
}))
.build();
Expand Down Expand Up @@ -288,8 +283,6 @@

// Layout events
CometChatCalls.addEventListener("onCallLayoutChanged", (layoutType) => { });
CometChatCalls.addEventListener("onPictureInPictureLayoutEnabled", () => { });
CometChatCalls.addEventListener("onPictureInPictureLayoutDisabled", () => { });
```

<Note>
Expand All @@ -305,9 +298,8 @@
| `onUserJoined(user)` | `onParticipantJoined(participant)` |
| `onUserLeft(user)` | `onParticipantLeft(participant)` |
| `onUserListUpdated(userList)` | `onParticipantListChanged(participants)` |
| `onAudioModeChanged(list)` | `onAudioModeChanged(audioMode)` |
| `onUserMuted(info)` | `onParticipantAudioMuted(participant)` |
| `onRecordingToggled(info)` | `onRecordingStarted` / `onRecordingStopped` |
| `onRecordingStarted` / `onRecordingStopped` | `onRecordingStarted` / `onRecordingStopped` |
| `onError(error)` | Errors returned via Promise rejection |

---
Expand All @@ -321,5 +313,3 @@
| `CometChatCalls.OngoingCallListener` | `CometChatCalls.addEventListener()` |
| `CometChatCalls.startSession()` | `CometChatCalls.joinSession()` |
| `CometChatCalls.endSession()` | `CometChatCalls.leaveSession()` |
| `RTCRecordingInfo` | `onRecordingStarted` / `onRecordingStopped` events |
| `CallSwitchRequestInfo` | *Removed (no replacement)* |
4 changes: 2 additions & 2 deletions calls/javascript/nextjs-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default function CallScreen({ sessionId, onCallEnd }: CallScreenProps) {

// Control handlers
const toggleAudio = () => {
isMuted ? CometChatCalls.unMuteAudio() : CometChatCalls.muteAudio();
isMuted ? CometChatCalls.unmuteAudio() : CometChatCalls.muteAudio();
};

const toggleVideo = () => {
Expand Down Expand Up @@ -517,7 +517,7 @@ export function useCall() {
}, [CometChatCalls]);

const toggleAudio = useCallback(() => {
isMuted ? CometChatCalls?.unMuteAudio() : CometChatCalls?.muteAudio();
isMuted ? CometChatCalls?.unmuteAudio() : CometChatCalls?.muteAudio();
}, [CometChatCalls, isMuted]);

const toggleVideo = useCallback(() => {
Expand Down
116 changes: 0 additions & 116 deletions calls/javascript/picture-in-picture.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions calls/javascript/react-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default function CallScreen({ sessionId, onCallEnd }) {

// Control handlers
const toggleAudio = () => {
isMuted ? CometChatCalls.unMuteAudio() : CometChatCalls.muteAudio();
isMuted ? CometChatCalls.unmuteAudio() : CometChatCalls.muteAudio();
};

const toggleVideo = () => {
Expand Down Expand Up @@ -372,7 +372,7 @@ export function useCall() {
}, []);

const toggleAudio = useCallback(() => {
isMuted ? CometChatCalls.unMuteAudio() : CometChatCalls.muteAudio();
isMuted ? CometChatCalls.unmuteAudio() : CometChatCalls.muteAudio();
}, [isMuted]);

const toggleVideo = useCallback(() => {
Expand Down
Loading