From f15a53749acbfdc66bd994ac7b10eddef4b598dd Mon Sep 17 00:00:00 2001 From: Emzawadzki Date: Tue, 21 May 2024 12:35:21 +0200 Subject: [PATCH] fix: enable progress bar redraw on seek to start position --- src/js/view/components/controls/progressBar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/view/components/controls/progressBar.js b/src/js/view/components/controls/progressBar.js index 13f36009..c884acd2 100644 --- a/src/js/view/components/controls/progressBar.js +++ b/src/js/view/components/controls/progressBar.js @@ -282,7 +282,7 @@ const ProgressBar = function ($container, api, isAd, metadata) { if (isAd) { api.on(AD_TIME, function (data) { - if (data && data.duration && data.position) { + if (data && data.duration && typeof data.position === "number") { positionElements(data.position / data.duration); adDuration = data.duration; } @@ -290,7 +290,7 @@ const ProgressBar = function ($container, api, isAd, metadata) { } else { api.on(CONTENT_TIME, function (data) { - if (data && data.duration && data.position) { + if (data && data.duration && typeof data.position === "number") { durationForCalc = data.duration; let percentage = data.position / data.duration;