feat: add audio displaying
This commit is contained in:
parent
9262f436b6
commit
ae81ead712
@ -17,6 +17,8 @@ var extensions = map[string]string{
|
|||||||
|
|
||||||
".png": "image", ".jpg": "image", ".jpeg": "image", ".webp": "image",
|
".png": "image", ".jpg": "image", ".jpeg": "image", ".webp": "image",
|
||||||
|
|
||||||
|
".mp3": "audio", ".aac": "audio", ".wav": "audio", ".flac": "audio", ".ogg": "audio",
|
||||||
|
|
||||||
".sh": "text", ".bash": "text", ".zsh": "text",
|
".sh": "text", ".bash": "text", ".zsh": "text",
|
||||||
".bat": "text", ".cmd": "text", ".ps1": "text",
|
".bat": "text", ".cmd": "text", ".ps1": "text",
|
||||||
".ini": "text", ".cfg": "text", ".conf": "text",
|
".ini": "text", ".cfg": "text", ".conf": "text",
|
||||||
|
@ -213,6 +213,8 @@
|
|||||||
<source src="{{.Name}}" type="video/mp4" />
|
<source src="{{.Name}}" type="video/mp4" />
|
||||||
Your browser does not support the video tag.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</video>
|
||||||
|
{{else if eq .Type "audio"}}
|
||||||
|
<audio controls src="{{.Name}}"><audio />
|
||||||
{{else}}
|
{{else}}
|
||||||
<p>
|
<p>
|
||||||
Couldn't detect file from extension, visit
|
Couldn't detect file from extension, visit
|
||||||
|
Loading…
Reference in New Issue
Block a user