New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@whereby.com/core

Package Overview
Dependencies
Maintainers
2
Versions
685
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whereby.com/core

Core library for whereby.com sdk

latest
npmnpm
Version
1.29.0
Version published
Weekly downloads
41K
111.96%
Maintainers
2
Weekly downloads
 
Created
Source

@whereby.com/core

@whereby.com/core is the low-level foundation of the Whereby SDK. It exposes a set of containers, actions, and client classes for working with local media and room connections. It's used to power the Whereby Browser SDK, Whereby Assistants and React Native SDK and other forms of Whereby meetings. It also contains utils which may be useful in custom experiences.

Use Core if you need fine-grained control over media and connections, or if you are building a custom integration outside of React. For most web apps, the Browser or React SDKs will be easier starting points.

Installation

npm install @whereby.com/core

or

yarn add @whereby.com/core

or

pnpm add @whereby.com/core

Usage

[!IMPORTANT] In order to use @whereby.com/core, you must have a Whereby account from which you can create room URLs, either manually or through the Whereby API.

Getting Started

import { WherebyClient } from "@whereby.com/core";

const client = new WherebyClient();

// manage local devices
const localMedia = client.getLocalMedia();

// manage room connection
const roomConnection = client.getRoomConnection();

Core Concepts

Local Media

The LocalMediaClient controls microphones, cameras and local media tracks. It provides methods to request permissions, start and stop tracks, and switch between devices. It also exposes state such as the list of available devices and the current active tracks.

Typical usage:

// you can pass options or a MediaStream
await localMedia.startMedia({ audio: true, video: true });

localMedia.toggleCamera(); // toggle camera on/off

Room Connection

The RoomConnectionClient handles joining and leaving rooms, as well as observing connection and remote participant state.

Typical usage:

// initialize with your room URL
roomConnection.initialize({
    roomUrl: "https://your-subdomain.whereby.com/your-room",
});

// join the room
try {
    await roomConnection.joinRoom();
} catch(error) {
    console.error("Could not join room", error);
}

// listen for changes in connection state
roomConnection.subscribeToConnectionStatus((state) => {
    console.log("Connection state changed:", state);
});

Learn More

FAQs

Package last updated on 05 Nov 2026

Related posts