Download the PHP package waughj/html-video without Composer
On this page you can find all versions of the php package waughj/html-video. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download waughj/html-video
More information about waughj/html-video
Files in waughj/html-video
Download waughj/html-video
More information about waughj/html-video
Files in waughj/html-video
Vendor waughj
Package html-video
Short Description Simple class for automatically generating video HTML code.
License GPL-3.0-or-later
Package html-video
Short Description Simple class for automatically generating video HTML code.
License GPL-3.0-or-later
Please rate this library. Is it a good library?
Informations about the package html-video
HTML Video
Simple class for automatically generating video HTML code.
Use
This class's constructor takes 2 arguments: a list of hash maps of attributes for sources & a list of attributes for the video element itself.
For a source's type attribute, you can leave off the "video/" & the constructor will automatically add it.
Example
use WaughJ\HTMLVideo\HTMLVideo;
echo new HTMLVideo
(
[ [ 'src' => 'video.mp4', 'type' => 'mp4', 'media' => '(max-width:480px)' ], [ 'src' => 'movie.webm', 'type' => 'webm' ] ],
[ 'muted' => "true", 'controls' => "controls", 'preload' => "none", 'autoplay' => "autoplay", 'width' => "1200", 'height' => "674", 'class' => "center-img" ]
);
will generate:
<video muted="true" controls="controls" preload="none" autoplay="autoplay" width="1200" height="674" class="center-img">
<source src="video.mp4" type="video/mp4" media="(max-width:480px)"></source>
<source src="movie.webm" type="video/webm"></source>
</video>
Changelog
0.2.1
- Clean up code & make it less redundant
0.2.0
- Allow for more attributes to each source, including media attribute
0.1.0
- Initial Release
All versions of html-video with dependencies
PHP Build Version
Package Version
The package waughj/html-video contains the following files
Loading the files please wait ....