From f8181fd036476d201b9b1b54b19b1a3f072b099f Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 7 Apr 2022 14:56:38 -0700 Subject: [PATCH] Do not make metrics api call if there is no data to send --- webroot/js/metrics/playback.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webroot/js/metrics/playback.js b/webroot/js/metrics/playback.js index c08ac0f3b..99de95b77 100644 --- a/webroot/js/metrics/playback.js +++ b/webroot/js/metrics/playback.js @@ -181,6 +181,10 @@ class PlaybackMetrics { } async send() { + if (this.segmentDownloadTime.length === 0) { + return; + } + const errorCount = this.errors; var data;