From 037583be23047b2cc0792e4a04370338d1d9ea76 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 30 Mar 2022 14:02:49 -0700 Subject: [PATCH] Add custom suggestion error to disable video passthrough --- metrics/healthOverview.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/metrics/healthOverview.go b/metrics/healthOverview.go index d8d437708..615eb3ca8 100644 --- a/metrics/healthOverview.go +++ b/metrics/healthOverview.go @@ -153,10 +153,22 @@ func errorCountHealthOverview() *models.StreamHealthOverview { } healthyPercentage := 100 - utils.IntPercentage(clientsWithErrors, totalNumberOfClients) + message := fmt.Sprintf("%d of %d clients (%d%%) are experiencing different, unspecified, playback issues.", clientsWithErrors, totalNumberOfClients, healthyPercentage) + isUsingPassthrough := false + outputVariants := data.GetStreamOutputVariants() + for _, variant := range outputVariants { + if variant.IsVideoPassthrough { + isUsingPassthrough = true + } + } + + if isUsingPassthrough { + message = fmt.Sprintf("%d of %d clients (%d%%) are experiencing errors. You're currently using a video passthrough output, often known for causing playback issues for people. It is suggested you turn it off.", clientsWithErrors, totalNumberOfClients, healthyPercentage) + } return &models.StreamHealthOverview{ Healthy: healthyPercentage > healthyPercentageValue, - Message: fmt.Sprintf("%d of %d clients (%d%%) are experiencing different, unspecified, playback issues.", clientsWithErrors, totalNumberOfClients, healthyPercentage), + Message: message, HealthyPercentage: healthyPercentage, } }