Initial frontend import
This commit is contained in:
6
src/video.ts
Normal file
6
src/video.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/** Path looks like a video file (upload or URL path). */
|
||||
export function isLikelyVideoPath(path: string | undefined | null): boolean {
|
||||
if (!path) return false;
|
||||
const p = path.split("?")[0].toLowerCase();
|
||||
return /\.(mp4|webm|mov|m4v|mkv|ogv|avi)(\/)?$/i.test(p);
|
||||
}
|
||||
Reference in New Issue
Block a user