Skip to content
Last updated

Voice and Video for Browsers - In‑app Calling

This guide describes the Sinch JavaScript SDK components and how they work together. Use it when you need a deeper understanding of responsibilities, lifecycle, and integration points in the browser.

  • SinchClient: The primary entry point to the SDK; manages configuration, authentication, and feature controllers.
  • CallCient: Exposes APIs to place and receive calls, and notifies about incoming call events.
  • Call: Represents an active call with methods for answering, declining, and hanging up. Access point to CallListener which emits state changes (progressing, ringing, answered, established, ended).
  • Listeners: SinchClientListener, CallClientListener, and CallListener provide callbacks for state and events.
  • Authentication (JWT): Use a backend‑generated, secret‑signed JWT to authorize the client; never embed secrets in the app.

See the Reference Documentation for a comprehensive description of all classes.

Reference application

Explore a complete JavaScript reference application that demonstrates common use cases:

  • App to App Calling (audio and video)
  • App to PSTN Calling
  • App to SIP Calling

Find the JavaScript reference app on GitHub: rtc-reference-applications (JavaScript)

To test calling in Chrome, you can run both sides of a call in two separate tabs of the same browser instance.

If you don’t want to build the reference app locally, try the JavaScript sample online.