Support more file extensions #266
1 changed files with 3 additions and 3 deletions
|
@ -319,11 +319,11 @@ lbry.getMediaType = function(contentType, fileName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var ext = fileName.substr(dotIndex + 1);
|
var ext = fileName.substr(dotIndex + 1);
|
||||||
if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) {
|
if (/^mp4|m4v|mov|webm|flv|f4v|ogv$/i.test(ext)) {
|
||||||
return "video";
|
return "video";
|
||||||
} else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) {
|
} else if (/^mp3|m4a|aac|wav|flac|ogg|opus$/i.test(ext)) {
|
||||||
return "audio";
|
return "audio";
|
||||||
} else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) {
|
} else if (/^html|htm|xml|pdf|odf|doc|docx|md|markdown|txt|org$/i.test(ext)) {
|
||||||
return "document";
|
return "document";
|
||||||
} else {
|
} else {
|
||||||
return "unknown";
|
return "unknown";
|
||||||
|
|
Loading…
Add table
Reference in a new issue