1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

Merge pull request #1553 from haiwen/video

video thumbnail
This commit is contained in:
xiez
2017-04-24 16:26:23 +08:00
committed by GitHub
8 changed files with 131 additions and 53 deletions

View File

@@ -735,6 +735,22 @@ define([
}
},
// check if a file is a video
videoCheck: function (filename) {
// no file ext
if (filename.lastIndexOf('.') == -1) {
return false;
}
var file_ext = filename.substr(filename.lastIndexOf('.') + 1).toLowerCase();
var exts = ['mp4', 'ogv', 'webm', 'mov'];
if (exts.indexOf(file_ext) != -1) {
return true;
} else {
return false;
}
},
compareTwoWord: function(a_name, b_name) {
// compare a_name and b_name at lower case
// if a_name >= b_name, return 1