1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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

@@ -43,6 +43,10 @@
<div class="view-raw ui center">
{{if .IsImageFile}}
<img src="{{EscapePound $.RawFileLink}}">
{{else if .IsVideoFile}}
<video controls src="{{EscapePound $.RawFileLink}}">
<strong>{{.i18n.Tr "repo.video_not_supported_in_browser"}}</strong>
</video>
{{else if .IsPDFFile}}
<iframe width="100%" height="600px" src="{{AppSubUrl}}/plugins/pdfjs-1.4.20/web/viewer.html?file={{EscapePound $.RawFileLink}}"></iframe>
{{else}}