diff options
author | Nico Mandery <nico@nmandery.net> | 2016-12-20 09:09:11 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-20 16:09:11 +0800 |
commit | 6ade13e86ee494ac10b36454285354dbfe36d9c0 (patch) | |
tree | fa17ee2f0012a9dbab659c0ebd37b347d79203b5 /routers/repo/view.go | |
parent | 8559d6f267324241496b8611bc8e6f76efe869b7 (diff) | |
download | gitea-6ade13e86ee494ac10b36454285354dbfe36d9c0.tar.gz gitea-6ade13e86ee494ac10b36454285354dbfe36d9c0.zip |
serve video files using the HTML5 video tag (#418)
* serve video files using the HTML5 video tag
* lint fix: add comment to IsVideoFile
Diffstat (limited to 'routers/repo/view.go')
-rw-r--r-- | routers/repo/view.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go index 4417383bdc..7e7ad0b923 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -198,6 +198,8 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st case base.IsPDFFile(buf): ctx.Data["IsPDFFile"] = true + case base.IsVideoFile(buf): + ctx.Data["IsVideoFile"] = true case base.IsImageFile(buf): ctx.Data["IsImageFile"] = true } |