+ {__('%channel% has disabled chat for this stream. Enjoy!', {
+ channel: channelName || __('This channel'),
+ })}
+
+ )}
+
{!isLive && (
{__("%channel% isn't live right now, but the chat is! Check back later to watch the stream.", {
diff --git a/ui/component/page/view.jsx b/ui/component/page/view.jsx
index 6b472a3ec..99ff67299 100644
--- a/ui/component/page/view.jsx
+++ b/ui/component/page/view.jsx
@@ -29,6 +29,7 @@ type Props = {
videoTheaterMode: boolean,
isMarkdown?: boolean,
livestream?: boolean,
+ chatDisabled: boolean,
rightSide?: Node,
backout: {
backLabel?: string,
@@ -53,6 +54,7 @@ function Page(props: Props) {
isMarkdown = false,
livestream,
rightSide,
+ chatDisabled,
} = props;
const {
@@ -112,7 +114,7 @@ function Page(props: Props) {
'main--file-page': filePage,
'main--markdown': isMarkdown,
'main--theater-mode': isOnFilePage && videoTheaterMode && !livestream,
- 'main--livestream': livestream,
+ 'main--livestream': livestream && !chatDisabled,
})}
>
{children}
diff --git a/ui/page/livestream/index.js b/ui/page/livestream/index.js
index 0b581df73..70e68f483 100644
--- a/ui/page/livestream/index.js
+++ b/ui/page/livestream/index.js
@@ -1,15 +1,17 @@
import { connect } from 'react-redux';
-import { doResolveUri, makeSelectClaimForUri } from 'lbry-redux';
+import { doResolveUri, makeSelectTagInClaimOrChannelForUri, makeSelectClaimForUri } from 'lbry-redux';
import { doSetPlayingUri } from 'redux/actions/content';
import { doUserSetReferrer } from 'redux/actions/user';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import { selectHasUnclaimedRefereeReward } from 'redux/selectors/rewards';
+import { DISABLE_COMMENTS_TAG } from 'constants/tags';
import LivestreamPage from './view';
const select = (state, props) => ({
hasUnclaimedRefereeReward: selectHasUnclaimedRefereeReward(state),
isAuthenticated: selectUserVerifiedEmail(state),
channelClaim: makeSelectClaimForUri(props.uri)(state),
+ chatDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state),
});
export default connect(select, {
diff --git a/ui/page/livestream/view.jsx b/ui/page/livestream/view.jsx
index 9e2462299..3e5857295 100644
--- a/ui/page/livestream/view.jsx
+++ b/ui/page/livestream/view.jsx
@@ -14,10 +14,11 @@ type Props = {
isAuthenticated: boolean,
doUserSetReferrer: (string) => void,
channelClaim: ChannelClaim,
+ chatDisabled: boolean,
};
export default function LivestreamPage(props: Props) {
- const { uri, claim, doSetPlayingUri, isAuthenticated, doUserSetReferrer, channelClaim } = props;
+ const { uri, claim, doSetPlayingUri, isAuthenticated, doUserSetReferrer, channelClaim, chatDisabled } = props;
const [activeViewers, setActiveViewers] = React.useState(0);
const [isLive, setIsLive] = React.useState(false);
const livestreamChannelId = channelClaim && channelClaim.signing_channel && channelClaim.signing_channel.claim_id;
@@ -112,7 +113,13 @@ export default function LivestreamPage(props: Props) {
}, [doSetPlayingUri]);
return (
-
}>
+
}
+ >
);