MediaSFU Shared
    Preparing search index...

    Function getRoomReadiness

    • Is the room actually usable yet?

      Headless consumers repeatedly re-derive this same predicate and each one picks a slightly different subset, so a control fires before the transport exists and fails silently. The five conditions below are the real gate: a room name, a member identity, server-side validation, a connected emittable socket, and a loaded mediasoup device.

      reason is safe to show a user — it names what is still pending, never an endpoint, credential, or internal identifier.

      Parameters

      Returns RoomReadiness

      import { getRoomReadiness } from 'mediasfu-shared';

      const { ready, reason } = getRoomReadiness({ parameters });
      if (!ready) return <p>{reason}</p>;