CookBook-HTML5Video
Summary: Show HTML5 Video Version: 20200130 Prerequisites: none Status: obsolete - use APE - Automagical PmWiki Embed instead License: GPL2+ Version: 20151004 Maintainer: Users: (View? / Edit?) Categories: Video Markup HTML5 PHP55 Media Obsolete Downloads: Attach:HTML5Video.php Discussion: CookBook-HTML5Video-Talk?
Questions answered by this recipe
- How to show HTML5 Video?
- How to show OGG Video?
- How to show MP4 Video?
Description
I consider this addon obsolete - use APE - Automagical PmWiki Embed instead.
This recipe makes it easy to add HTML5 Video.
It will first try to play ogg, then mp4. 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.
Example:
(:html5video filename=gilligans2v1 poster=gilligan width=480 height=270:)
Parameters
- 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
- id - optional - required to set initial volume control
- volume - optional - sets initial volume control -requires unique 'id' to adjust - values from 0 to 1
Installing
Copy Attach:HTML5Video.php to your cookbook directory
In your config.php enter:
or in your farmconfig.php enter:
$FarmD
/cookbook/HTML5Video.php");
The default directory to contain poster images and videos is "\uploads\". To change the default directory set a variable in your config.php file like this:
$HTML5ImageDir = 'http://yourdomain.org/hot/images/';
$HTML5VideoDir = 'http://yourdomain.org/hot/videos/';
Notes
Release notes
- Version: 20200130 - abandon PHP 5 - eliminate webm video, adjust for PHP7
- 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
See also
Contributors
Comments
See discussion at CookBook-HTML5Video-Talk?