From ce4d7348d3aeb5697e9c5396046fe3a41139630e Mon Sep 17 00:00:00 2001 From: Ilgeldi Date: Sat, 1 Mar 2025 15:28:52 +0500 Subject: [PATCH] feature: autoPlay when video changes --- components/playlist/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/playlist/index.tsx b/components/playlist/index.tsx index c14f283..d8cb92a 100644 --- a/components/playlist/index.tsx +++ b/components/playlist/index.tsx @@ -201,6 +201,7 @@ const VideoPlayer = ({ content, nextId }: { content: any; nextId: number }) => { controlsList={data?.is_downloadable === 0 ? "nodownload" : ""} // Conditionally enable/disable download poster={data?.banner_url} playsInline + autoPlay={nextId !== 1} onEnded={() => router.push(`${pathName}?video=${nextId}`)} > @@ -223,6 +224,7 @@ const VideoPlayer = ({ content, nextId }: { content: any; nextId: number }) => { controlsList={data?.is_downloadable === 0 ? "nodownload" : ""} // Conditionally enable/disable download className="w-full rounded bg-white" onEnded={() => router.push(`${pathName}?video=${nextId}`)} + autoPlay={nextId !== 1} >