fall back on contentType for extension on file view
This commit is contained in:
parent
ce692d38ea
commit
7157ddc7cf
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ const Lbry = {
|
||||||
|
|
||||||
// Returns a human readable media type based on the content type or extension of a file that is returned by the sdk
|
// Returns a human readable media type based on the content type or extension of a file that is returned by the sdk
|
||||||
getMediaType: (contentType: ?string, fileName: ?string) => {
|
getMediaType: (contentType: ?string, fileName: ?string) => {
|
||||||
if (fileName) {
|
if (fileName && fileName.split('.').length > 1) {
|
||||||
const formats = [
|
const formats = [
|
||||||
[/\.(mp4|m4v|webm|flv|f4v|ogv)$/i, 'video'],
|
[/\.(mp4|m4v|webm|flv|f4v|ogv)$/i, 'video'],
|
||||||
[/\.(mp3|m4a|aac|wav|flac|ogg|opus)$/i, 'audio'],
|
[/\.(mp3|m4a|aac|wav|flac|ogg|opus)$/i, 'audio'],
|
||||||
|
|
Loading…
Reference in a new issue