Messenger class responsible for handling WebSocket communication, including sending and receiving messages, managing connection state, and dispatching events.

Constructors

Properties

onCameraPose: (msg: Segment) => void = ...
onVideoFrame: (msg: VideoFrameMessage) => void = ...

Callback function to handle incoming video frames.

Type declaration

Accessors

Methods

  • Handles incoming messages from the WebSocket server.

    Parameters

    • event: MessageEvent<any>

      The message event containing the data.

    Returns Promise<void>