Search code examples
htmlflashvideohtml5-video

Video embedded into HTML doesn't play


I am trying to accomplish a very simple task; at least I would think it should be but its not.

I am trying to embed video into HTML and nothing I try seems to works. Here is the code I am using to do it:

<video width="560" height="340" controls>
    <source src="video/30.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>  
    <source src="video/30.ogv" type='video/ogg; codecs="theora, vorbis"'>

    <object width="640" height="384" type="application/x-shockwave-flash"   data="video/player_flv_maxi.swf?image=placeholder.jpg&file=video/30.swf">
    <param name="movie" value="video/player_flv_maxi.swf?image=placeholder.jpg&file=video/30.swf" />
    </object>
</video>

I am using this resource to try and accomplish this: http://www.webmonkey.com/2010/05/embed-videos-in-your-web-pages-using-html5/

I also have tried: http://www.w3schools.com/html/html5_video.asp

And none of those seem to work. Can someone please tell me why none of the video formats I have listed above play in Google Chrome? Is there something wrong with the code?


Solution

  • I figured out what my problem was. It has to do with including the MIME Type to your IIS. I found this webpage that got me up and running in know time:

    http://blog.arvixe.com/to-play-mp4-video-in-asp-net-you-may-need-to-add-a-mime-type/

    Make sure if you are running Mircosoft IIS that you have the MIME Type added to IIS so IIS knows what to do when someone tries to load a mp4 video type. Thanks all for the help!