Nextjs video help
Answered
In&Out posted this in #help-forum
In&OutOP
Hello, i am trying to put a video on my page, this is the code
<video className={styles.video} preload="none">
<source
src="/video.mp4"
type="video/mp4"
autoPlay
loop
muted
playsInline
/>
Your browser does not support the video tag.
</video>
Answered by Selkirk Rex
As I remember, if you want to import something relative to the domain, you need to place it in the public folder. Otherwise, use the import statement.
15 Replies
In&OutOP
But it doesnt work, video is in same folder as the component
Selkirk Rex
As I remember, if you want to import something relative to the domain, you need to place it in the public folder. Otherwise, use the import statement.
Answer
In&OutOP
Ahhh will try thanks
In&OutOP
Still the same
Selkirk Rex
Are you sure that this is the
src
problemi mean what you see
when app is running
In&OutOP
nevermind, for some dumb reason i had to put width and height property, even tho they are ignored because i have classname
it works, thanks
tho, how ot remove this?
Selkirk Rex
yep thats what i was thinking
dunno is not it browser feature
In&OutOP
ugh okay