feat: change interface of analysis video log

This commit is contained in:
2026-07-02 13:57:18 +05:30
parent 2eb58856af
commit 53fe4e11fe
7 changed files with 126 additions and 53 deletions

13
src/utils/media.ts Normal file
View File

@@ -0,0 +1,13 @@
import { ENV_CONSTANT } from '@/constants/secrect.constant';
export function resolveMediaUrl(url?: string | null) {
if (!url?.trim()) return null;
const value = url.trim();
if (/^https?:\/\//i.test(value)) return value;
const baseUrl = ENV_CONSTANT.BASE_API_URL?.replace(/\/$/, '');
const path = value.startsWith('/') ? value : `/${value}`;
return baseUrl ? `${baseUrl}${path}` : path;
}