Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ Test: discord embedded #5720

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/atlas-meta-server/src/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const generateCommonMetaTags = (
}),
...(image && {
'og:image': image,
'twitter:image': appUrl + image,
'twitter:image': image,
'og:image:alt': title,
'twitter:image:alt': title,
'og:image:type': 'image/webp',
Expand Down
17 changes: 9 additions & 8 deletions packages/atlas/src/.env
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ VITE_OPTIMIZE_ID=
VITE_USERSNAP_ID=

# Production env URLs
VITE_PRODUCTION_ORION_AUTH_URL=https://auth.gleev.xyz/api/v1
VITE_PRODUCTION_ORION_URL=https://orion.gleev.xyz/graphql
VITE_PRODUCTION_ORION_AUTH_URL=http://localhost:3002/api/v1
VITE_PRODUCTION_ORION_URL=http://localhost:3001/graphql
#VITE_PRODUCTION_ORION_URL=https://orion.gleev.xyz/graphql
VITE_PRODUCTION_QUERY_NODE_SUBSCRIPTION_URL=wss://orion.joystream.org/graphql
VITE_PRODUCTION_NODE_URL=wss://rpc.joystream.org:9944
VITE_PRODUCTION_FAUCET_URL=https://faucet.joystream.org/member-faucet/register
Expand All @@ -46,12 +47,12 @@ VITE_DEVELOPMENT_FAUCET_URL=https://atlas-dev.joystream.org/member-faucet/regist
VITE_DEVELOPMENT_YPP_FAUCET_URL=https://50.19.175.219.nip.io/memberships

# Experimental env URLs
VITE_NEXT_ORION_AUTH_URL=
VITE_NEXT_ORION_URL=https://atlas-next.joystream.org/orion/graphql
VITE_NEXT_QUERY_NODE_SUBSCRIPTION_URL=wss://atlas-next.joystream.org/orion/graphql
VITE_NEXT_NODE_URL=wss://atlas-next.joystream.org/ws-rpc
VITE_NEXT_FAUCET_URL=https://atlas-next.joystream.org/member-faucet/register
VITE_NEXT_YPP_FAUCET_URL=https://52.204.147.11.nip.io/membership
VITE_NEXT_ORION_AUTH_URL=https://3.73.121.180.nip.io/api/v1
VITE_NEXT_ORION_URL=https://3.73.121.180.nip.io/orion/graphql
VITE_NEXT_QUERY_NODE_SUBSCRIPTION_URL=wss://3.73.121.180.nip.io/orion/graphql
VITE_NEXT_NODE_URL=wss://3.73.121.180.nip.io/ws-rpc
VITE_NEXT_FAUCET_URL=https://3.73.121.180.nip.io/member-faucet/register
VITE_NEXT_YPP_FAUCET_URL=wss://3.73.121.180.nip.io/ws-rpc

# Local development env URLs
VITE_LOCAL_ORION_AUTH_URL=http://localhost:4074/api/v1
Expand Down
7 changes: 3 additions & 4 deletions packages/atlas/src/config/contentFilter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ChannelWhereInput, VideoWhereInput } from '@/api/queries/__generated__/baseTypes.generated'
import { atlasConfig } from '@/config/config'

export const publicChannelFilter: ChannelWhereInput = {
isCensored_eq: false,
Expand All @@ -20,9 +19,9 @@ export const cancelledVideoFilter: VideoWhereInput = {
export const publicCryptoVideoFilter: VideoWhereInput = {
isPublic_eq: true,
isCensored_eq: false,
category: {
id_in: atlasConfig.content.categories.find((category) => category.name === 'Crypto')?.videoCategories,
},
// category: {
// id_in: atlasConfig.content.categories.find((category) => category.name === 'Crypto')?.videoCategories,
// },
media: {
isAccepted_eq: true,
},
Expand Down
20 changes: 20 additions & 0 deletions packages/atlas/src/hooks/useHeadTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ export const useHeadTags = (title?: string | null, metaTagsMapping: MetaTags = {
))
return (
<Helmet>
<meta
name="twitter:player"
property="twitter:player"
content="https://dist1.joyutils.org/distributor/api/v1/assets/918952"
/>
<meta name="twitter:player:width" property="twitter:player:width" content="1280" />
<meta name="twitter:player:height" property="twitter:player:height" content="720" />
<meta
name="og:video"
property="og:video"
content="https://dist1.joyutils.org/distributor/api/v1/assets/918952"
/>
<meta
name="og:video:secure_url"
property="og:video:secure_url"
content="https://dist1.joyutils.org/distributor/api/v1/assets/918952"
/>
<meta name="og:video:width" property="og:video:width" content="1920" />
<meta name="og:video:height" property="og:video:height" content="1080" />
<meta name="og:video:type" property="og:video:type" content="video/mp4" />
<title>{pageTitle}</title>
{metaTags}
</Helmet>
Expand Down
3 changes: 2 additions & 1 deletion packages/atlas/src/providers/environment/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export type EnvironmentState = {
export const ENV_PREFIX = 'VITE'

const INITIAL_STATE: EnvironmentState = {
defaultDataEnv: import.meta.env[getEnvName('DEFAULT_DATA_ENV')] || import.meta.env[getEnvName('ENV')] || 'production',
defaultDataEnv:
'next' || import.meta.env[getEnvName('DEFAULT_DATA_ENV')] || import.meta.env[getEnvName('ENV')] || 'production',
nodeOverride: null,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { ViewErrorFallback } from '@/components/ViewErrorFallback'
import { Button } from '@/components/_buttons/Button'
import { VideoPlayer } from '@/components/_video/VideoPlayer'
import { absoluteRoutes } from '@/config/routes'
import { useHeadTags } from '@/hooks/useHeadTags'
import { useVideoStartTimestamp } from '@/hooks/useVideoStartTimestamp'
import { SentryLogger } from '@/utils/logs'

Expand All @@ -21,7 +22,7 @@ export const EmbeddedView: FC = () => {
onError: (error) => SentryLogger.error('Failed to load video data', 'VideoView', error),
})
const { addVideoView } = useAddVideoView()

const headTags = useHeadTags(null, {})
const mediaUrls = video?.media?.resolvedUrls
const thumbnailUrls = video?.thumbnailPhoto?.resolvedUrls
const channelAvatarUrls = video?.channel.avatarPhoto?.resolvedUrls
Expand Down Expand Up @@ -90,6 +91,7 @@ export const EmbeddedView: FC = () => {

return (
<>
{headTags}
<EmbeddedGlobalStyles />
<Container>
{!loading && video ? (
Expand Down