Skip to content

docs(calls): correct v5 Calling SDK API references and enhance guides#407

Open
honey-cometchat wants to merge 4 commits into
mainfrom
fix/v5-calling-sdk-enhancements
Open

docs(calls): correct v5 Calling SDK API references and enhance guides#407
honey-cometchat wants to merge 4 commits into
mainfrom
fix/v5-calling-sdk-enhancements

Conversation

@honey-cometchat

@honey-cometchat honey-cometchat commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

Corrects v5 Calling SDK API references and enhances the JavaScript and React Native call documentation to match the actual v5 SDK surface. Removes the unsupported Picture-in-Picture documentation, fixes renamed methods, updates default values, and documents previously missing APIs.

Related Issue(s)

Type of Change

  • Documentation correction/update
  • Improvement to existing documentation
  • New documentation
  • Typo fix
  • Other (please specify)

Summary of Changes

JavaScript

  • Remove Picture-in-Picture documentation: delete picture-in-picture.mdx, drop PiP methods/events from actions.mdx and migration-guide-v5.mdx, and remove the nav entry from docs.json.
  • Correct the audio method name unMuteAudio()unmuteAudio() across actions, custom control panel, idle-timeout, and the Angular/Ionic/Next.js/React/Vue integration guides.
  • Rename the auth method login(authToken)loginWithAuthToken(authToken) in the migration guide.
  • Update session-settings.mdx defaults: idleTimeoutPeriodAfterPrompt to 180000ms, hideRecordingButton default, and remove the obsolete hideSwitchLayoutButton option.

React Native

  • Document setAudioMode() and clarify that onAudioModeChanged delivers the active mode as a plain string ('SPEAKER' | 'EARPIECE' | 'BLUETOOTH' | 'HEADPHONES').
  • Document the participant list methods showParticipantList(), hideParticipantList(), and toggleParticipantList() in actions.mdx.
  • Document the onConnectionFailed event in events.mdx.
  • Clarify Android foreground-service handling: the SDK ships and declares CometChatOngoingCallService itself, so manual declaration is usually unnecessary.
  • Document required peer dependencies in setup.mdx and remove the pinned @5.0.0 install version.
  • Clarify v5 authentication: login(uid, authKey) vs loginWithAuthToken(authToken) in the migration guide.

Checklist

  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

Additional Information

honey-cometchat and others added 4 commits June 24, 2026 20:48
- Delete picture-in-picture.mdx page
- Remove PiP actions from actions.mdx
- Drop PiP method renames and layout events from v5 migration guide
- Remove PiP entry from docs.json navigation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Rename unMuteAudio() to unmuteAudio() across all integration guides
- Replace login() with loginWithAuthToken() in v5 migration guide
- Rename showSwitchModeButton() to showModeButton() in builder/mapping
- Replace onRecordingToggled with onRecordingStarted/onRecordingStopped events
- Remove onAudioModeChanged listener and hideSwitchLayoutButton setting
- Drop the join-by-session-ID option, leaving token-based joinSession
- Update idleTimeoutPeriodAfterPrompt default from 120000 to 180000
- Update hideRecordingButton and hideNetworkIndicator example defaults
- Use onParticipantJoined in troubleshooting guidance
- Unpin @cometchat/calls-sdk-react-native version in setup install steps

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Document setAudioMode() and participant-list panel methods
- Fix onAudioModeChanged payload as a string, not an object
- Correct Android foreground-service class, types, and permissions
- Add onConnectionFailed event listener
- Fix idle-timeout default values and descriptions
- Update migration guide: loginWithAuthToken(), setCallEventListener(),
  showSwitchCameraButton(), recording/audio-mode listener renames,
  switchToVideoCall() now a deprecated no-op
- Document header, status-indicator, identity, and behavior session settings
- Clarify join flow uses component rendering, not joinSession()

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add Install Required Dependencies section to RN Calls setup guide
- List async-storage, background-timer, performance, svg, url-polyfill, and webrtc with pinned versions
- Provide npm and Yarn install commands

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@honey-cometchat honey-cometchat changed the title docs(calls/javascript): remove Picture-in-Picture documentation docs(calls): correct v5 Calling SDK API references and enhance guides Jun 25, 2026
@mintlify

mintlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Jun 25, 2026, 1:11 PM

@jitvarpatil

Copy link
Copy Markdown
Contributor

Docs review — 🟠 Request changes (one redirect)

A large, genuinely corrective PR across the JS + RN Calling SDK v5 docs (22 files, +177/-230). I verified the API renames against the installed @cometchat/calls-sdk-javascript and @cometchat/calls-sdk-react-native 5.0.1 type definitions — they're correct — and the content quality is high. There is one real should-fix: the JS Picture-in-Picture page is deleted (correctly — the JS SDK has no PiP API) but no redirect was added, so its live URL will 404.

🟠 P1 — must-fix before merge: deleted page, no redirect (404)

  • calls/javascript/picture-in-picture.mdx is deleted and removed from docs.json nav (clean — no build break, no orphan), but the redirects delta is +0. The live URL /calls/javascript/picture-in-picture will 404 for anyone with it bookmarked/indexed.
  • The deletion itself is correctenablePictureInPictureLayout/disablePictureInPictureLayout do not exist in the JS SDK type defs, so documenting PiP there was wrong. It just needs a redirect. Since there's no JS PiP replacement, sensible targets are /calls/javascript/session-settings or the JS calls overview.

✅ API corrections — verified correct against SDK 5.0.1 type definitions

JavaScript: unMuteAudiounmuteAudio · login()loginWithAuthToken() · showSwitchModeButtonshowModeButton · onRecordingToggledonRecordingStarted/onRecordingStopped (the v5 OngoingCallListener class declares exactly these fields and has no onRecordingToggled) · removing onAudioModeChanged from the JS listener (not a field on the class) · onUserJoinedonParticipantJoined · PiP method/page removal.

React Native: setCallListenersetCallEventListener · showSwitchModeButtonshowSwitchCameraButton · onAudioModeChangedonAudioModesUpdated · new setAudioMode() · new showParticipantList()/hideParticipantList()/toggleParticipantList() · new onConnectionFailed event · loginWithAuthToken + login(uid, authKey) · switchToVideoCall still in the API (so "deprecated no-op" vs old "Removed" is accurate) · the bundled SDK AndroidManifest.xml carries the new FOREGROUND_SERVICE_MICROPHONE/MEDIA_PLAYBACK/MEDIA_PROJECTION permissions, matching the manifest edits.

🟡 P2 — worth an author double-check (couldn't fully verify from type defs)

  • Native service class com.cometchat.calls.services.CometChatOngoingCallService lives in the native AAR, not the RN bridge package, so the exact class path couldn't be confirmed — please verify it matches the shipped class.
  • FOREGROUND_SERVICE_CAMERA + camera service type — the PR adds these, but the installed 5.0.1 SDK manifest only declares microphone/mediaPlayback/mediaProjection (no camera). Likely fine for a newer release; worth confirming.
  • Idle-timeout defaults (before=60000, after=180000) — runtime defaults aren't in the type defs, but the PR makes JS and RN consistent (previously swapped between pages), which is a clear improvement. Trust author/QA on the exact numbers.

Notes (pre-existing, out of scope)

The analyzer flagged the orphan /calls/ionic/overview and 8 broken in-content links (in calls/flutter/*, calls/android/*, and calls/javascript/{call-logs,recording}.mdx) — none are in this PR's changed files, so they're pre-existing.

Otherwise an excellent, accurate cleanup. The only thing standing between it and approval is the one PiP redirect — happy to generate the redirects entry once you pick a target.

🤖 Automated docs review (Mintlify link/redirect/content checks + API verification against @cometchat/calls-sdk-javascript & calls-sdk-react-native 5.0.1 type definitions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants