From 902651afeac7ded7684e77ae468baf861e7aa0fc Mon Sep 17 00:00:00 2001 From: Nicolas ANGOT Date: Thu, 12 Sep 2019 00:06:14 +0200 Subject: [PATCH] fragmentDuration can be NaN for other type than fragmentedText (#3069) --- src/streaming/controllers/ScheduleController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/streaming/controllers/ScheduleController.js b/src/streaming/controllers/ScheduleController.js index 53c1e9b2b7..5d0dd86915 100644 --- a/src/streaming/controllers/ScheduleController.js +++ b/src/streaming/controllers/ScheduleController.js @@ -260,7 +260,7 @@ function ScheduleController(config) { if (isNaN(currentRepresentationInfo.fragmentDuration)) { //fragmentDuration of representationInfo is not defined, // call metrics function to have data in the latest scheduling info... // if no metric, returns 0. In this case, rule will return false. - const bufferInfo = dashMetrics.getLatestBufferInfoVO(Constants.FRAGMENTED_TEXT, true, MetricsConstants.SCHEDULING_INFO); + const bufferInfo = dashMetrics.getLatestBufferInfoVO(currentRepresentationInfo.mediaInfo.type, true, MetricsConstants.SCHEDULING_INFO); safeBufferLevel = bufferInfo ? bufferInfo.duration * 1.5 : 1.5; } const request = fragmentModel.getRequests({