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_PREROLL_ADS=true
|
||||
CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4
|
||||
CHANNEL_STAKED_LEVEL_LIVESTREAM=5
|
||||
CHANNEL_CREATION_LIMIT=5
|
||||
WEB_PUBLISH_SIZE_LIMIT_GB=4
|
||||
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",
|
||||
"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:",
|
||||
"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.",
|
||||
"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.",
|
||||
|
@ -2195,8 +2195,8 @@
|
|||
"early access": "early access",
|
||||
"site-wide badge": "site-wide badge",
|
||||
"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, 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, and early access to new features": "Badge on profile, automatic rewards confirmation, and early access to new features",
|
||||
"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",
|
||||
"Interval": "Interval",
|
||||
"Your Active Memberships": "Your Active Memberships",
|
||||
|
|
|
@ -50,12 +50,6 @@ export default function MembershipSplash(props: Props) {
|
|||
{__('No ads')}
|
||||
</div>
|
||||
);
|
||||
const livestreamInfo = (
|
||||
<div className="membership-splash__info-content">
|
||||
<Icon icon={ICONS.LIVESTREAM_MEMBERSHIP} />
|
||||
{__('Livestreaming')}
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="membership-splash">
|
||||
|
@ -102,8 +96,6 @@ export default function MembershipSplash(props: Props) {
|
|||
|
||||
{badgeInfo}
|
||||
|
||||
{livestreamInfo}
|
||||
|
||||
{earlyAcessInfo}
|
||||
|
||||
<div className="membership-splash__info-button">
|
||||
|
@ -133,8 +125,6 @@ export default function MembershipSplash(props: Props) {
|
|||
</section>
|
||||
{badgeInfo}
|
||||
|
||||
{livestreamInfo}
|
||||
|
||||
{earlyAcessInfo}
|
||||
|
||||
{noAdsInfo}
|
||||
|
|
|
@ -24,15 +24,10 @@ import {
|
|||
selectIsClaimingInitialRewards,
|
||||
selectHasClaimedInitialRewards,
|
||||
} from 'redux/selectors/rewards';
|
||||
import {
|
||||
selectModal,
|
||||
selectActiveChannelClaim,
|
||||
selectIncognito,
|
||||
selectActiveChannelStakedLevel,
|
||||
} from 'redux/selectors/app';
|
||||
import { selectModal, selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
|
||||
import { selectClientSetting } from 'redux/selectors/settings';
|
||||
import { makeSelectFileRenderModeForUri } from 'redux/selectors/content';
|
||||
import { selectUser, selectOdyseeMembershipName } from 'redux/selectors/user';
|
||||
import { selectUser } from 'redux/selectors/user';
|
||||
import PublishForm from './view';
|
||||
|
||||
const select = (state) => {
|
||||
|
@ -62,10 +57,8 @@ const select = (state) => {
|
|||
enablePublishPreview: selectClientSetting(state, SETTINGS.ENABLE_PUBLISH_PREVIEW),
|
||||
activeChannelClaim: selectActiveChannelClaim(state),
|
||||
incognito: selectIncognito(state),
|
||||
activeChannelStakedLevel: selectActiveChannelStakedLevel(state),
|
||||
isClaimingInitialRewards: selectIsClaimingInitialRewards(state),
|
||||
hasClaimedInitialRewards: selectHasClaimedInitialRewards(state),
|
||||
odyseeMembership: selectOdyseeMembershipName(state),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
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 Lbry from 'lbry';
|
||||
import { buildURI, isURIValid, isNameValid } from 'util/lbryURI';
|
||||
|
@ -89,7 +89,6 @@ type Props = {
|
|||
activeChannelClaim: ?ChannelClaim,
|
||||
incognito: boolean,
|
||||
user: ?User,
|
||||
activeChannelStakedLevel: number,
|
||||
isLivestreamClaim: boolean,
|
||||
isPostClaim: boolean,
|
||||
permanentUrl: ?string,
|
||||
|
@ -97,7 +96,6 @@ type Props = {
|
|||
isClaimingInitialRewards: boolean,
|
||||
claimInitialRewards: () => void,
|
||||
hasClaimedInitialRewards: boolean,
|
||||
odyseeMembership: string,
|
||||
};
|
||||
|
||||
function PublishForm(props: Props) {
|
||||
|
@ -131,7 +129,6 @@ function PublishForm(props: Props) {
|
|||
activeChannelClaim,
|
||||
incognito,
|
||||
user,
|
||||
activeChannelStakedLevel,
|
||||
isLivestreamClaim,
|
||||
isPostClaim,
|
||||
permanentUrl,
|
||||
|
@ -139,7 +136,6 @@ function PublishForm(props: Props) {
|
|||
isClaimingInitialRewards,
|
||||
claimInitialRewards,
|
||||
hasClaimedInitialRewards,
|
||||
odyseeMembership,
|
||||
} = props;
|
||||
|
||||
const inEditMode = Boolean(editingURI);
|
||||
|
@ -149,13 +145,7 @@ function PublishForm(props: Props) {
|
|||
const uploadType = urlParams.get(TYPE_PARAM);
|
||||
const _uploadType = uploadType && uploadType.toLowerCase();
|
||||
|
||||
const userHasEnoughLBCForStreaming = activeChannelStakedLevel >= CHANNEL_STAKED_LEVEL_LIVESTREAM;
|
||||
|
||||
const enableLivestream =
|
||||
ENABLE_NO_SOURCE_CLAIMS &&
|
||||
user &&
|
||||
!user.odysee_live_disabled &&
|
||||
(userHasEnoughLBCForStreaming || user.odysee_live_enabled || odyseeMembership);
|
||||
const enableLivestream = ENABLE_NO_SOURCE_CLAIMS && user && !user.odysee_live_disabled;
|
||||
|
||||
// $FlowFixMe
|
||||
const AVAILABLE_MODES = Object.values(PUBLISH_MODES).filter((mode) => {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { selectHasChannels, selectFetchingMyChannels } from 'redux/selectors/claims';
|
||||
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 { selectUser, selectOdyseeMembershipName } from 'redux/selectors/user';
|
||||
import { selectUser } from 'redux/selectors/user';
|
||||
import {
|
||||
makeSelectPendingLivestreamsForChannelId,
|
||||
makeSelectLivestreamsForChannelId,
|
||||
|
@ -25,8 +25,6 @@ const select = (state) => {
|
|||
pendingClaims: makeSelectPendingLivestreamsForChannelId(channelId)(state),
|
||||
fetchingLivestreams: makeSelectIsFetchingLivestreams(channelId)(state),
|
||||
user: selectUser(state),
|
||||
odyseeMembership: selectOdyseeMembershipName(state),
|
||||
activeChannelStakedLevel: selectActiveChannelStakedLevel(state),
|
||||
};
|
||||
};
|
||||
const perform = (dispatch) => ({
|
||||
|
|
|
@ -17,7 +17,7 @@ import Card from 'component/common/card';
|
|||
import ClaimList from 'component/claimList';
|
||||
import usePersistedState from 'effects/use-persisted-state';
|
||||
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 = {
|
||||
hasChannels: boolean,
|
||||
|
@ -31,8 +31,6 @@ type Props = {
|
|||
channelId: ?string,
|
||||
channelName: ?string,
|
||||
user: ?User,
|
||||
activeChannelStakedLevel: number,
|
||||
odyseeMembership: string,
|
||||
};
|
||||
|
||||
export default function LivestreamSetupPage(props: Props) {
|
||||
|
@ -49,21 +47,15 @@ export default function LivestreamSetupPage(props: Props) {
|
|||
channelId,
|
||||
channelName,
|
||||
user,
|
||||
odyseeMembership,
|
||||
activeChannelStakedLevel,
|
||||
} = props;
|
||||
|
||||
const [sigData, setSigData] = React.useState({ signature: undefined, signing_ts: undefined });
|
||||
const [showHelp, setShowHelp] = usePersistedState('livestream-help-seen', true);
|
||||
|
||||
const hasLivestreamClaims = Boolean(myLivestreamClaims.length || pendingClaims.length);
|
||||
const { odysee_live_disabled: liveDisabled } = user || {};
|
||||
|
||||
const hasEnoughLBCToStream = activeChannelStakedLevel >= CHANNEL_STAKED_LEVEL_LIVESTREAM;
|
||||
const { odysee_live_disabled: liveDisabled, odysee_live_enabled: liveEnabled } = user || {};
|
||||
|
||||
const livestreamEnabled = Boolean(
|
||||
ENABLE_NO_SOURCE_CLAIMS && user && !liveDisabled && (liveEnabled || odyseeMembership || hasEnoughLBCToStream)
|
||||
);
|
||||
const livestreamEnabled = Boolean(ENABLE_NO_SOURCE_CLAIMS && user && !liveDisabled);
|
||||
|
||||
function createStreamKey() {
|
||||
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 */}
|
||||
{livestreamEnabled && (
|
||||
<div className="card-stack">
|
||||
|
|
|
@ -394,13 +394,13 @@ const OdyseeMembershipPage = (props: Props) => {
|
|||
// description to be shown under plan name
|
||||
function getPlanDescription(plan, active?) {
|
||||
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
|
||||
} else if (active) {
|
||||
return 'All Premium features, and no ads';
|
||||
} 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>
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue