From 21be2f2c91c4ce6131f7ad326bb4fd34b87f4887 Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 11 Apr 2022 15:03:48 +0700 Subject: [PATCH] fix(#1701): change button live for buffering --- src/features/MatchPage/store/hooks/useEvents.tsx | 1 - src/features/StreamPlayer/hooks/index.tsx | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/MatchPage/store/hooks/useEvents.tsx b/src/features/MatchPage/store/hooks/useEvents.tsx index 88be9b67..14f7095c 100644 --- a/src/features/MatchPage/store/hooks/useEvents.tsx +++ b/src/features/MatchPage/store/hooks/useEvents.tsx @@ -18,7 +18,6 @@ export const useEvents = () => { sportType, }).then(fetchLexics) .then(setEvents) - .catch(() => setEvents([])) }, [ fetchLexics, matchId, diff --git a/src/features/StreamPlayer/hooks/index.tsx b/src/features/StreamPlayer/hooks/index.tsx index d89fdd88..975453a5 100644 --- a/src/features/StreamPlayer/hooks/index.tsx +++ b/src/features/StreamPlayer/hooks/index.tsx @@ -198,7 +198,8 @@ export const useVideoPlayer = ({ } const backToLive = useCallback(() => { - const liveProgressMs = Math.max(duration - 10000, 0) + const liveProgressMs = Math.max(duration - 30000, 0) + setPlayerState({ playedProgress: liveProgressMs, seek: liveProgressMs / 1000 }) }, [duration, setPlayerState])