Video player supports mov,m4v

This commit is contained in:
Aicirou 2020-07-10 00:36:30 +08:00
parent a2d503b284
commit 40a141aaaf

View File

@ -13,7 +13,7 @@ const text_exts = [
"sh", "sh",
"md", "md",
]; ];
const video_exts = ["mp4", "webm", "mkv", "m3u8", "flv"]; const video_exts = ["mp4", "webm", "mkv", "m3u8", "flv", "mov", "m4v"];
const image_exts = ["bmp", "jpg", "jpeg", "png", "gif"]; const image_exts = ["bmp", "jpg", "jpeg", "png", "gif"];
const pdf_exts = ["pdf"]; const pdf_exts = ["pdf"];
@ -76,7 +76,7 @@ export const checkExtends = (path) => {
.split(".") .split(".")
.pop() .pop()
.toLowerCase(); .toLowerCase();
let exts = text_exts.concat(...video_exts,...image_exts,...pdf_exts); let exts = text_exts.concat(...video_exts, ...image_exts, ...pdf_exts);
return exts.indexOf(`${ext}`) != -1; return exts.indexOf(`${ext}`) != -1;
}; };