Skip to content

Add meeting session timing tracking and signaling#3168

Merged
hensmi-amazon merged 2 commits intomainfrom
meeting-session-timing
Feb 20, 2026
Merged

Add meeting session timing tracking and signaling#3168
hensmi-amazon merged 2 commits intomainfrom
meeting-session-timing

Conversation

@hensmi-amazon
Copy link
Contributor

Issue #: None

Description of changes:

  • New MeetingSessionTimingManager - Batches timing events (start, join, ICE, subscribe, first packet/frame) and emits via observer when complete or after 15s timeout
  • New VideoElementFrameMonitor - Detects first frame render using requestVideoFrameCallback (falls back to resize event) and tracks FPS
  • New protobuf message SdkMeetingSessionTimingFrame - Sends timing data to backend via signaling
  • Extended MediaMetricsEncodedTransformManager - Now notifies observers on first packet per SSRC
  • Extended VideoTileResolutionObserver - Added videoTileBound, videoTileFirstFrameDidRender, videoTileRenderMetricsDidReceive callbacks
  • Updated DefaultAudioVideoController - Wires up timing manager, routes events from tasks/transforms/tiles
  • Updated tasks - CreatePeerConnectionTask, CreateSDPTask, FinishGatheringICECandidatesTask, JoinAndReceiveIndexTask, ReceiveVideoStreamIndexTask, SetLocalDescriptionTask, SetRemoteDescriptionTask,
    SubscribeAndReceiveSubscribeAckTask now emit timing events

Testing:

Confirmed all expected timestamps are sent to backend, which is able to process them.

Can these tested using a demo application? Please provide reproducible step-by-step instructions.

N/A

Checklist:

  1. Have you successfully run npm run build:release locally?
    y

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved?
    n

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved?
    n

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hensmi-amazon hensmi-amazon requested a review from a team as a code owner February 19, 2026 00:02
"build": "npm run deps && npm install && tsc --noEmit && npm run build:fast",
"start:fast": "node dev-server.js",
"start:watch": "WATCH_SDK=true node dev-server.js",
"start:sdk-autorefresh": "SDK_AUTOREFRESH=true node dev-server.js",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change

VIDEO_DISCARDED_PPS = 47;
VIDEO_PLIS_SENT = 48;
VIDEO_RECEIVED_JITTER_MS = 49;
VIDEO_LOCAL_RENDER_FPS = 52;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't end up getting local render FPS working unfortunately (since most apps do not bind the local tile) but just leaving it for the future.

# Just so the devs can see.
puts 'Auditing development dependencies. You should address any findings.'
system('npm audit --omit=prod')
system('npm audit --include=dev')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change

"moduleResolution": "node",
"outDir": "../build",
"rootDir": "../src"
"outDir": "../build/mediatransformworker",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change

direction: 'send' | 'receive',
ssrc: number
): void {
if (mediaType === 'audio' && direction === 'receive') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I feel it might be logically easier to follow like

if (mediaType === 'audio') {
    if (direction === 'receive') {
    } else if (direction === 'send') {
    }
} else if (mediaType === 'video') {
    if (direction === 'receive') {
    } else if (direction === 'send') {
    }
}

shi-su
shi-su previously approved these changes Feb 19, 2026
@hensmi-amazon hensmi-amazon merged commit b3fe90e into main Feb 20, 2026
7 checks passed
@hensmi-amazon hensmi-amazon deleted the meeting-session-timing branch February 20, 2026 00:27
export interface MeetingSessionRemoteAudioTiming {
addedMs?: number;
firstPacketReceivedMs?: number;
firstFrameRenderedMs?: number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't this hooked up in MeetingSessionTimingManager?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These match the signaling protocol but I have not wired up to anything on the web. I'll remove or put a comment.

*/
export interface MeetingSessionLocalAudioTiming {
addedMs?: number;
firstFrameCapturedMs?: number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above

*/
export interface MeetingSessionLocalVideoTiming {
addedMs?: number;
firstFrameCapturedMs?: number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants