fix: show 'no preview available' for files correctly

This commit is contained in:
Sean Yesmunt 2019-02-04 16:19:09 -05:00
parent 476bd1e977
commit b98301d28d

View file

@ -283,8 +283,8 @@ class MediaPlayer extends React.PureComponent {
const isLoadingFile = !fileSource && isFileType;
const isLbryPackage = /application\/x(-ext)?-lbry$/.test(contentType);
const isUnsupported =
!isLbryPackage && (!this.supportedType() && !isFileType && !isPlayableType);
(mediaType === 'application' && !isLbryPackage) ||
(!this.supportedType() && !isFileType && !isPlayableType);
// Media (audio, video)
const isUnplayable = isPlayableType && unplayable;
const isLoadingMetadata = isPlayableType && (!hasMetadata && !unplayable);