MediaSFU Shared
    Preparing search index...

    Function sendChatMessage

    • Send a chat message from a headless surface.

      sendMessage takes eleven fields that all have to be lifted off the bag in the right combination; this resolves them for you, including the localSocket-before-socket preference the SDK uses for chat.

      Parameters

      Returns Promise<HeadlessActionResult>

      import { sendChatMessage } from 'mediasfu-shared';

      await sendChatMessage({ parameters, message: 'Hello everyone' });
      await sendChatMessage({ parameters, message: 'Just you', receivers: ['Paul'] });