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:
@@ -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}}
|
||||
|
Reference in New Issue
Block a user