Merge branch 'feat/react-frontend' of github.com:insuusvenerati/tubearchivist into feat/react-frontend

This commit is contained in:
n8detar 2022-04-21 07:57:29 -07:00
commit bd04ab3a72
3 changed files with 11 additions and 11 deletions

View File

@ -137,12 +137,12 @@ const VideoList = () => {
<div className="video-thumb-wrap list">
<div className="video-thumb">
<NextImage
src={`${TA_BASE_URL.client}/cache/${video.vid_thumb_url}`}
src={`${TA_BASE_URL.client}${video.vid_thumb_url}`}
alt="video-thumb"
width={640}
height={360}
blurDataURL={video.vid_thumb_base64}
placeholder="blur"
// blurDataURL={video.vid_thumb_base64}
// placeholder="blur"
/>
{/* {% if video.source.player.progress %} */}
<div

View File

@ -2,10 +2,12 @@ import NextImage from "next/image";
import NextLink from "next/link";
import ReactPlayer from "react-player";
import IconClose from "../../images/icon-close.svg";
import { TA_BASE_URL } from "../../lib/constants";
import { getTAUrl } from "../../lib/constants";
import { formatNumbers } from "../../lib/utils";
import { Data } from "../../types/video";
const TA_BASE_URL = getTAUrl();
type VideoPlayerProps = {
selectedVideo: Data;
handleRemoveVideoPlayer?: () => 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}`}
/>
<SponsorBlock />
{showStats ? (

View File

@ -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 = () => {
<div className="round-img">
<a href="{% url 'channel_id' video.channel.channel_id %}">
<NextImage
src={`${TA_BASE_URL}/cache/channels/${data.data.channel.channel_id}_thumb.jpg`}
src={`${TA_BASE_URL.client}/cache/channels/${data.data.channel.channel_id}_thumb.jpg`}
alt="channel-thumb"
width={90}
height={90}