RealtimeKitPreset
Source:
src/Cloudflare/RealtimeKit/Preset.ts
A Cloudflare RealtimeKit preset — a named participant role (e.g. host,
guest) bundling permissions, media quality, and UI design tokens for a
RealtimeKit app.
Name, config, UI, and permissions are all mutable in place; only moving the preset to a different app forces a replacement. The create API requires the full config / UI / permissions objects, so the resource fills unspecified sections with sensible defaults.
Creating a Preset
Section titled “Creating a Preset”Default group-call preset
const app = yield* Cloudflare.RealtimeKitApp("Meetings", {});
const guest = yield* Cloudflare.RealtimeKitPreset("Guest", { appId: app.appId, name: "guest",});Host preset with moderation permissions
const host = yield* Cloudflare.RealtimeKitPreset("Host", { appId: app.appId, name: "host", permissions: { ...Cloudflare.defaultRealtimeKitPresetPermissions(), canRecord: true, kickParticipant: true, pinParticipant: true, acceptWaitingRequests: true, },});Updating a Preset
Section titled “Updating a Preset”const preset = yield* Cloudflare.RealtimeKitPreset("Guest", { appId: app.appId, name: "guest", config: { ...Cloudflare.defaultRealtimeKitPresetConfig(), viewType: "WEBINAR", },});