serve video files using the HTML5 video tag (#418)

* serve video files using the HTML5 video tag

* lint fix: add comment to IsVideoFile
This commit is contained in:
Nico Mandery 2016-12-20 09:09:11 +01:00 committed by Lunny Xiao
parent 8559d6f267
commit 6ade13e86e
4 changed files with 12 additions and 0 deletions

View file

@ -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
}