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
@In&Out 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
Selkirk Rex
Are you sure that this is the
src problemi mean what you see
when app is running
@Selkirk Rex 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?
@In&Out nevermind, for some dumb reason i had to put width and height property, even tho they are ignored because i have classname
Selkirk Rex
yep thats what i was thinking
@In&Out it works, thanks
Selkirk Rex
dunno is not it browser feature
In&OutOP
ugh okay