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 new poll is created
An event is fired each time meeting.polls.items
is updated. User can listen
for this to get the updated list of polls.
meeting.polls.on('pollsUpdate', ({ polls }) => {
console.log(polls);
});