diff --git a/apps/web/app/(app)/[emailAccountId]/assistant/AssistantTabs.tsx b/apps/web/app/(app)/[emailAccountId]/assistant/AssistantTabs.tsx index 8538ba3500..2f563792b6 100644 --- a/apps/web/app/(app)/[emailAccountId]/assistant/AssistantTabs.tsx +++ b/apps/web/app/(app)/[emailAccountId]/assistant/AssistantTabs.tsx @@ -37,31 +37,6 @@ export function AssistantTabs() { )} - - {/*
- - - - Learn how to use the AI Personal Assistant to - automatically label, archive, and more. - - } - videoId="SoeNDVr7ve4" - /> -
*/} - diff --git a/apps/web/app/(app)/[emailAccountId]/automation/page.tsx b/apps/web/app/(app)/[emailAccountId]/automation/page.tsx index cf774837f9..7a2e31187f 100644 --- a/apps/web/app/(app)/[emailAccountId]/automation/page.tsx +++ b/apps/web/app/(app)/[emailAccountId]/automation/page.tsx @@ -97,7 +97,7 @@ export default async function AutomationPage({ title: "Getting started with AI Personal Assistant", description: "Learn how to use the AI Personal Assistant to automatically label, archive, and more.", - videoId: "SoeNDVr7ve4", + muxPlaybackId: "VwIP7UAw4MXDjkvmLjJzGsY00ee9jxIZVI952DoBBfp8", }} /> @@ -131,8 +131,7 @@ export default async function AutomationPage({ description={ "Learn how to use the AI Assistant to automatically label, archive, and more." } - videoSrc="https://www.youtube.com/embed/SoeNDVr7ve4" - thumbnailSrc="https://img.youtube.com/vi/SoeNDVr7ve4/0.jpg" + muxPlaybackId="VwIP7UAw4MXDjkvmLjJzGsY00ee9jxIZVI952DoBBfp8" storageKey="ai-assistant-onboarding-video" /> diff --git a/apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx b/apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx index 775b7ab1d6..5ba5650c12 100644 --- a/apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx +++ b/apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx @@ -230,7 +230,7 @@ export function BulkUnsubscribe() { . ), - videoId: "T1rnooV4OYc", + youtubeVideoId: "T1rnooV4OYc", }} /> diff --git a/apps/web/components/OnboardingModal.tsx b/apps/web/components/OnboardingModal.tsx index 3b88d1f051..3169f399d5 100644 --- a/apps/web/components/OnboardingModal.tsx +++ b/apps/web/components/OnboardingModal.tsx @@ -5,6 +5,7 @@ import { useLocalStorage, useWindowSize } from "usehooks-ts"; import { PlayIcon } from "lucide-react"; import { useModal } from "@/hooks/useModal"; import { YouTubeVideo } from "@/components/YouTubeVideo"; +import { MuxVideo } from "@/components/MuxVideo"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -17,12 +18,14 @@ import { export function OnboardingModal({ title, description, - videoId, + youtubeVideoId, + muxPlaybackId, buttonProps, }: { title: string; description: React.ReactNode; - videoId: string; + youtubeVideoId?: string; + muxPlaybackId?: string; buttonProps?: React.ComponentProps; }) { const { isModalOpen, openModal, setIsModalOpen } = useModal(); @@ -39,7 +42,8 @@ export function OnboardingModal({ setIsModalOpen={setIsModalOpen} title={title} description={description} - videoId={videoId} + youtubeVideoId={youtubeVideoId} + muxPlaybackId={muxPlaybackId} /> ); @@ -50,20 +54,23 @@ export function OnboardingModalDialog({ setIsModalOpen, title, description, - videoId, + youtubeVideoId, + muxPlaybackId, }: { isModalOpen: boolean; setIsModalOpen: (open: boolean) => void; title: string; description: React.ReactNode; - videoId: string; + youtubeVideoId?: string; + muxPlaybackId?: string; }) { return ( ); @@ -72,11 +79,13 @@ export function OnboardingModalDialog({ export function OnboardingDialogContent({ title, description, - videoId, + youtubeVideoId, + muxPlaybackId, }: { title: string; description: React.ReactNode; - videoId: string; + youtubeVideoId?: string; + muxPlaybackId?: string; }) { const { width } = useWindowSize(); @@ -84,25 +93,41 @@ export function OnboardingDialogContent({ const videoHeight = videoWidth * (675 / 1200); return ( - - + + {title} {description} - + {muxPlaybackId ? ( +
+ +
+ ) : youtubeVideoId ? ( +
+
+

{title}

+

{description}

+
+ +
+ ) : null}
); } diff --git a/apps/web/components/PageHeader.tsx b/apps/web/components/PageHeader.tsx index 93556972e9..967ad51b89 100644 --- a/apps/web/components/PageHeader.tsx +++ b/apps/web/components/PageHeader.tsx @@ -7,7 +7,8 @@ import { PlayIcon } from "lucide-react"; type Video = { title: string; description: React.ReactNode; - videoId: string; + youtubeVideoId?: string; + muxPlaybackId?: string; }; export function PageHeader({ @@ -24,7 +25,9 @@ export function PageHeader({ {title}
{description} - {video && } + {video && (video.youtubeVideoId || video.muxPlaybackId) && ( + + )}
); @@ -42,7 +45,8 @@ function WatchVideo({ video }: { video: Video }) { ); diff --git a/apps/web/components/VideoCard.tsx b/apps/web/components/VideoCard.tsx index 2cc8417e90..90998beb06 100644 --- a/apps/web/components/VideoCard.tsx +++ b/apps/web/components/VideoCard.tsx @@ -3,6 +3,7 @@ import React, { useState, useEffect } from "react"; import type { ComponentProps } from "react"; import Image from "next/image"; +import MuxPlayer from "@mux/mux-player-react"; import { PlayIcon, X } from "lucide-react"; import { CardGreen } from "@/components/ui/card"; import { @@ -12,6 +13,7 @@ import { DialogTitle, } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; +import { ClientOnly } from "@/components/ClientOnly"; type VideoCardProps = ComponentProps & { storageKey: string; @@ -45,8 +47,9 @@ const VideoCard = React.forwardRef< icon?: React.ReactNode; title: string; description: string; - videoSrc: string; - thumbnailSrc: string; + videoSrc?: string; + thumbnailSrc?: string; + muxPlaybackId?: string; onClose?: () => void; } >( @@ -58,6 +61,7 @@ const VideoCard = React.forwardRef< description, videoSrc, thumbnailSrc, + muxPlaybackId, onClose, ...props }, @@ -112,7 +116,11 @@ const VideoCard = React.forwardRef< >
- + Video: {title} -
-