fix(frontend): missing URL prefixes
This commit is contained in:
@@ -13,6 +13,7 @@ type VideoCardProps = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fallbackThumbnail = "../../../public/default_thumbnail.png";
|
const fallbackThumbnail = "../../../public/default_thumbnail.png";
|
||||||
|
const API_URL = import.meta.env.VITE_API_URL;
|
||||||
|
|
||||||
const VideoCard = ({
|
const VideoCard = ({
|
||||||
id,
|
id,
|
||||||
@@ -45,7 +46,7 @@ const VideoCard = ({
|
|||||||
<div className={clsx("flex flex-col", className)}>
|
<div className={clsx("flex flex-col", className)}>
|
||||||
<div className={"relative inline-block"}>
|
<div className={"relative inline-block"}>
|
||||||
<img
|
<img
|
||||||
src={thumbnailAvailable ? `/api/v1/download/thumbnail/${id}` : fallbackThumbnail}
|
src={thumbnailAvailable ? API_URL + `/api/v1/download/thumbnail/${id}` : fallbackThumbnail}
|
||||||
alt="Video Thumbnail"
|
alt="Video Thumbnail"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,12 @@ import type { VideoMetadata } from "../utils/types.ts";
|
|||||||
import Box from "../components/Box.tsx";
|
import Box from "../components/Box.tsx";
|
||||||
import MetadataBox from "../components/video/MetadataBox.tsx";
|
import MetadataBox from "../components/video/MetadataBox.tsx";
|
||||||
|
|
||||||
|
const API_URL = import.meta.env.VITE_API_URL;
|
||||||
|
|
||||||
const ClipEdit = () => {
|
const ClipEdit = () => {
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
const videoRef = useRef<HTMLVideoElement | null>(null);
|
const videoRef = useRef<HTMLVideoElement | null>(null);
|
||||||
const videoUrl = `/api/v1/download/input/${id}`
|
const videoUrl = API_URL + `/api/v1/download/input/${id}`
|
||||||
const [metadata, setMetadata] = useState<VideoMetadata | null>(null);
|
const [metadata, setMetadata] = useState<VideoMetadata | null>(null);
|
||||||
const [playbackValue, setPlaybackValue] = useState(0);
|
const [playbackValue, setPlaybackValue] = useState(0);
|
||||||
const [outputMetadata, setOutputMetadata] = useState<VideoMetadata>({
|
const [outputMetadata, setOutputMetadata] = useState<VideoMetadata>({
|
||||||
@@ -65,7 +67,7 @@ const ClipEdit = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleDownload = async () => {
|
const handleDownload = async () => {
|
||||||
const response = await fetch(`/api/v1/download/output/${id}`);
|
const response = await fetch(API_URL + `/api/v1/download/output/${id}`);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
console.error('Download failed');
|
console.error('Download failed');
|
||||||
|
|||||||
Reference in New Issue
Block a user