mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-25 12:15:54 +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:
parent
8559d6f267
commit
6ade13e86e
4 changed files with 12 additions and 0 deletions
|
@ -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}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue