Skip to main content

Send Messages

Whenever any participant wants to notify other participants via chat messages or Raise hand, they can simply do it with videoSDK Meeting.

This guide will provide an overview of how to implement chat and raise hand in a meeting.

  1. Chat Message - If a participant wants to inform or notify something in current meeting, they can use sendChatMessage() function by providing {message:"Anything they wish to send"} object argument.

  2. Raised Hand - If a participant has some doubts during the meeting and wants to raise hand, they can use sendChatMessage() function by providing {type:"RAISE_HAND"} object argument.

note

sendChatMessage() function only takes string as an argument.

Send Message And Raised Hand#

const onPress = () => {  // Sending Message  let data = {    message: "Hello World",  };
  meeting?.sendChatMessage(JSON.stringify(data));
  // Raising Hand  meeting?.sendChatMessage(JSON.stringify({ type: "RAISE_HAND", data: {} }));};

Events#

  1. chat-message - Whenever any participant sending message/raise hand in the meeting, then chat-message event will trigger and return senderId, senderName, timeStamp, text and type (RAISE_HAND/CHAT).
meeting.on("chat-message", (messageData) => {  const { senderId, senderName, text } = messageData;
  const { type, data } = JSON.parse(text);
  // type can be "CHAT" or "RAISE_HAND"});