From bb5a4fc4777c075a5939e8520274472bd16baa84 Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Tue, 1 Nov 2022 14:27:07 +0300 Subject: [PATCH] fix(#155): change priority for switch player --- src/features/MatchPage/index.tsx | 5 +++-- src/requests/getMatchInfo.tsx | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/features/MatchPage/index.tsx b/src/features/MatchPage/index.tsx index a0f4fb64..0fd2afe1 100644 --- a/src/features/MatchPage/index.tsx +++ b/src/features/MatchPage/index.tsx @@ -58,8 +58,9 @@ const MatchPageComponent = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [profile, profileType]) - const playFromScout = profile?.has_video && !profile?.live - const playFromOTT = !profile?.has_video && (profile?.live || profile?.storage) + const playFromScout = profile?.has_video && !profile?.live && !profile.has_hls + const playFromOTT = (!profile?.has_video && (profile?.live || profile?.storage)) + || profile?.has_hls // TODO Добавить попап 'Данный матч ещё не начался' if (!isStarted && profile?.live === false) { const sportName = history.location.pathname.split('/')[1] diff --git a/src/requests/getMatchInfo.tsx b/src/requests/getMatchInfo.tsx index a1529d0c..30e8df28 100644 --- a/src/requests/getMatchInfo.tsx +++ b/src/requests/getMatchInfo.tsx @@ -33,6 +33,7 @@ export type MatchInfo = { country: TournamentType, country_id: number, date: string, + has_hls?: boolean, has_video: boolean, live: boolean, playbackUrl?: string,