From b44390559ef970779a9c92c9d18f4cb96a0591b2 Mon Sep 17 00:00:00 2001 From: Sean Norwood Date: Wed, 20 Apr 2022 19:38:39 +0000 Subject: [PATCH] fix: video urls --- .../www/src/components/VideoList/VideoList.tsx | 6 +++--- .../www/src/components/VideoPlayer/VideoPlayer.tsx | 10 ++++------ tubearchivist/www/src/pages/video/[videoId].tsx | 6 ++++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tubearchivist/www/src/components/VideoList/VideoList.tsx b/tubearchivist/www/src/components/VideoList/VideoList.tsx index e31869f..7d80d9d 100644 --- a/tubearchivist/www/src/components/VideoList/VideoList.tsx +++ b/tubearchivist/www/src/components/VideoList/VideoList.tsx @@ -137,12 +137,12 @@ const VideoList = () => {
{/* {% if video.source.player.progress %} */}
void; @@ -32,11 +34,7 @@ const VideoPlayer = ({ light={false} playing // TODO: Not currently working playsinline - url={ - isHome - ? `${TA_BASE_URL}/media/${selectedVideo?.media_url}` - : `${TA_BASE_URL}/${selectedVideo?.media_url}` - } + url={`${TA_BASE_URL.client}${selectedVideo?.media_url}`} /> {showStats ? ( diff --git a/tubearchivist/www/src/pages/video/[videoId].tsx b/tubearchivist/www/src/pages/video/[videoId].tsx index 560d349..b900166 100644 --- a/tubearchivist/www/src/pages/video/[videoId].tsx +++ b/tubearchivist/www/src/pages/video/[videoId].tsx @@ -5,10 +5,12 @@ import { useRouter } from "next/router"; import { dehydrate, QueryClient, useQuery } from "react-query"; import { CustomHead } from "../../components/CustomHead"; import { Layout } from "../../components/Layout"; -import { TA_BASE_URL } from "../../lib/constants"; +import { getTAUrl } from "../../lib/constants"; import { getVideo } from "../../lib/getVideos"; import VideoPlayer from "../../components/VideoPlayer/VideoPlayer"; +const TA_BASE_URL = getTAUrl(); + export const getServerSideProps: GetServerSideProps = async (context) => { const queryClient = new QueryClient(); const session = await getSession(context); @@ -66,7 +68,7 @@ const Video: NextPage = () => {