Stream Probe 0.5.0 introduces Time to First Byte (TTFB) tracking for video segments, visible directly in the Segments overlay.
TL;DR
You can now see exactly how long each video segment takes to start downloading. A new TimingDataSourceFactory wraps your existing DataSource.Factory and measures the open() duration, feeding that data into the Segments overlay without any changes to your player setup.
What's New
- TimingDataSourceFactory: Wraps the host DataSource.Factory to intercept and time each
open()call, capturing TTFB at the network layer - NetworkTimingRegistry: A thread-safe registry that handles metric handoff between network threads and the player thread, so timing data never gets lost or corrupted
- PlayerInterceptor updates: Now reads from NetworkTimingRegistry and attaches TTFB values to each
SegmentMetricautomatically - Segments overlay UI update: TTFB is now displayed alongside existing segment data, so you can spot slow-loading segments at a glance
- Version bump to 0.5.0
How to Use
No changes required if you're already using PlayerInterceptor. Stream Probe wires TimingDataSourceFactory into your player's data source automatically. TTFB values will appear in the Segments tab of the debug overlay the next time you run your app.
If you're integrating manually, wrap your DataSource.Factory:
// TimingDataSourceFactory wraps your existing factory
let timedFactory = TimingDataSourceFactory(wrapping: yourDataSourceFactory)