From 20e58e7c5ae268894b396bcbd57600e1559d68d8 Mon Sep 17 00:00:00 2001 From: Mirlan Date: Fri, 19 Mar 2021 12:50:01 +0600 Subject: [PATCH] Ott 892 match profile imprs (#327) * refactor(892): split match players into 2 components (#324) * Ott 892 part 2 (#325) * fix(892): micro fix * fix(892): hls player ui impr. * fix(892): finished match player ui impr. (#326) * fix(892): rewind btw episodes (#334) * refactor(892): removed resuming from MultiSourcePlayer (#335) --- public/images/player-backward.svg | 3 + public/images/player-forward.svg | 3 + .../FinishedMatch/helpers.tsx} | 9 +- .../components/FinishedMatch/hooks/index.tsx | 91 ++++++++++++ .../FinishedMatch}/hooks/useChapters.tsx | 17 +-- .../FinishedMatch}/hooks/useEpisodes.tsx | 0 .../components/FinishedMatch/index.tsx | 72 ++++++++++ .../components/FinishedMatch/styled.tsx | 27 ++++ .../components/LiveMatch/hooks/index.tsx | 30 ++++ .../MatchPage/components/LiveMatch/index.tsx | 32 +++++ src/features/MatchPage/hooks/useMatchPage.tsx | 115 --------------- src/features/MatchPage/index.tsx | 93 ++---------- src/features/MatchPage/styled.tsx | 34 ++--- .../store/hooks/usePopupNavigation.tsx | 10 +- src/features/MatchSidePlaylists/styled.tsx | 5 + .../components/ProgressBar/hooks.tsx | 7 +- .../components/ProgressBar/stories.tsx | 7 + .../components/Settings/index.tsx | 7 +- .../components/Settings/styled.tsx | 9 ++ src/features/MultiSourcePlayer/config.tsx | 3 + .../MultiSourcePlayer/hooks/index.tsx | 92 +++++++----- .../hooks/usePlayingHandlers.tsx | 45 ++++-- src/features/MultiSourcePlayer/index.tsx | 123 +++++++++++----- src/features/MultiSourcePlayer/styled.tsx | 32 +++++ src/features/MultiSourcePlayer/types.tsx | 1 + .../components/ProgressBar/styled.tsx | 4 +- .../components/TimeTooltip/styled.tsx | 2 +- src/features/StreamPlayer/hooks/index.tsx | 10 ++ src/features/StreamPlayer/index.tsx | 72 +++++++--- src/features/StreamPlayer/styled.tsx | 136 +++++++++++++----- src/requests/getMatchInfo.tsx | 1 + 31 files changed, 713 insertions(+), 379 deletions(-) create mode 100644 public/images/player-backward.svg create mode 100644 public/images/player-forward.svg rename src/features/MatchPage/{helpers/buildChapters.tsx => components/FinishedMatch/helpers.tsx} (92%) create mode 100644 src/features/MatchPage/components/FinishedMatch/hooks/index.tsx rename src/features/MatchPage/{ => components/FinishedMatch}/hooks/useChapters.tsx (70%) rename src/features/MatchPage/{ => components/FinishedMatch}/hooks/useEpisodes.tsx (100%) create mode 100644 src/features/MatchPage/components/FinishedMatch/index.tsx create mode 100644 src/features/MatchPage/components/FinishedMatch/styled.tsx create mode 100644 src/features/MatchPage/components/LiveMatch/hooks/index.tsx create mode 100644 src/features/MatchPage/components/LiveMatch/index.tsx delete mode 100644 src/features/MatchPage/hooks/useMatchPage.tsx create mode 100644 src/features/MultiSourcePlayer/config.tsx create mode 100644 src/features/MultiSourcePlayer/styled.tsx diff --git a/public/images/player-backward.svg b/public/images/player-backward.svg new file mode 100644 index 00000000..43317365 --- /dev/null +++ b/public/images/player-backward.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/player-forward.svg b/public/images/player-forward.svg new file mode 100644 index 00000000..0c6b9b1d --- /dev/null +++ b/public/images/player-forward.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/features/MatchPage/helpers/buildChapters.tsx b/src/features/MatchPage/components/FinishedMatch/helpers.tsx similarity index 92% rename from src/features/MatchPage/helpers/buildChapters.tsx rename to src/features/MatchPage/components/FinishedMatch/helpers.tsx index c74bcfac..9639a342 100644 --- a/src/features/MatchPage/helpers/buildChapters.tsx +++ b/src/features/MatchPage/components/FinishedMatch/helpers.tsx @@ -16,8 +16,8 @@ import type { import type { Chapters, Urls } from 'features/MultiSourcePlayer/types' -import type { PlaylistOption } from '../types' -import { FULL_GAME_KEY } from './buildPlaylists' +import type { PlaylistOption } from '../../types' +import { FULL_GAME_KEY } from '../../helpers/buildPlaylists' const getUniquePeriods = (videos: Videos) => uniq(map(videos, ({ period }) => period)) @@ -64,9 +64,11 @@ const getFullMatchChapters = (videos: Array