StreamProbe introduces real-time segment download metrics and CDN response header tracking in this update, surfacing video delivery data directly in the debug overlay.
TL;DR
You can now see segment download speeds and CDN metadata (like which edge node served a chunk) live in the overlay panel. No more digging through network logs to understand video delivery behavior during debugging.
What's New
SegmentMetricmodel — captures per-segment download timing and throughput dataCdnHeaderInfomodel — stores parsed CDN-specific response headers (e.g., cache status, edge node, origin)CdnHeaderParser— new parsing layer that extracts CDN data from HTTP responses intercepted during playbackPlayerInterceptorupdates — now hooks into segment requests to collectSegmentMetricdata on each downloadSessionStoreupdates — manages and persists segment metric history across a playback sessionOverlayPanelViewenhancements — new UI sections display segment download speed and CDN status in real time
How to Use
No configuration needed. If you're already using the StreamProbe debug overlay, segment metrics and CDN info will appear automatically once this update is applied.
- Start playback with the debug overlay enabled
- The overlay panel will show a new Segment Metrics section with download speed per segment
- CDN header details (cache hit/miss, serving edge, etc.) appear below if the CDN exposes standard headers
// SegmentMetric is populated automatically by PlayerInterceptor
// Access current session data via SessionStore if needed:
let metrics = SessionStore.shared.segmentMetrics
FAQ
What CDN headers does StreamProbe parse?
StreamProbe parses common CDN response headers like X-Cache, X-Served-By, Via, and similar edge/cache indicators. The exact fields depend on what your CDN exposes in its HTTP responses.
Does this affect playback performance?
The interception and parsing happen on a background thread and are designed to be lightweight. The overhead per segment is minimal and should not impact playback quality or buffering behavior.
Can I access segment metrics programmatically?
Yes. SessionStore now holds a collection of SegmentMetric objects for the active session. You can read these directly if you need to log or export the data outside the overlay.
What if my CDN doesn't send standard headers?
The CdnHeaderInfo fields will be empty or nil, and the CDN section in the overlay will reflect that no data was available. Segment download speed metrics will still be captured regardless of CDN header availability.