Skip to main content
setMeetingSessionData(data, mergeStrategy?) Writes to a shared key-value store scoped to the current meeting session. All participants receive the update in near real-time — remote clients typically consume changes via the meeting-session-state-updated event, or by polling meetingSessionState(). Data is not persisted after the session ends.

Parameters

data
unknown
required
A map-like JavaScript object that:
  • Is serializable to JSON
  • Has a max payload size of 100KB
  • Can be shallow-merged
mergeStrategy
'replace' | 'shallow-merge'
How to combine the new data with the existing session data.
  • 'replace' (default) — replaces the entire existing data object.
  • 'shallow-merge' — merges top-level keys, leaving unaffected keys intact. Note that nested objects are replaced entirely, not recursively merged.

Return value

Returns void. To observe changes, listen to the meeting-session-state-updated event or poll meetingSessionState().

Rate limiting

Updates are batched and synced at most once per second. If multiple clients make conflicting 'replace' or overlapping 'shallow-merge' calls in rapid succession, precise ordering is not guaranteed. This makes setMeetingSessionData() unsuitable for high-frequency real-time use cases where sub-second updates matter.

Examples

Replace

// Current data: { address: { country: 'Finland' } }
call.setMeetingSessionData({ code: '358' }, 'replace');
// New data: { code: '358' }

Shallow merge

// Current data: { address: { country: 'Finland' } }
call.setMeetingSessionData({ code: '358' }, 'shallow-merge');
// New data: { address: { country: 'Finland' }, code: '358' }

call.setMeetingSessionData({ address: { city: 'Helsinki' } }, 'shallow-merge');
// New data: { address: { city: 'Helsinki' }, code: '358' }
// Note: address.country was lost because nested objects are replaced, not merged

Listening for updates

call.on('meeting-session-state-updated', ({ meetingSessionState }) => {
  console.log('Session data updated:', meetingSessionState.data);
});

See also