sendAction method
Implementation
Future<void> sendAction(ActionModel action) async {
if (!MeetingActions.isValidAction(action.action)) {
sendMessageToUI("Action not allowed.");
return;
}
try {
String jsonData = jsonEncode(action.toJson());
await room.localParticipant?.publishData(
utf8.encode(jsonData),
reliable: true,
);
setHandRaisedForLocal(action);
} catch (e) {
if (kDebugMode) {
print('Error sending action: $e');
}
}
}