diff --git a/apis/api-users/src/schema/user/findOrFetchUser.ts b/apis/api-users/src/schema/user/findOrFetchUser.ts index 5ff8a2089e5..5097a1a75c4 100644 --- a/apis/api-users/src/schema/user/findOrFetchUser.ts +++ b/apis/api-users/src/schema/user/findOrFetchUser.ts @@ -19,7 +19,7 @@ export async function findOrFetchUser( if (existingUser != null && existingUser.emailVerified == null) { const user = await prisma.user.update({ where: { - id: userId + userId }, data: { emailVerified: false @@ -86,7 +86,7 @@ export async function findOrFetchUser( do { user = await prisma.user.update({ where: { - id: userId + userId }, data }) diff --git a/libs/journeys/ui/src/components/Card/ContainedCover/BackgroundVideo/BackgroundVideo.tsx b/libs/journeys/ui/src/components/Card/ContainedCover/BackgroundVideo/BackgroundVideo.tsx index a9426352805..b7d6954c988 100644 --- a/libs/journeys/ui/src/components/Card/ContainedCover/BackgroundVideo/BackgroundVideo.tsx +++ b/libs/journeys/ui/src/components/Card/ContainedCover/BackgroundVideo/BackgroundVideo.tsx @@ -1,10 +1,11 @@ import Box from '@mui/material/Box' import { styled } from '@mui/material/styles' -import { CSSProperties, ReactElement, useEffect, useRef } from 'react' +import { CSSProperties, ReactElement, useEffect, useRef, useState } from 'react' import videojs from 'video.js' import Player from 'video.js/dist/types/player' import { defaultBackgroundVideoJsOptions } from '@core/shared/ui/defaultVideoJsOptions' +import { isInstagramAndroidWebView } from '@core/shared/ui/deviceUtils' import { VideoBlockObjectFit, @@ -36,6 +37,11 @@ export function BackgroundVideo({ const videoRef = useRef(null) const playerRef = useRef(null) const isYouTube = source === VideoBlockSource.youTube + const [inAppBrowser, setInAppBrowser] = useState(false) + + useEffect(() => { + setInAppBrowser(isInstagramAndroidWebView()) + }, []) // Initiate Video useEffect(() => { @@ -136,6 +142,31 @@ export function BackgroundVideo({ } } + if (inAppBrowser && isYouTube && videoId != null) { + return ( + +