#Problem with <video> anchor on astro web page
21 messages · Page 1 of 1 (latest)
What video Format are you using?
mp4
Can you provide a snipped of your code?
of course
tried like that before didnt work
just saw a syntax error in my first screen
but still doesnt work
Ok so what happened is astro is searching for the Video in your public directory of the project. Try importing the video 'import myVideo from "./yellow_anim.mp4" at the top and then set your source to myVideo
will do as you say rn
Im astro if you provide a filepath for image or video inside of your html it will always try to find it in the public directory of your project not in the current folder of the file you are trying to import it from.
i did try earlier in the public directory but it didnt work so i tried with a video that put in the same directory, to see if the bug was here
and it doesnt work
it looks like he doesnt read it
Use src={myVideo} as an object not String
ofc sry 🥲
Np
it works ty life savior
No Problem Happy coding