From 8dc0f8224fe516fbca12233ac11e0950461fc100 Mon Sep 17 00:00:00 2001 From: Egor Startsev <78896684+benax-se@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:19:00 +0300 Subject: [PATCH] fix: add autoplay to videoblock if preview is enabled (#1005) --- src/components/VideoBlock/VideoBlock.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VideoBlock/VideoBlock.tsx b/src/components/VideoBlock/VideoBlock.tsx index f51a08422..358ceef2f 100644 --- a/src/components/VideoBlock/VideoBlock.tsx +++ b/src/components/VideoBlock/VideoBlock.tsx @@ -101,7 +101,7 @@ const VideoBlock = (props: VideoBlockProps) => { src && isPlaying ? `${src}?${getPageSearchParams({ ...(attributes || {}), - ...(autoplay ? AUTOPLAY_ATTRIBUTES : NO_AUTOPLAY_ATTRIBUTES), + ...(previewImg || autoplay ? AUTOPLAY_ATTRIBUTES : NO_AUTOPLAY_ATTRIBUTES), })}` : undefined;