sendDataMessage method

Future<void> sendDataMessage(
  1. String topic,
  2. String data, {
  3. int lifetimeMs = 0,
})

Sends a real-time data message to all attendees subscribed to topic.

lifetimeMs: how long the message is retained for late joiners (0–300 000 ms). Throws ChimeMeetingException if the session is not active.

Implementation

Future<void> sendDataMessage(String topic, String data, {int lifetimeMs = 0}) async {
  try {
    await _coordinator.hostApi.sendDataMessage(topic, data, lifetimeMs);
  } on PlatformException catch (e) {
    throw ChimeMeetingException('Failed to send data message', e.message);
  }
}