Reputation: 1645
I would like to embed an MP4 video into a webpage of mine. At first I was setting the plugin to Quicktime player, but the movie wasn't playing smoothly so I decided to use the Windows Media Player plugin. All of this works, except for users with WinXP. Is there a trick to make it work on WinXP too? This is the HTML I have used:
<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="300" height="150" data="test.mp4" url="test.mp4" type="video/x-ms-asf">
<param name="url" value="test.mp4">
<param name="filename" value="test.mp4">
<param name="autostart" value="1">
<param name="autosize" value="1">
<embed src="test.mp4" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="300" height="150" autostart="true" scale="tofit"></embed>
</object>
Upvotes: 1
Views: 10413
Reputation: 3075
jwplayer is probably the best IMHO HTML5 video player
http://www.longtailvideo.com/jw-player/
And rather than only specifying a single video format you would use along with mp4, ogg, webm etc so that your video would load in most browsers, and mobile devices.
This is example code with flash fallback
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<video height="270" width="480" id="myVideo">
<source src="/static/bunny.mp4" type="video/mp4">
<source src="/static/bunny.webm" type="video/webm">
</video>
<script type="text/javascript">
jwplayer("myVideo").setup({
modes: [
{ type: 'html5' },
{ type: 'flash', src: '/jwplayer/player.swf' }
]
});
</script>
Upvotes: 1
Reputation: 141
Use HTML5:
<video width="300" height="150" controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Upvotes: 0