mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 02:42:45 +00:00
feat: add media player in content view
This commit is contained in:
@@ -1488,6 +1488,17 @@ angular
|
||||
"heif",
|
||||
"heic",
|
||||
];
|
||||
const mediaFiles = [
|
||||
"wav",
|
||||
"mp3",
|
||||
"ogg",
|
||||
"mp4",
|
||||
"avi",
|
||||
"webm",
|
||||
"mov",
|
||||
"mpg",
|
||||
"wma",
|
||||
];
|
||||
|
||||
$scope.$on("$routeUpdate", function (event, current) {
|
||||
if (($routeParams.path || "") == $scope.filePath) {
|
||||
@@ -1601,6 +1612,9 @@ angular
|
||||
if (imageFiles.indexOf(extension) > -1) {
|
||||
return "image";
|
||||
}
|
||||
if (mediaFiles.indexOf(extension) > -1) {
|
||||
return "media";
|
||||
}
|
||||
return "code";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user