diff --git a/src/features/MatchPage/components/LiveMatch/hooks/index.tsx b/src/features/MatchPage/components/LiveMatch/hooks/index.tsx index 05cb804b..245f0b39 100644 --- a/src/features/MatchPage/components/LiveMatch/hooks/index.tsx +++ b/src/features/MatchPage/components/LiveMatch/hooks/index.tsx @@ -35,7 +35,10 @@ export const useLiveMatch = (profile: MatchInfo) => { onPlaylistSelect: handlePlaylistClick, resume: resume ?? fromStartIfStreamPaused, selectedPlaylist, - streamUrl: `${API_ROOT}/video/stream/${sportType}/${matchId}.m3u8`, + streamUrl: ( + profile?.playbackUrl + || `${API_ROOT}/video/stream/${sportType}/${matchId}.m3u8` + ), ...usePlayerProgressReporter(), ...useLastPlayPosition(), } diff --git a/src/requests/getMatchInfo.tsx b/src/requests/getMatchInfo.tsx index dcaa45ac..545cd9c2 100644 --- a/src/requests/getMatchInfo.tsx +++ b/src/requests/getMatchInfo.tsx @@ -22,6 +22,7 @@ export type MatchInfo = { date: string, has_video: boolean, live: boolean, + playbackUrl?: string, storage: boolean, sub: boolean, team1: Team, @@ -33,8 +34,7 @@ export type MatchInfo = { }, } | null -export const getMatchInfo = (sportId: number, matchId: number) -: Promise => { +export const getMatchInfo = (sportId: number, matchId: number): Promise => { const config = { body: { params: {