caution
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.
-
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. -
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
- JavaScript
- React
- ReactNative
- Android
- IOS
- Flutter
const onPress = () => {
// Sending Message
let data = {
message: "Hello World",
};
meeting?.sendChatMessage(JSON.stringify(data));
// Raising Hand
meeting?.sendChatMessage(JSON.stringify({ type: "RAISE_HAND", data: {} }));
};
const onPress = () => {
// Sending Message
let data = {
message: "Hello World",
};
meeting?.sendChatMessage(JSON.stringify(data));
// Raising Hand
meeting?.sendChatMessage(JSON.stringify({ type: "RAISE_HAND", data: {} }));
};
const onPress = () => {
// Sending Message
let data = {
message: "Hello World",
};
meeting?.sendChatMessage(JSON.stringify(data));
// Raising Hand
meeting?.sendChatMessage(JSON.stringify({ type: "RAISE_HAND", data: {} }));
};
COMING SOON!
COMING SOON!
COMING SOON!
Events
- 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)
.
- JavaScript
- React
- ReactNative
- Android
- IOS
- Flutter
meeting.on("chat-message", (messageData) => {
const { senderId, senderName, text } = messageData;
const { type, data } = JSON.parse(text);
// type can be "CHAT" or "RAISE_HAND"
});
import { useMeeting } from "@videosdk.live/react-sdk";
/** useMeeting hooks events */
const {
/** Methods */
} = useMeeting({
onChatMessage: (messageData) => {
const { senderId, senderName, text } = messageData;
const { type, data } = JSON.parse(text);
// type can be "CHAT" or "RAISE_HAND"
},
});
import { useMeeting } from "@videosdk.live/react-native-sdk";
/** useMeeting hooks events */
const {
/** Methods */
} = useMeeting({
onChatMessage: (messageData) => {
const { senderId, senderName, text } = messageData;
const { type, data } = JSON.parse(text);
// type can be "CHAT" or "RAISE_HAND"
},
});
COMING SOON!
COMING SOON!
COMING SOON!
Got a Question? Ask us on discord