Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix(video): don't count seek fetches as errors in playback metrics

Gabe Kangasaa1070fdab17
diff --git a/web/components/video/metrics/playback.js b/web/components/video/metrics/playback.js
index 65481e5109..36ea8dedc4 100644
--- a/web/components/video/metrics/playback.js
+++ b/web/components/video/metrics/playback.js
@@ -132,6 +132,13 @@ class PlaybackMetrics {
}
handleBuffering() {
+ // A waiting event that fires while the player is seeking is the fetch at
+ // a seek discontinuity (the viewer scrubbed, or the latency compensator
+ // jumped forward), not a playback interruption. Genuine starvation fires
+ // with seeking() false, so only count those as errors.
+ if (this.player.seeking()) {
+ return;
+ }
this.incrementErrorCount(1);
this.setIsBuffering(true);
}