Class MeetingSessionTimingManager

MeetingSessionTimingManager tracks all lifecycle timestamps for a meeting session and emits them in batches via the observer.

A batch begins when the first event is recorded (e.g. onStart, onRemoteVideoAdded) and completes when all tracked categories have reached their terminal state (e.g. signaling fully connected, audio first packet received, video first frame rendered). If a batch does not complete within TIMEOUT_THRESHOLD_MS (15 s), it is emitted with per-category timedOut flags.

After each emission, already-reported state is cleared so that subsequent events (e.g. a mid-call remote video add) trigger a new batch containing only new data.

Categories are only included in a batch if their corresponding on*Added method was called. For example, if local video is never started, the batch will not wait for local video timing. Remote video entries that were never bound to a video element are silently omitted.

Constructors

Methods

  • Clears the expectation that remote video will be part of the current batch. Called when the downlink policy decides not to subscribe to any video, so the batch is not held open waiting for remote video that will never arrive.

    Returns void

  • Starts tracking timing for a remote video subscription. Records the added timestamp for the given group_id. If a timer already exists for this group_id, it is replaced.

    Parameters

    • groupId: number

      The group ID of the remote video subscription

    Returns void

  • Records that a remote video tile has been bound to a video element. Only bound remote videos are included in timing emissions. Unbound remote videos are silently omitted from the batch.

    Parameters

    • groupId: number

      The group ID of the remote video subscription

    Returns void

  • Records the timestamp when first video frame was rendered for a group_id.

    Parameters

    • groupId: number

      The group ID of the remote video subscription

    • Optionalmetadata: VideoFrameCallbackMetadata

      The VideoFrameCallbackMetadata from requestVideoFrameCallback, if available

    Returns void

  • Records the timestamp when first video packet was received for a group_id. Only the first call for each group_id records the timestamp.

    Parameters

    • groupId: number

      The group ID of the remote video subscription

    Returns void

  • Marks timing state for a remote video subscription as removed. The timing data will be emitted with the removed flag.

    Parameters

    • groupId: number

      The group ID of the remote video subscription

    Returns void

  • Records that a remote video tile has been unbound from its video element. The group ID is removed from the bound set so it no longer blocks batch emission.

    Parameters

    • groupId: number

      The group ID of the remote video subscription

    Returns void

  • Starts a resubscribe signaling timing entry. Used for mid-meeting resubscribes (e.g. new remote video joins) to capture the resubscribe latency (subscribe sent → ack → set remote description). Only the resubscribe-relevant signaling fields are required for completion.

    Returns void

  • Indicates that remote video is expected in the current batch. The batch will not complete until at least one remote video entry has been added and completed (or the batch times out).

    This method exists because the SDK's initial subscribe does not include remote video — index ingestion is paused during the first subscribe, so the downlink policy cannot select video streams until the connection is established and a second subscribe (resubscribe) is triggered.

    Returns void