Skip to content

SDK API ​

html
<script src="https://sdk.remeet.video/v0.js"></script>

One file, no dependencies, about 7 KB. It defines the global ReMeet. The v0 address never breaks: changes to it stay compatible; a breaking change will get a new file (v1.js).

All methods return promises. When ReMeet refuses a call, the promise rejects with an Error that has a numeric code:

CodeMeaning
400ready() was not called first
403The permission was not granted; or only the host may do this; or the app is not installed for this person
404Unknown method or participant; or the app has no stage
413Broadcast data is larger than 8 KB
429More than 20 broadcasts per second
500Something failed inside ReMeet

If ReMeet does not answer in 15 seconds, the promise rejects with «ReMeet did not answer». If the page is opened outside a meeting or the simulator, ready() rejects with a hint to open it in the simulator.

ReMeet ​

ReMeet.ready() ​

Connects to the meeting. Call it once, at start; later calls return the same object.

js
const app = await ReMeet.ready();

Returns app:

PropertyType
app.contextobjectEverything ReMeet told the app at start, see below
app.meParticipantThe person running this copy: { id, name, role }
app.permissionsstring[]Permissions this person allowed
app.contextTokenstringSigned JWT for your server, see Context token
app.can(permission)booleantrue if the permission was granted

app.context:

js
{
  sdk: 'v0',
  app: { key: 'wave', version: '0.1.0' },
  surface: 'panel',                 // or 'stage'
  meeting: { id: '01m6saztdr6cafg9yzx83db0fs', title: 'Weekly sync' },
  me: { id: 'p_…', name: 'Anna', role: 'host' },   // 'host' | 'member' | 'guest'
  locale: 'en',                     // 'en' | 'ru' | 'ar'
  theme: 'dark',                    // 'light' | 'dark'
  permissions: ['participants.read', 'app.broadcast'],
  participants: [ /* Participant[], empty without participants.read */ ],
  contextToken: 'eyJ…'
}

ReMeet.on(name, handler) / app.on(name, handler) ​

Subscribes to a meeting event. Returns a function that unsubscribes.

js
const off = app.on('speaking', ({ ids }) => highlight(ids));
off();

ReMeet.version, ReMeet.surface ​

The SDK version ('0.1.0') and where this copy is shown ('panel' or 'stage'). Both are available before ready().

Participants ​

Permission: participants.read.

app.participants() ​

Everyone in the meeting right now, including the person.

ts
type Participant = {
  id: string;          // 'p_' + 24 hex: the same person in every meeting, different per app
  name: string;
  isMe: boolean;
  isSpeaking: boolean;
  role: string;        // 'host' | 'member' | 'guest'
};

Broadcast ​

Permission: app.broadcast.

app.broadcast(data) ​

Sends data (anything JSON can hold, up to 8 KB) to the copies of your app at every other participant who has it open. Delivery is reliable and in order. Your own copy does not receive it.

js
await app.broadcast({ type: 'move', x: 3, y: 5 });

Receive with the broadcast event.

Toasts ​

app.notify(text) ​

Shows a ReMeet toast to this person: «App name: text». Up to 200 characters. No permission needed.

Chat ​

app.chat.send(text) ​

Permission: chat.send. Sends a message to the meeting chat from this person, starting with [App name]. Up to 500 characters.

Read messages with the chat.message event (permission chat.read).

Badges ​

Permission: badges.write.

app.badges.set(participantId, text) ​

Puts a short label (an emoji or up to 24 characters) on a participant's video tile. One badge per app per tile; a new one replaces the old one. text = null removes it.

app.badges.clear(participantId) ​

Removes your app's badge from the tile.

Badges are drawn for this person

A badge appears on the screen of the person whose copy set it. To show a badge to everyone, broadcast it and let every copy call badges.set() — like the wave example in the quick start.

Stage ​

app.stage.open({ everyone }) ​

Opens your app's stage page over the video grid.

  • app.stage.open() — only for this person. No permission needed.
  • app.stage.open({ everyone: true }) — for every participant who has the app installed. Needs stage.start and the person must be the host of the meeting; otherwise 403.

Fails with 404 if the manifest has no stage.

app.stage.close() ​

Closes the stage for this person.

Storage ​

Permission: storage. A small key-value store per app and per person, kept on ReMeet servers: the same data in every meeting and on every device.

app.storage.get(key) ​

Returns the stored value or null.

app.storage.set(key, value) ​

Stores any JSON value: up to 16 KB per value and 64 KB in total. Keys: 1–64 characters, latin letters, digits, _ . -.

app.storage.delete(key) ​

Removes the key.

js
const notes = (await app.storage.get('notes')) ?? '';
await app.storage.set('notes', notes + '\nNew idea');
await app.storage.delete('draft');

Events ​

EventDataPermission
participant.joinedParticipantparticipants.read
participant.left{ id }participants.read
speaking{ ids: string[] } — who is speaking now; empty when silentparticipants.read
broadcast{ data, from: Participant }app.broadcast
chat.message{ from: { id, name }, text }chat.read
captions{ from: { id, name }, text, lang }captions.read
theme{ theme: 'light' | 'dark' }—

ReMeet Apps SDK v0 · beta. The SDK file v0.js is MIT.