Add reactions to a live event
When participating in a live event, adding the reactions function can help users be more engaged with the event and provide feedback from each other. This function is similar to the reactions you might have seen in Instagram or YouTube live streams.
Add reaction keys
To use reactions, the host first needs to specify the types of reactions they want to allow during the live event. These reactions are represented by
reactionKeys which are labels for reactions like a heart or a thumbs up.
Refer to the following lines of code to add your reaction keys to the live event.
Send reactions to others
During the live event, the host and participants can use reaction keys to express their feelings.
increaseReactionCount method is called to increase the count of a particular reaction key. For example, to send a heart, call the method with "heart" as the parameter.
increaseReactionCount method internally uses the
openChannel object to increase the meta counter for the specified reaction key.
Show reaction counts
Users in the live event will receive update on the reaction counts as it updates through the
LiveEventListener interface. You can apply special effects to show reaction counts such as animated hearts flying across the screen.