简体   繁体   中英

HTML5 video tags not working

I am trying to make a website where I have multiple videos on it. When I run the code, only the first video loads. No matter what I do, the second video will not play or load. Why doesn't my second video load?

Here's my code:

<html> 
<head> 
<title>Andrew soundboard!</title> 
<style>
h1{
text-align:center;
}
</style>
</head> 
<body>
<h1>Andrew Soundboard!</h1> 
<br>
<video width="320" height="240" controls="controls" autobuffer> 
<source src="IMG_3558.mp4" type="video/mp4">
<object data="" width="320" height="240"> 
<embed width="320" height="240" src="IMG_3558.mp4"> 
</object> 
</video> 
<br>
FREAK OUT #1

<br><br>

<video width="320" height="240" controls="controls" autobuffer> 
<source src="IMG_3559.mp4" type="video/mp4">
<object data="" width="320" height="240"> 
<embed width="320" height="240" src="IMG_3559.mp4"> 
</object> 
</video> 
<br>
STOP IT!

</body> 
</html> 

There doesn't appear to be anything wrong with your code. So the possible issues are:

  1. Is your video on your server (or if running on computer, in an accessible folder)?
  2. Are you linking to your video correctly (in the right file, etc.)?
  3. Does your video have the exact same file name as your HTML?
  4. Does your video have the EXACT same file extension as your HTML? (.mp4, .mov, etc.)

Hope this helped!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM