Skip to main content

RtkPoll

A poll component.

Shows a poll where a user can vote.

<RtkPoll
poll={{
id: 'poll-id',
question: 'Have you started using RealtimeKit yet?',
options: [
{
text: 'Yes',
votes: [{ id: 'vaibhavs-user-id', name: 'Vaibhav' }],
count: 0,
},
{
text: 'Nope',
votes: [],
count: 0,
},
],
anonymous: false,
hideVotes: false,
createdBy: 'Vaibhav',
createdByUserId: 'vaibhavs-user-id',
voted: [],
}}
onRtkVotePoll={(e) => {
console.log('Voted', e.detail);
}}
/>

Props

poll

required

Poll

Type
Poll

iconPack

Icon pack

Default
defaultIconPack

permissions

Permissions Object

Type
{ readonly mediaRoomType: Readonly<MediaRoomType>; readonly stageEnabled: Readonly<boolean>; readonly acceptStageRequests: Readonly<boolean>; readonly stageAccess: MediaProductionPermissionType; readonly acceptWaitingRequests: Readonly<boolean>; readonly requestProduceVideo: Readonly<boolean>; readonly requestProduceAudio: Readonly<boolean>; readonly requestProduceScreenshare: Readonly<boolean>; readonly canAllowParticipantAudio: Readonly<boolean>; readonly canAllowParticipantScreensharing: Readonly<boolean>; readonly canAllowParticipantVideo: Readonly<boolean>; readonly canDisableParticipantAudio: Readonly<boolean>; readonly canDisableParticipantVideo: Readonly<boolean>; readonly kickParticipant: Readonly<boolean>; readonly pinParticipant: Readonly<boolean>; readonly canRecord: Readonly<boolean>; readonly waitingRoomType: WaitingRoomTypes; readonly waitingRoomBehaviour: WaitingRoomTypes; readonly plugins: Readonly<{ canClose: boolean; canStart: boolean; canEditConfig?: boolean; config: { [pluginId: string]: Partial<{ accessControl: any; disabled: boolean; handlesViewOnly: boolean; }>; }; }>; readonly polls: Readonly<{ canCreate: boolean; canVote: boolean; canView: boolean; }>; readonly produceVideo: MediaProductionPermissionType; readonly requestProduce: Readonly<boolean>; readonly canProduceVideo: MediaProductionPermissionType; readonly produceScreenshare: MediaProductionPermissionType; readonly canProduceScreenshare: MediaProductionPermissionType; readonly produceAudio: MediaProductionPermissionType; readonly canProduceAudio: MediaProductionPermissionType; readonly chatPublic: Readonly<{ canSend: boolean; text: boolean; files: boolean; }>; readonly chatPrivate: Readonly<{ canSend: boolean; canReceive: boolean; text: boolean; files: boolean; }>; readonly chatChannel: Readonly<{ canCreate: "NONE" | "PRIVATE" | "PUBLIC" | "ALL"; canDelete: "NONE" | "PRIVATE" | "PUBLIC" | "ALL"; canUpdate: "NONE" | "PRIVATE" | "PUBLIC" | "ALL"; canReadAll: boolean; }>; readonly chatMessage: Readonly<{ canDelete: "NONE" | "ALL" | "SELF"; canEdit: "NONE" | "ALL" | "SELF"; deleteCutoffTimeSeconds: number; editCutoffTimeSeconds: number; }>; readonly connectedMeetings: Readonly<{ canAlterConnectedMeetings: boolean; canSwitchConnectedMeetings: boolean; canSwitchToParentMeeting: boolean; }>; readonly hiddenParticipant: Readonly<boolean>; readonly showParticipantList: Readonly<boolean>; readonly canChangeParticipantRole: Readonly<boolean>; readonly canChangeParticipantPermissions: Readonly<boolean>; readonly canChangeTheme: Readonly<boolean>; readonly canPresent: Readonly<boolean>; readonly acceptPresentRequests: Readonly<boolean>; readonly canEditDisplayName: Readonly<boolean>; readonly maxScreenShareCount: number; readonly isRecorder: Readonly<boolean>; readonly canSpotlight: Readonly<boolean>; readonly canLivestream: Readonly<boolean>; readonly transcriptionEnabled: Readonly<boolean>; readonly emit: <E extends keyof PermissionEvents>(event: E, ...args: Parameters<PermissionEvents[E]>) => boolean; readonly on: <E extends keyof PermissionEvents>(event: E, callback: PermissionEvents[E]) => RTKPermissionsPreset$1; readonly addListener: <E extends keyof PermissionEvents>(event: E, callback: PermissionEvents[E]) => RTKPermissionsPreset$1; readonly off: <T extends keyof PermissionEvents>(event: T, callback: PermissionEvents[T]) => RTKPermissionsPreset$1; readonly once: <T extends keyof PermissionEvents>(event: T, callback: PermissionEvents[T]) => RTKPermissionsPreset$1; readonly prependListener: <T extends keyof PermissionEvents>(event: T, callback: PermissionEvents[T]) => RTKPermissionsPreset$1; readonly prependOnceListener: <T extends keyof PermissionEvents>(event: T, callback: PermissionEvents[T]) => RTKPermissionsPreset$1; readonly removeListener: <T extends keyof PermissionEvents>(event: T, callback: PermissionEvents[T]) => RTKPermissionsPreset$1; readonly removeAllListeners: <T extends keyof PermissionEvents>(event?: T) => RTKPermissionsPreset$1; readonly listeners: <T extends keyof PermissionEvents>(event: T) => Function[]; readonly listenerCount: <T extends keyof PermissionEvents>(event: T) => number; readonly [EventEmitter.captureRejectionSymbol]?: <K>(error: Error, event: string | symbol, ...args: AnyRest) => void; readonly setMaxListeners: (n: number) => RTKPermissionsPreset$1; readonly getMaxListeners: () => number; readonly rawListeners: <K>(eventName: string | symbol) => Function[]; readonly eventNames: () => (string | symbol)[]; }

self

Self ID

Type
string

t

Language

Default
useLanguage()