Hiyve Components - v1.0.0
    Preparing search index...

    Function useRemoteCamera

    • Manage pairing a remote device as an additional camera feed.

      Parameters

      Returns UseRemoteCameraReturn

      The remote device (phone) joins the room as a ghost participant using a join token. The hook tracks whether the ghost participant has appeared in the room's participant list and manages token expiry.

      const remoteCamera = useRemoteCamera({
      roomName: 'my-room',
      ownerUserId: 'user@example.com',
      enabled: isInRoom,
      });

      // Start pairing (generates QR URL)
      await remoteCamera.startPairing();

      // Display QR code from remoteCamera.qrUrl
      // Status transitions: idle → waiting → connected