Trying to display a video component in specific pages
Unanswered
Singapura posted this in #help-forum
SingapuraOP
Hey everyone,
I'm currently working on a Next.js 13 project and I'm having some trouble with a background video component. I want the video to play continuously in the background across different pages without reloading. However, I don't want it to play on certain pages (e.g., '/chat').
I tried using the usePathname from next/navigation to get the current route and conditionally render the BackgroundVideo component based on the route. However, it seems like maybe I'm not using usePathname correctly.
Does anyone know how I can achieve this? Any help would be greatly appreciated.
I'm currently working on a Next.js 13 project and I'm having some trouble with a background video component. I want the video to play continuously in the background across different pages without reloading. However, I don't want it to play on certain pages (e.g., '/chat').
I tried using the usePathname from next/navigation to get the current route and conditionally render the BackgroundVideo component based on the route. However, it seems like maybe I'm not using usePathname correctly.
Does anyone know how I can achieve this? Any help would be greatly appreciated.
1 Reply
seems fine to me