livestream for all
This commit is contained in:
parent
1a2fefa6ec
commit
db687204a4
8 changed files with 15 additions and 70 deletions
|
@ -90,7 +90,6 @@ ENABLE_CREATOR_REACTIONS=true
|
||||||
ENABLE_NO_SOURCE_CLAIMS=true
|
ENABLE_NO_SOURCE_CLAIMS=true
|
||||||
ENABLE_PREROLL_ADS=true
|
ENABLE_PREROLL_ADS=true
|
||||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
|
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
|
||||||
CHANNEL_STAKED_LEVEL_LIVESTREAM=5
|
|
||||||
CHANNEL_CREATION_LIMIT=5
|
CHANNEL_CREATION_LIMIT=5
|
||||||
WEB_PUBLISH_SIZE_LIMIT_GB=4
|
WEB_PUBLISH_SIZE_LIMIT_GB=4
|
||||||
LIGHTHOUSE_DEFAULT_TYPES=audio,video
|
LIGHTHOUSE_DEFAULT_TYPES=audio,video
|
||||||
|
|
|
@ -2178,7 +2178,7 @@
|
||||||
"Expand to learn more about how Odysee Premium works": "Expand to learn more about how Odysee Premium works",
|
"Expand to learn more about how Odysee Premium works": "Expand to learn more about how Odysee Premium works",
|
||||||
"Get More Information": "Get More Information",
|
"Get More Information": "Get More Information",
|
||||||
"First of all, thank you for considering or purchasing a membership, it means a ton to us! A few important details to know:": "First of all, thank you for considering or purchasing a membership, it means a ton to us! A few important details to know:",
|
"First of all, thank you for considering or purchasing a membership, it means a ton to us! A few important details to know:": "First of all, thank you for considering or purchasing a membership, it means a ton to us! A few important details to know:",
|
||||||
"Exclusive and early access features include: recommended content on homepage, livestreaming, and the ability to post Odysee hyperlinks + images in comments. Account is also automatically eligible for Rewards. More to come later.": "Exclusive and early access features include: recommended content on homepage, livestreaming, and the ability to post Odysee hyperlinks + images in comments. Account is also automatically eligible for Rewards. More to come later.",
|
"Exclusive and early access features include: recommended content, homepage customization, and the ability to post Odysee hyperlinks + images in comments. Account is also automatically eligible for Rewards. More to come later.": "Exclusive and early access features include: recommended content, homepage customization, and the ability to post Odysee hyperlinks + images in comments. Account is also automatically eligible for Rewards. More to come later.",
|
||||||
"The yearly Premium+ membership has a discount compared to monthly, and Premium is only available yearly.": "The yearly Premium+ membership has a discount compared to monthly, and Premium is only available yearly.",
|
"The yearly Premium+ membership has a discount compared to monthly, and Premium is only available yearly.": "The yearly Premium+ membership has a discount compared to monthly, and Premium is only available yearly.",
|
||||||
"These are limited time rates, so get in early!": "These are limited time rates, so get in early!",
|
"These are limited time rates, so get in early!": "These are limited time rates, so get in early!",
|
||||||
"There may be higher tiers available in the future for creators and anyone else who wants to support us.": "There may be higher tiers available in the future for creators and anyone else who wants to support us.",
|
"There may be higher tiers available in the future for creators and anyone else who wants to support us.": "There may be higher tiers available in the future for creators and anyone else who wants to support us.",
|
||||||
|
@ -2195,8 +2195,8 @@
|
||||||
"early access": "early access",
|
"early access": "early access",
|
||||||
"site-wide badge": "site-wide badge",
|
"site-wide badge": "site-wide badge",
|
||||||
"Available Memberships": "Available Memberships",
|
"Available Memberships": "Available Memberships",
|
||||||
"Badge on profile, livestreaming, automatic rewards confirmation, and early access to new features": "Badge on profile, livestreaming, automatic rewards confirmation, and early access to new features",
|
"Badge on profile, automatic rewards confirmation, and early access to new features": "Badge on profile, automatic rewards confirmation, and early access to new features",
|
||||||
"Badge on profile, livestreaming, automatic rewards confirmation, early access to new features, and no ads": "Badge on profile, livestreaming, automatic rewards confirmation, early access to new features, and no ads",
|
"Badge on profile, automatic rewards confirmation, early access to new features, and no ads": "Badge on profile, automatic rewards confirmation, early access to new features, and no ads",
|
||||||
"Join via %interval% membership": "Join via %interval% membership",
|
"Join via %interval% membership": "Join via %interval% membership",
|
||||||
"Interval": "Interval",
|
"Interval": "Interval",
|
||||||
"Your Active Memberships": "Your Active Memberships",
|
"Your Active Memberships": "Your Active Memberships",
|
||||||
|
|
|
@ -50,12 +50,6 @@ export default function MembershipSplash(props: Props) {
|
||||||
{__('No ads')}
|
{__('No ads')}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
const livestreamInfo = (
|
|
||||||
<div className="membership-splash__info-content">
|
|
||||||
<Icon icon={ICONS.LIVESTREAM_MEMBERSHIP} />
|
|
||||||
{__('Livestreaming')}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="membership-splash">
|
<div className="membership-splash">
|
||||||
|
@ -102,8 +96,6 @@ export default function MembershipSplash(props: Props) {
|
||||||
|
|
||||||
{badgeInfo}
|
{badgeInfo}
|
||||||
|
|
||||||
{livestreamInfo}
|
|
||||||
|
|
||||||
{earlyAcessInfo}
|
{earlyAcessInfo}
|
||||||
|
|
||||||
<div className="membership-splash__info-button">
|
<div className="membership-splash__info-button">
|
||||||
|
@ -133,8 +125,6 @@ export default function MembershipSplash(props: Props) {
|
||||||
</section>
|
</section>
|
||||||
{badgeInfo}
|
{badgeInfo}
|
||||||
|
|
||||||
{livestreamInfo}
|
|
||||||
|
|
||||||
{earlyAcessInfo}
|
{earlyAcessInfo}
|
||||||
|
|
||||||
{noAdsInfo}
|
{noAdsInfo}
|
||||||
|
|
|
@ -24,15 +24,10 @@ import {
|
||||||
selectIsClaimingInitialRewards,
|
selectIsClaimingInitialRewards,
|
||||||
selectHasClaimedInitialRewards,
|
selectHasClaimedInitialRewards,
|
||||||
} from 'redux/selectors/rewards';
|
} from 'redux/selectors/rewards';
|
||||||
import {
|
import { selectModal, selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
||||||
selectModal,
|
|
||||||
selectActiveChannelClaim,
|
|
||||||
selectIncognito,
|
|
||||||
selectActiveChannelStakedLevel,
|
|
||||||
} from 'redux/selectors/app';
|
|
||||||
import { selectClientSetting } from 'redux/selectors/settings';
|
import { selectClientSetting } from 'redux/selectors/settings';
|
||||||
import { makeSelectFileRenderModeForUri } from 'redux/selectors/content';
|
import { makeSelectFileRenderModeForUri } from 'redux/selectors/content';
|
||||||
import { selectUser, selectOdyseeMembershipName } from 'redux/selectors/user';
|
import { selectUser } from 'redux/selectors/user';
|
||||||
import PublishForm from './view';
|
import PublishForm from './view';
|
||||||
|
|
||||||
const select = (state) => {
|
const select = (state) => {
|
||||||
|
@ -62,10 +57,8 @@ const select = (state) => {
|
||||||
enablePublishPreview: selectClientSetting(state, SETTINGS.ENABLE_PUBLISH_PREVIEW),
|
enablePublishPreview: selectClientSetting(state, SETTINGS.ENABLE_PUBLISH_PREVIEW),
|
||||||
activeChannelClaim: selectActiveChannelClaim(state),
|
activeChannelClaim: selectActiveChannelClaim(state),
|
||||||
incognito: selectIncognito(state),
|
incognito: selectIncognito(state),
|
||||||
activeChannelStakedLevel: selectActiveChannelStakedLevel(state),
|
|
||||||
isClaimingInitialRewards: selectIsClaimingInitialRewards(state),
|
isClaimingInitialRewards: selectIsClaimingInitialRewards(state),
|
||||||
hasClaimedInitialRewards: selectHasClaimedInitialRewards(state),
|
hasClaimedInitialRewards: selectHasClaimedInitialRewards(state),
|
||||||
odyseeMembership: selectOdyseeMembershipName(state),
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
File upload is carried out in the background by that function.
|
File upload is carried out in the background by that function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { SITE_NAME, ENABLE_NO_SOURCE_CLAIMS, SIMPLE_SITE, CHANNEL_STAKED_LEVEL_LIVESTREAM } from 'config';
|
import { SITE_NAME, ENABLE_NO_SOURCE_CLAIMS, SIMPLE_SITE } from 'config';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import { buildURI, isURIValid, isNameValid } from 'util/lbryURI';
|
import { buildURI, isURIValid, isNameValid } from 'util/lbryURI';
|
||||||
|
@ -89,7 +89,6 @@ type Props = {
|
||||||
activeChannelClaim: ?ChannelClaim,
|
activeChannelClaim: ?ChannelClaim,
|
||||||
incognito: boolean,
|
incognito: boolean,
|
||||||
user: ?User,
|
user: ?User,
|
||||||
activeChannelStakedLevel: number,
|
|
||||||
isLivestreamClaim: boolean,
|
isLivestreamClaim: boolean,
|
||||||
isPostClaim: boolean,
|
isPostClaim: boolean,
|
||||||
permanentUrl: ?string,
|
permanentUrl: ?string,
|
||||||
|
@ -97,7 +96,6 @@ type Props = {
|
||||||
isClaimingInitialRewards: boolean,
|
isClaimingInitialRewards: boolean,
|
||||||
claimInitialRewards: () => void,
|
claimInitialRewards: () => void,
|
||||||
hasClaimedInitialRewards: boolean,
|
hasClaimedInitialRewards: boolean,
|
||||||
odyseeMembership: string,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function PublishForm(props: Props) {
|
function PublishForm(props: Props) {
|
||||||
|
@ -131,7 +129,6 @@ function PublishForm(props: Props) {
|
||||||
activeChannelClaim,
|
activeChannelClaim,
|
||||||
incognito,
|
incognito,
|
||||||
user,
|
user,
|
||||||
activeChannelStakedLevel,
|
|
||||||
isLivestreamClaim,
|
isLivestreamClaim,
|
||||||
isPostClaim,
|
isPostClaim,
|
||||||
permanentUrl,
|
permanentUrl,
|
||||||
|
@ -139,7 +136,6 @@ function PublishForm(props: Props) {
|
||||||
isClaimingInitialRewards,
|
isClaimingInitialRewards,
|
||||||
claimInitialRewards,
|
claimInitialRewards,
|
||||||
hasClaimedInitialRewards,
|
hasClaimedInitialRewards,
|
||||||
odyseeMembership,
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const inEditMode = Boolean(editingURI);
|
const inEditMode = Boolean(editingURI);
|
||||||
|
@ -149,13 +145,7 @@ function PublishForm(props: Props) {
|
||||||
const uploadType = urlParams.get(TYPE_PARAM);
|
const uploadType = urlParams.get(TYPE_PARAM);
|
||||||
const _uploadType = uploadType && uploadType.toLowerCase();
|
const _uploadType = uploadType && uploadType.toLowerCase();
|
||||||
|
|
||||||
const userHasEnoughLBCForStreaming = activeChannelStakedLevel >= CHANNEL_STAKED_LEVEL_LIVESTREAM;
|
const enableLivestream = ENABLE_NO_SOURCE_CLAIMS && user && !user.odysee_live_disabled;
|
||||||
|
|
||||||
const enableLivestream =
|
|
||||||
ENABLE_NO_SOURCE_CLAIMS &&
|
|
||||||
user &&
|
|
||||||
!user.odysee_live_disabled &&
|
|
||||||
(userHasEnoughLBCForStreaming || user.odysee_live_enabled || odyseeMembership);
|
|
||||||
|
|
||||||
// $FlowFixMe
|
// $FlowFixMe
|
||||||
const AVAILABLE_MODES = Object.values(PUBLISH_MODES).filter((mode) => {
|
const AVAILABLE_MODES = Object.values(PUBLISH_MODES).filter((mode) => {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { selectHasChannels, selectFetchingMyChannels } from 'redux/selectors/claims';
|
import { selectHasChannels, selectFetchingMyChannels } from 'redux/selectors/claims';
|
||||||
import { doClearPublish } from 'redux/actions/publish';
|
import { doClearPublish } from 'redux/actions/publish';
|
||||||
import { selectActiveChannelClaim, selectActiveChannelStakedLevel } from 'redux/selectors/app';
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
||||||
import { doFetchNoSourceClaims } from 'redux/actions/livestream';
|
import { doFetchNoSourceClaims } from 'redux/actions/livestream';
|
||||||
import { selectUser, selectOdyseeMembershipName } from 'redux/selectors/user';
|
import { selectUser } from 'redux/selectors/user';
|
||||||
import {
|
import {
|
||||||
makeSelectPendingLivestreamsForChannelId,
|
makeSelectPendingLivestreamsForChannelId,
|
||||||
makeSelectLivestreamsForChannelId,
|
makeSelectLivestreamsForChannelId,
|
||||||
|
@ -25,8 +25,6 @@ const select = (state) => {
|
||||||
pendingClaims: makeSelectPendingLivestreamsForChannelId(channelId)(state),
|
pendingClaims: makeSelectPendingLivestreamsForChannelId(channelId)(state),
|
||||||
fetchingLivestreams: makeSelectIsFetchingLivestreams(channelId)(state),
|
fetchingLivestreams: makeSelectIsFetchingLivestreams(channelId)(state),
|
||||||
user: selectUser(state),
|
user: selectUser(state),
|
||||||
odyseeMembership: selectOdyseeMembershipName(state),
|
|
||||||
activeChannelStakedLevel: selectActiveChannelStakedLevel(state),
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
|
|
|
@ -17,7 +17,7 @@ import Card from 'component/common/card';
|
||||||
import ClaimList from 'component/claimList';
|
import ClaimList from 'component/claimList';
|
||||||
import usePersistedState from 'effects/use-persisted-state';
|
import usePersistedState from 'effects/use-persisted-state';
|
||||||
import { LIVESTREAM_RTMP_URL } from 'constants/livestream';
|
import { LIVESTREAM_RTMP_URL } from 'constants/livestream';
|
||||||
import { ENABLE_NO_SOURCE_CLAIMS, CHANNEL_STAKED_LEVEL_LIVESTREAM } from 'config';
|
import { ENABLE_NO_SOURCE_CLAIMS } from 'config';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
hasChannels: boolean,
|
hasChannels: boolean,
|
||||||
|
@ -31,8 +31,6 @@ type Props = {
|
||||||
channelId: ?string,
|
channelId: ?string,
|
||||||
channelName: ?string,
|
channelName: ?string,
|
||||||
user: ?User,
|
user: ?User,
|
||||||
activeChannelStakedLevel: number,
|
|
||||||
odyseeMembership: string,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function LivestreamSetupPage(props: Props) {
|
export default function LivestreamSetupPage(props: Props) {
|
||||||
|
@ -49,21 +47,15 @@ export default function LivestreamSetupPage(props: Props) {
|
||||||
channelId,
|
channelId,
|
||||||
channelName,
|
channelName,
|
||||||
user,
|
user,
|
||||||
odyseeMembership,
|
|
||||||
activeChannelStakedLevel,
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const [sigData, setSigData] = React.useState({ signature: undefined, signing_ts: undefined });
|
const [sigData, setSigData] = React.useState({ signature: undefined, signing_ts: undefined });
|
||||||
const [showHelp, setShowHelp] = usePersistedState('livestream-help-seen', true);
|
const [showHelp, setShowHelp] = usePersistedState('livestream-help-seen', true);
|
||||||
|
|
||||||
const hasLivestreamClaims = Boolean(myLivestreamClaims.length || pendingClaims.length);
|
const hasLivestreamClaims = Boolean(myLivestreamClaims.length || pendingClaims.length);
|
||||||
|
const { odysee_live_disabled: liveDisabled } = user || {};
|
||||||
|
|
||||||
const hasEnoughLBCToStream = activeChannelStakedLevel >= CHANNEL_STAKED_LEVEL_LIVESTREAM;
|
const livestreamEnabled = Boolean(ENABLE_NO_SOURCE_CLAIMS && user && !liveDisabled);
|
||||||
const { odysee_live_disabled: liveDisabled, odysee_live_enabled: liveEnabled } = user || {};
|
|
||||||
|
|
||||||
const livestreamEnabled = Boolean(
|
|
||||||
ENABLE_NO_SOURCE_CLAIMS && user && !liveDisabled && (liveEnabled || odyseeMembership || hasEnoughLBCToStream)
|
|
||||||
);
|
|
||||||
|
|
||||||
function createStreamKey() {
|
function createStreamKey() {
|
||||||
if (!channelId || !channelName || !sigData.signature || !sigData.signing_ts) return null;
|
if (!channelId || !channelName || !sigData.signature || !sigData.signing_ts) return null;
|
||||||
|
@ -192,23 +184,6 @@ export default function LivestreamSetupPage(props: Props) {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* no livestreaming privs because no premium membership */}
|
|
||||||
{!livestreamEnabled && !odyseeMembership && (
|
|
||||||
<div style={{ marginTop: '11px' }}>
|
|
||||||
<h2 style={{ marginBottom: '15px' }}>
|
|
||||||
{__('To stream on Odysee, please join Odysee Premium or have 50 Credits as support on your channel')}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
button="primary"
|
|
||||||
label={__('Join Odysee Premium')}
|
|
||||||
icon={ICONS.FINANCE}
|
|
||||||
navigate={`/$/${PAGES.ODYSEE_MEMBERSHIP}`}
|
|
||||||
className="membership_button"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* show livestreaming frontend */}
|
{/* show livestreaming frontend */}
|
||||||
{livestreamEnabled && (
|
{livestreamEnabled && (
|
||||||
<div className="card-stack">
|
<div className="card-stack">
|
||||||
|
|
|
@ -394,13 +394,13 @@ const OdyseeMembershipPage = (props: Props) => {
|
||||||
// description to be shown under plan name
|
// description to be shown under plan name
|
||||||
function getPlanDescription(plan, active?) {
|
function getPlanDescription(plan, active?) {
|
||||||
if (plan === 'Premium') {
|
if (plan === 'Premium') {
|
||||||
return 'Badge on profile, livestreaming, automatic rewards confirmation, and early access to new features';
|
return 'Badge on profile, automatic rewards confirmation, and early access to new features';
|
||||||
|
|
||||||
// if there's more plans added this needs to be expanded
|
// if there's more plans added this needs to be expanded
|
||||||
} else if (active) {
|
} else if (active) {
|
||||||
return 'All Premium features, and no ads';
|
return 'All Premium features, and no ads';
|
||||||
} else {
|
} else {
|
||||||
return 'Badge on profile, livestreaming, automatic rewards confirmation, early access to new features, and no ads';
|
return 'Badge on profile, automatic rewards confirmation, early access to new features, and no ads';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ const OdyseeMembershipPage = (props: Props) => {
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
{__(
|
{__(
|
||||||
'Exclusive and early access features include: recommended content on homepage, livestreaming, and the ability to post Odysee hyperlinks + images in comments. Account is also automatically eligible for Rewards. More to come later.'
|
'Exclusive and early access features include: recommended content, homepage customization, and the ability to post Odysee hyperlinks + images in comments. Account is also automatically eligible for Rewards. More to come later.'
|
||||||
)}
|
)}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
Loading…
Reference in a new issue