Skip to main content

Other poll functions

View poll results

The total votes on a poll can be accessed in the following manner.

const poll = meeting.polls.items[0];
const votes = poll.voted;

votes is an array of participant ID's (meeting.participant.id).

The total votes on a poll option can be accessed in the following manner.

const poll = meeting.polls.items[0];
const options = poll.options;

options returns an array of objects, where each object is of type PollObject.

Get notified when a poll is created or updated

An event is fired each time meeting.polls.items is updated or created. User can listen for this to get the updated list of polls. the response object contains the following properties.

  • polls: List of all polls.
  • newPoll: A boolean variable which is true when a new poll has been created.
meeting.polls.on('pollsUpdate', ({ polls, newPoll }) => {
console.log(polls, newPoll);
});