diff --git a/src/pages/catalogue/components/CatalogPreview.tsx b/src/pages/catalogue/components/CatalogPreview.tsx index c1cacab..3a3333c 100644 --- a/src/pages/catalogue/components/CatalogPreview.tsx +++ b/src/pages/catalogue/components/CatalogPreview.tsx @@ -32,6 +32,7 @@ function getPageDataFromEditorPage(page: Page): PageData | null { backgroundColor: page.backgroundColor, backgroundGradient: page.backgroundGradient, backgroundImageUrl: page.backgroundImageUrl, + backgroundVideoUrl: page.backgroundVideoUrl, objects: page.objects, }, ], diff --git a/src/pages/editor/components/EditorCanvas.tsx b/src/pages/editor/components/EditorCanvas.tsx index ae40bf9..0daa528 100644 --- a/src/pages/editor/components/EditorCanvas.tsx +++ b/src/pages/editor/components/EditorCanvas.tsx @@ -76,6 +76,9 @@ const EditorCanvas = ({ catalogSize }: EditorCanvasProps) => { ? currentPage.backgroundColor : '#ffffff'; const bgGradient = currentPage?.backgroundGradient; + const hasVideoBackground = + currentPage?.backgroundType === "video" && + Boolean(currentPage.backgroundVideoUrl); const [bgImage] = useImage( currentPage?.backgroundType === 'image' @@ -527,10 +530,20 @@ const EditorCanvas = ({ catalogSize }: EditorCanvasProps) => {
+ {hasVideoBackground && ( +