video_telemetry 0.2.0
video_telemetry: ^0.2.0 copied to clipboard
A universal metrics layer for any video player. Measures time-to-first-frame, buffer stalls, rebuffering ratio, and segment switches safely.
Changelog #
0.2.0 #
- Architectural Refactor:
- Removed explicit dependency on
video_player. The core telemetry package is now 100% agnostic to any specific video player implementation. - Replaced
VideoPlayerControllerdependency with a robust interface abstraction (TelemetryPlayerObserver). - Added adapter pattern logic, meaning you can adopt this package for any Video Player (like
media_kit,just_audio, or native bridges). View the example to see thevideo_playeradapter implementation.
- Removed explicit dependency on
- Overhauled test infrastructure to prevent native platform channel conflicts during headless CI testing.
0.1.4 #
- Now support for all platforms (Android, iOS, Linux, macOS, Web, and Windows).
- Resolve minor analyzer lints and formatting issues for improved code quality.
0.1.3 #
- Fix README image rendering on pub.dev by using the absolute GitHub blob URL with
?raw=true.
0.1.2 #
- Bundle the demo GIF locally (
screenshots/metrics.gif) so it renders correctly underpub.dev's strict Content Security Policy.
0.1.1 #
- Fix
pub.devscore issues:- Add missing dartdoc comments for models and config.
- Shorten package description to meet the 180-character limit.
- Update
README.mdto use standard markdown for images rather than HTML tags so they display properly on pub.dev.
0.1.0 #
Initial release.
Features #
VideoTelemetry.wrap()— attaches to anyVideoPlayerController- Time-to-first-frame measurement from
play()to first rendered frame - Buffer stall detection with configurable minimum duration threshold
- Seek classification — seek-induced buffering excluded from stall count
- Loop reset detection — video loops not misclassified as backward seeks
- Rebuffering ratio computed against effective play time, not wall-clock time
- Manual segment switch reporting via
reportSegmentSwitch() reset()for playlist and content-change scenarios- All metrics available as pull API, streams, or callbacks
TelemetryConfigfor tuning all thresholds and intervals