How to use next-video with an MDX-based routing system without direct video imports? #344
Unanswered
leonardoRocchini
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm trying to use next-video in a Next.js project with an MDX-based routing system. In my MDX files, videos are referenced only via src, so I can't do a direct import as suggested in the documentation.
this is my custom component included in de mdx file
<CustomVideo src="/videos/sample.mp4" />
I created a custom component CustomVideo that wraps next-video's
Since I don’t know the video files in advance to import them, how can I configure next-video to handle videos dynamically at runtime? Is there a way to enable streaming and optimization support without explicit imports?
I have tried using the approach from the documentation (Remote videos with string source URL), but I end up with the following error in the JSON file:
The video muxVideo/test2.mp4 is located inside the public folder of my Next.js project.
Beta Was this translation helpful? Give feedback.
All reactions