Summary: Show HTML5 Video
Version: 20151004
Prerequisites: none
Status: working
License: GPL2+
Version: 20151004
Maintainer: GNUZoo
Users: +4 (View / Edit)
Downloads: HTML5Video.phpΔ
Discussion: HTML5Video-Talk

Questions answered by this recipe

  • How to show HTML5 Video?
  • How to show OGG Video?
  • How to show MP4 Video?
  • How to show WebM Video?

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.


This recipe makes it easy to add HTML5 Video.

It will first try to play ogg, then mp4 then webm. If the browser does not support HTML5 video it will display "Your browser does not support HTML5 video.".

Actual filenames should end with lowercase ".ogv" for ogg, ".mp4" for mp4, and ".webm" for webm.


(:html5video filename=gilligans2v1 poster=gilligan width=480 height=270:)


  • filename - first part of file - so if the file was gilligans2v1.ogg it would be "gilligans2v1"
  • poster - optional - an image to be displayed before the video begins
  • width - optional - custom width
  • height - optional - custom height


Copy HTML5Video.phpΔ to your cookbook directory

In your config.php enter:


or in your farmconfig.php enter:


This program sets the default directory to contain videos in "\uploads\".

To change the default directory set a variable in your config.php file like this:

   $HTML5VideoDir = '';


Release notes

This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 2 of the License, or (at your option) any later version.

Copyright 2007 by GNUZoo email: guru [snail] gnuzoo [period] org

Please donate to the author at url:

  • Version: 20151004 - Fix error message
  • Version: 20150815 - Remove hardcode path in poster variable + add php5.5 support
  • Version: 1.1 - Change some text, remove extraneous line of code.
  • Version: 1.0 - Initial release

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also




See discussion at HTML5Video-Talk

User notes +4: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.