MediaSFU React Native
    Preparing search index...

    Function sleep

    • Delays execution for a specified number of milliseconds.

      This helper is used throughout MediaSFU to wait for short transport or media lifecycle transitions before continuing work.

      Parameters

      Returns Promise<void>

      A promise that resolves after the requested delay.

      await sleep({ ms: 500 });
      // Continue after a half-second pause.