Adds an observer to receive timing data notifications.
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.
Stops the timeout check interval and cleans up resources. This should be called when the meeting session ends.
Records the timestamp when SDP offer was created.
Records the timestamp when ICE connection was established.
Records the timestamp when ICE gathering completed.
Records the timestamp when ICE gathering started.
Records the timestamp when join ack was received.
Records the timestamp when join frame was sent.
Records the timestamp when local audio track was added.
Records the timestamp when first audio packet was sent.
Records the timestamp when local video track was added.
Records the timestamp when first video frame was sent.
Marks local video timing as removed and triggers batch completion check. This allows the timing data to be emitted with the removed flag.
Records the timestamp when remote audio track was added.
Records the timestamp when first audio packet was received.
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.
The group ID of the remote video subscription
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.
The group ID of the remote video subscription
Records the timestamp when first video frame was rendered for a group_id.
The group ID of the remote video subscription
Optionalmetadata: VideoFrameCallbackMetadataThe VideoFrameCallbackMetadata from requestVideoFrameCallback, if available
Records the timestamp when first video packet was received for a group_id. Only the first call for each group_id records the timestamp.
The group ID of the remote video subscription
Marks timing state for a remote video subscription as removed. The timing data will be emitted with the removed flag.
The group ID of the remote video subscription
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.
The group ID of the remote video subscription
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.
Records the timestamp when local description was set.
Records the timestamp when remote description was set.
Records the timestamp when audioVideo.start() was called.
Records the timestamp when subscribe ack was received.
Records the timestamp when subscribe frame was sent.
Records the timestamp when signaling WebSocket connection was established.
Clears all timing state and resets the manager for a new session. This should be called when starting a new meeting session.
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.
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.