Stream Probe introduces per-segment Time To First Byte (TTFB) measurement in this update, giving developers a direct view of server response latency inside the debug overlay.
TL;DR
Version 0.5.0 adds TTFB tracking via a new TimingDataSourceFactory wrapper. Call StreamProbe.wrapDataSourceFactory() to enable it, and TTFB estimates appear alongside other segment metrics in the overlay automatically.
What's New
StreamProbe.wrapDataSourceFactory()public API: single entry point to opt into TTFB measurement without touching playback logicTimingDataSourceFactory: wraps your existingDataSource.Factory, records the duration of eachopen()call to capture real network response timeNetworkTimingRegistry: thread-safe registry that bridges I/O thread measurements to the main playback thread safely- Overlay UI update: TTFB estimates now render inline with per-segment data in the Segments tab
- SDK version bump: 0.5.0
How to Use
Wrap your existing factory before passing it to the player:
val timedFactory = StreamProbe.wrapDataSourceFactory(yourDataSourceFactory)
// Pass timedFactory to your ExoPlayer MediaSource setup as usual
No other changes needed. TTFB values appear in the Segments overlay once playback starts.