From e83c4032a9c55209476f02fd287caebe38fe5698 Mon Sep 17 00:00:00 2001 From: Ruslan Khayrullin Date: Fri, 14 Apr 2023 17:05:07 +0500 Subject: [PATCH] feat(in-428): episodes playback changes --- .gitignore | 3 + Makefile | 4 + package.json | 2 +- .../components/FinishedMatch/helpers.tsx | 1 + .../components/LiveMatch/helpers.tsx | 1 + src/features/MatchPage/store/hooks/index.tsx | 47 +++++++++++- .../MatchPage/store/hooks/useMatchData.tsx | 13 +++- .../store/hooks/useMatchPlaylists.tsx | 13 +++- .../MatchPage/store/hooks/usePlayersStats.tsx | 4 +- .../store/hooks/useSelectedPlaylist.tsx | 15 +++- src/features/MatchPage/types.tsx | 2 + .../components/CircleAnimationBar/index.tsx | 7 +- .../components/EventsList/index.tsx | 16 ++++ .../components/PlayersTable/hooks/index.tsx | 1 + .../PlayersTable/hooks/useTable.tsx | 38 ++++++---- .../components/PlayersTable/index.tsx | 4 +- .../components/TeamsStatsTable/Cell.tsx | 31 +++++--- .../MultiSourcePlayer/hooks/index.tsx | 66 ++++++++++++++++- src/features/MultiSourcePlayer/index.tsx | 33 +++++++++ src/features/MultiSourcePlayer/types.tsx | 1 + .../PopupComponents/CloseButton/index.tsx | 3 + .../components/Chapters/styled.tsx | 6 -- .../components/ProgressBar/styled.tsx | 7 +- src/features/StreamPlayer/hooks/index.tsx | 65 ++++++++++++++++- src/features/StreamPlayer/index.tsx | 37 +++++++++- src/features/StreamPlayer/styled.tsx | 73 ++++++++++++++++++- src/features/StreamPlayer/types.tsx | 4 + src/requests/getMatchPlaylists.tsx | 3 + 28 files changed, 439 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index 8dd351c6..a511bb85 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ yarn.lock # IntelliJ IDEA products .idea .eslintcache + +# ssl keys +*.pem diff --git a/Makefile b/Makefile index 04944847..e663d6c5 100644 --- a/Makefile +++ b/Makefile @@ -201,3 +201,7 @@ test: npm test .PHONY: test + +generate-ssl-keys: + openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 + \ No newline at end of file diff --git a/package.json b/package.json index 6804ff7f..106c62f6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "start": "react-scripts start", - "start-https": "export HTTPS=true&&SSL_CRT_FILE=cert.pem&&SSL_KEY_FILE=key.pem react-scripts start", + "start-https": "export PORT=443 HTTPS=true&&SSL_CRT_FILE=cert.pem&&SSL_KEY_FILE=key.pem react-scripts start", "build": "GENERATE_SOURCEMAP=false react-scripts build && gzipper --verbose ./build", "test": "react-scripts test --testMatch '**/__tests__/*' --passWithNoTests --watchAll=false", "test:watch": "react-scripts test --testMatch '**/__tests__/*'", diff --git a/src/features/MatchPage/components/FinishedMatch/helpers.tsx b/src/features/MatchPage/components/FinishedMatch/helpers.tsx index 46c5663d..f99f3fb0 100644 --- a/src/features/MatchPage/components/FinishedMatch/helpers.tsx +++ b/src/features/MatchPage/components/FinishedMatch/helpers.tsx @@ -105,6 +105,7 @@ const getPlaylistChapters = (videos: Array