Serve audio files using HTML5 audio tag (#5221)

* Serve audio files using HTML5 audio tag

* Correct copy paste error
This commit is contained in:
Jonas Bröms authored and Lunny Xiao committed 2018-10-30 10:17:26 +08:00
1 parent 735b12eaf0
commit db30d6d791
4 files changed
+12

No files matched your search

+5
View File
@@ -576,6 +576,11 @@ func IsVideoFile(data []byte) bool {
return strings.Index(http.DetectContentType(data), "video/") != -1
}
// IsAudioFile detects if data is an video format
func IsAudioFile(data []byte) bool {
return strings.Index(http.DetectContentType(data), "audio/") != -1
}
// EntryIcon returns the octicon class for displaying files/directories
func EntryIcon(entry *git.TreeEntry) string {
switch {