fix paid content message on lbry.tv
This commit is contained in:
parent
4e184ccff0
commit
b50ec8fab1
2 changed files with 12 additions and 4 deletions
|
@ -51,7 +51,15 @@ export default function FileViewer(props: Props) {
|
|||
const isPlayable = ['audio', 'video'].includes(mediaType) || forceVideo;
|
||||
const fileStatus = fileInfo && fileInfo.status;
|
||||
const webStreamOnly = contentType === 'application/pdf' || mediaType === 'text';
|
||||
const supported = (IS_WEB && (isStreamable || webStreamOnly || forceVideo)) || !IS_WEB;
|
||||
const supported = IS_WEB ? (!cost && isStreamable) || webStreamOnly || forceVideo : true;
|
||||
|
||||
function getMessage() {
|
||||
if (IS_WEB && cost) {
|
||||
return __('Paid Content Not Supported on lbry.tv');
|
||||
}
|
||||
|
||||
return __('Unsupported File');
|
||||
}
|
||||
|
||||
// Wrap this in useCallback because we need to use it to the keyboard effect
|
||||
// If we don't a new instance will be created for every render and react will think the dependencies have changed, which will add/remove the listener for every render
|
||||
|
@ -107,7 +115,7 @@ export default function FileViewer(props: Props) {
|
|||
{!supported && (
|
||||
<Yrbl
|
||||
type="happy"
|
||||
title={__('Unsupported File')}
|
||||
title={getMessage()}
|
||||
subtitle={
|
||||
<Fragment>
|
||||
<p>
|
||||
|
|
|
@ -7092,9 +7092,9 @@ lazy-val@^1.0.4:
|
|||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#3452f38415ef88ad852c0838bf7fc46b856af5f8:
|
||||
lbry-redux@lbryio/lbry-redux#e78c2a7e9fbacf39f73dd52fa0aa05f970973b98:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/3452f38415ef88ad852c0838bf7fc46b856af5f8"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/e78c2a7e9fbacf39f73dd52fa0aa05f970973b98"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
|
|
Loading…
Reference in a new issue