Permissions and webhook events
Import the supported literal values from the Node SDK.
Import
import { participantPermissions, webhookEventTypes } from '@relayrtc/node'Participant permissions
const permissions = [
'room:join',
'audio:publish',
'video:publish',
'screen:publish',
'messages:send',
'metadata:update',
] as constThe exported participantPermissions array contains these values. Tokens must include room:join. Grant only what the caller needs.
Webhook events
const events = [
'room.created',
'room.started',
'room.ended',
'participant.joined',
'participant.left',
'participant.reconnected',
'track.published',
'track.unpublished',
'connection.degraded',
'connection.recovered',
] as constThe exported webhookEventTypes array contains these values. Endpoint subscriptions must be nonempty and unique.
The SDK also exports ParticipantPermission and WebhookEventType types.