From b214ac7012ef42593bee62c207888a2593bc5a38 Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 19 Sep 2022 18:05:17 +0400 Subject: [PATCH] fix(#2845): play video with has_video=false --- src/features/MatchPage/components/LiveMatch/helpers.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/features/MatchPage/components/LiveMatch/helpers.tsx b/src/features/MatchPage/components/LiveMatch/helpers.tsx index d5492b1f..7b4aefc8 100644 --- a/src/features/MatchPage/components/LiveMatch/helpers.tsx +++ b/src/features/MatchPage/components/LiveMatch/helpers.tsx @@ -23,7 +23,9 @@ const getFullMatchChapters = ( playlist: MatchPlaylistOption, ) => { const bound = find(profile?.video_bounds, { h: FULL_MATCH_BOUNDARY }) - const durationMs = (playlist.duration ?? 0) * 1000 + const durationMs = profile?.has_video + ? (playlist.duration ?? 0) * 1000 + : (Number(bound?.e) - Number(bound?.s)) * 1000 return [ { duration: durationMs,