Do not report playback metrics if the network is not in use

This commit is contained in:
Gabe Kangas
2022-04-07 13:53:23 -07:00
parent 4fea5954d1
commit 6b909b2c47

View File

@@ -154,6 +154,14 @@ class PlaybackMetrics {
return;
}
// Network state 2 means we're actively using the network.
// We only care about reporting metrics with network activity stats
// if it's actively being used, so don't report otherwise.
const networkState = this.player.networkState();
if (networkState !== 2) {
return;
}
const bandwidth = tech.vhs.systemBandwidth;
this.trackBandwidth(bandwidth);