How to easily replace this flv player with an mp4 player?

In this PHP script I’m using it shows:

<script type="text/javascript">
var flashvars = {};
var params = {};
var attributes = {};
flashvars.flvsource = "[var.base_url]/uploads/[var.video_play]";
flashvars.autoplay = "false";
flashvars.color_nav_bar_top = "0x478dc2";
flashvars.color_nav_bar_bottom = "0xE7EBEC";
flashvars.ads_background_color = "0x00CCFF";
flashvars.ads_border_color = "0xCCCCCC";
flashvars.scrubber_position_color = "0x6AA1CE";
flashvars.scrubber_load_color = "0x888888";
flashvars.scrubber_background_color = "0xBBBBBB";
flashvars.volume_bar_color = "0xBBBBBB";
flashvars.buffering_time = 1;
flashvars.aspect_ratio="stretch";
params.allowfullscreen = "true";
params.allowscriptaccess = "sameDomain";
swfobject.embedSWF("[var.base_url]/player.swf", "myAlternativeContent", "245", "192", "9.0.0",  false, flashvars, params, attributes);
</script>

Is there some simple code that will repace this to play MP4’s?
Any guidance/insight will be appreciated

I find that http://www.videojs.com/ does a good job with this.

Thanks for your reply. I’ve downloaded and posted their demo html code here:

<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
  poster="http://video-js.zencoder.com/oceans-clip.png"
  data-setup="{}">
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!--     Tracks need an ending tag thanks to IE9 -->
<track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!--     Tracks need an ending tag thanks to IE9 -->
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a   web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports   HTML5 video</a></p>
</video>

How could I integrate my the source and embed lines, from my original code into the video.js?

Any additional help will be appreciated.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.