Jump to content

Video embed not working on site. But works when I drag the file from the website folder to my browser?!

mkessler9

Ok so yesterday I made a post asking about how to add a hd and non hd option to my video player http://linustechtips.com/main/topic/150102-how-to-add-a-hd-and-non-hd-option-in-your-built-it-website-video-player/

 

 

Shortly after posting the topic the video on my website stopped working. 

This is the code for the video player-

<video width="640 height="360" controls>

<source src="videos/roomtour.mp4" type="video/mp4">
<source src="videos/roomtour.ogv" type="video/ogg">
</video>
 
Nothing has changed since it worked.
 
When I go on the server thats hosting the website and drag the html file that contains the video code to the browser on the server the video will play. But that's the only way I can get it to work. 
 
I don't understand why its doing this. Someone please help me. 
 
Thanks!

Gaming rig- Cpu- Amd 9590, 16gbs of G Skill Ram, Gpu- GTX 760 windforce 3 edition 2gb. A Thermaltake water 2.0 water cooler for my cpu. Keyboard- Thermaltake Posieden , Case- 750D, Mobo Asus 990fx R2.0. 24 inch Dell LED monitor

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...

Are you sure that your paths are correct? Also try using the Chrome inspect an element too see what is wrong.

 

If the problem persists, either give us more code, or link the page (last option would be the best).

Best regards Zahlio,
Unity asset developer - Game developer (http://playsurvive.com) - Computer Science student

Link to comment
Share on other sites

Link to post
Share on other sites

if you look closely at the code then you can see that it mentions src. This basically indicates the path of the file related to the tag. So in this case it would be the path of the video.

 

Make sure that the source (being the src) is directed to the correct path. So if you were to have /videos/roomtour.mp4 then you must have the video placed from the root folder towards the videos folder and inside that folder.

Link to comment
Share on other sites

Link to post
Share on other sites

if you look closely at the code then you can see that it mentions src. This basically indicates the path of the file related to the tag. So in this case it would be the path of the video.

 

Make sure that the source (being the src) is directed to the correct path. So if you were to have /videos/roomtour.mp4 then you must have the video placed from the root folder towards the videos folder and inside that folder.

That's correct. And that's what I did.

Gaming rig- Cpu- Amd 9590, 16gbs of G Skill Ram, Gpu- GTX 760 windforce 3 edition 2gb. A Thermaltake water 2.0 water cooler for my cpu. Keyboard- Thermaltake Posieden , Case- 750D, Mobo Asus 990fx R2.0. 24 inch Dell LED monitor

Link to comment
Share on other sites

Link to post
Share on other sites

That's correct. And that's what I did.

Have you tried including the src as part of the tag itself so instead of having it inside the tag, have it be the tag.

 

Pretty much like this

<video src="/videos/roomtour.mp4" controls>  some placeholder if they were not to support html5 videos</video>

If you were to have only 1 source then it's fine to have it be part of the tag itself or otherwise you may have multiple sources so you'd have it inside the tags.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×