1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Video</title>

<style type="text/css"></style>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body>

<div id="Content"><br>
<video width="854" height="480"  controls="controls">
<source src="MyMovie.mp4" type="video/mp4">
stuff
</div>

</body>
</html>`

When I view this on Google Chrome I get the video, but none of the buttons can be pressed and the video doesn't start.

James Dunn
  • 8,064
  • 13
  • 53
  • 87
user3186491
  • 11
  • 1
  • 3
  • are you sure Chrome supports that type of video? – markasoftware Jan 12 '14 at 02:26
  • 1
    I believe the answer is here http://stackoverflow.com/a/12174154/483536 Chrome can play .mp4 with H-264 video but not MPEG-4 Visual video. and there should be a closing tag. – Wayne Jan 12 '14 at 02:50

3 Answers3

1

If you don't see the buttons, this is probably an issue related with your CSS.

To have the video start automatically, use the parameter autoplay="autoplay" (parameters of HTML5 video):

A demo of a working video in JsFiddle.

Working code:

<div id="Content"><br>
    <video width="854" height="480"  controls="controls" autoplay="autoplay">
        <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
    stuff
        </video>
</div>

Answer by @Wayne: I believe the answer is here stackoverflow.com/a/12174154/483536 Chrome can play .mp4 with H-264 video but not MPEG-4 Visual video. and there should be a closing tag.

Louis XIV
  • 2,224
  • 13
  • 16
  • The button are showing they just dont work. when i used your code but with my video file name it still didnt work heres the css code #Content{width:900px; margin: 0 auto; background-color:452070; list-style-type:square;} – user3186491 Jan 12 '14 at 03:04
0

wrong doctype "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">"

HTML5 doctype is: <!DOCTYPE html>

Daniel
  • 379
  • 2
  • 6
  • I tried that. the only thing that happened was the color from the background disappearing. the video sill does not play – user3186491 Jan 12 '14 at 17:53
0

add appropriate codecs as below:
<source src="MyMovie.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>

Daniel
  • 379
  • 2
  • 6