mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 03:40:14 +00:00
fix: video urls
This commit is contained in:
parent
374229d61d
commit
b44390559e
@ -137,12 +137,12 @@ const VideoList = () => {
|
|||||||
<div className="video-thumb-wrap list">
|
<div className="video-thumb-wrap list">
|
||||||
<div className="video-thumb">
|
<div className="video-thumb">
|
||||||
<NextImage
|
<NextImage
|
||||||
src={`${TA_BASE_URL.client}/cache/${video.vid_thumb_url}`}
|
src={`${TA_BASE_URL.client}${video.vid_thumb_url}`}
|
||||||
alt="video-thumb"
|
alt="video-thumb"
|
||||||
width={640}
|
width={640}
|
||||||
height={360}
|
height={360}
|
||||||
blurDataURL={video.vid_thumb_base64}
|
// blurDataURL={video.vid_thumb_base64}
|
||||||
placeholder="blur"
|
// placeholder="blur"
|
||||||
/>
|
/>
|
||||||
{/* {% if video.source.player.progress %} */}
|
{/* {% if video.source.player.progress %} */}
|
||||||
<div
|
<div
|
||||||
|
@ -2,10 +2,12 @@ import NextImage from "next/image";
|
|||||||
import NextLink from "next/link";
|
import NextLink from "next/link";
|
||||||
import ReactPlayer from "react-player";
|
import ReactPlayer from "react-player";
|
||||||
import IconClose from "../../images/icon-close.svg";
|
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 { formatNumbers } from "../../lib/utils";
|
||||||
import { Data } from "../../types/video";
|
import { Data } from "../../types/video";
|
||||||
|
|
||||||
|
const TA_BASE_URL = getTAUrl();
|
||||||
|
|
||||||
type VideoPlayerProps = {
|
type VideoPlayerProps = {
|
||||||
selectedVideo: Data;
|
selectedVideo: Data;
|
||||||
handleRemoveVideoPlayer?: () => void;
|
handleRemoveVideoPlayer?: () => void;
|
||||||
@ -32,11 +34,7 @@ const VideoPlayer = ({
|
|||||||
light={false}
|
light={false}
|
||||||
playing // TODO: Not currently working
|
playing // TODO: Not currently working
|
||||||
playsinline
|
playsinline
|
||||||
url={
|
url={`${TA_BASE_URL.client}${selectedVideo?.media_url}`}
|
||||||
isHome
|
|
||||||
? `${TA_BASE_URL}/media/${selectedVideo?.media_url}`
|
|
||||||
: `${TA_BASE_URL}/${selectedVideo?.media_url}`
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SponsorBlock />
|
<SponsorBlock />
|
||||||
{showStats ? (
|
{showStats ? (
|
||||||
|
@ -5,10 +5,12 @@ import { useRouter } from "next/router";
|
|||||||
import { dehydrate, QueryClient, useQuery } from "react-query";
|
import { dehydrate, QueryClient, useQuery } from "react-query";
|
||||||
import { CustomHead } from "../../components/CustomHead";
|
import { CustomHead } from "../../components/CustomHead";
|
||||||
import { Layout } from "../../components/Layout";
|
import { Layout } from "../../components/Layout";
|
||||||
import { TA_BASE_URL } from "../../lib/constants";
|
import { getTAUrl } from "../../lib/constants";
|
||||||
import { getVideo } from "../../lib/getVideos";
|
import { getVideo } from "../../lib/getVideos";
|
||||||
import VideoPlayer from "../../components/VideoPlayer/VideoPlayer";
|
import VideoPlayer from "../../components/VideoPlayer/VideoPlayer";
|
||||||
|
|
||||||
|
const TA_BASE_URL = getTAUrl();
|
||||||
|
|
||||||
export const getServerSideProps: GetServerSideProps = async (context) => {
|
export const getServerSideProps: GetServerSideProps = async (context) => {
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient();
|
||||||
const session = await getSession(context);
|
const session = await getSession(context);
|
||||||
@ -66,7 +68,7 @@ const Video: NextPage = () => {
|
|||||||
<div className="round-img">
|
<div className="round-img">
|
||||||
<a href="{% url 'channel_id' video.channel.channel_id %}">
|
<a href="{% url 'channel_id' video.channel.channel_id %}">
|
||||||
<NextImage
|
<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"
|
alt="channel-thumb"
|
||||||
width={90}
|
width={90}
|
||||||
height={90}
|
height={90}
|
||||||
|
Loading…
Reference in New Issue
Block a user