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 /templates/repo/view_file.tmpl | |
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 'templates/repo/view_file.tmpl')
-rw-r--r-- | templates/repo/view_file.tmpl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 68e8444768..08d77c3f37 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -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}} |