PHPackages                             waughj/html-video - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. waughj/html-video

ActiveLibrary[Image &amp; Media](/categories/media)

waughj/html-video
=================

Simple class for automatically generating video HTML code.

v0.2.1(6y ago)011GPL-3.0-or-laterPHPPHP &gt;=7.2

Since Sep 10Pushed 6y agoCompare

[ Source](https://github.com/waughjai/html-video)[ Packagist](https://packagist.org/packages/waughj/html-video)[ RSS](/packages/waughj-html-video/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

HTML Video
==========

[](#html-video)

Simple class for automatically generating video HTML code.

Use
---

[](#use)

This class's constructor takes 2 arguments: a list of hash maps of attributes for sources &amp; a list of attributes for the video element itself.

For a source's type attribute, you can leave off the "video/" &amp; the constructor will automatically add it.

Example
-------

[](#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:

```

```

Changelog
---------

[](#changelog)

### 0.2.1

[](#021)

- Clean up code &amp; make it less redundant

### 0.2.0

[](#020)

- Allow for more attributes to each source, including media attribute

### 0.1.0

[](#010)

- Initial Release

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2439d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11161078?v=4)[waughj](/maintainers/waughj)[@waughj](https://github.com/waughj)

---

Tags

htmlvideoautogenerate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waughj-html-video/health.svg)

```
[![Health](https://phpackages.com/badges/waughj-html-video/health.svg)](https://phpackages.com/packages/waughj-html-video)
```

###  Alternatives

[php-ffmpeg/php-ffmpeg

FFMpeg PHP, an Object Oriented library to communicate with AVconv / ffmpeg

5.0k21.7M165](/packages/php-ffmpeg-php-ffmpeg)[picqer/php-barcode-generator

An easy to use, non-bloated, barcode generator in PHP. Creates SVG, PNG, JPG and HTML images from the most used 1D barcode standards.

1.8k25.5M88](/packages/picqer-php-barcode-generator)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[vimeo/vimeo-api

Official PHP library for the Vimeo API.

4637.1M32](/packages/vimeo-vimeo-api)[vimeo/laravel

A Vimeo bridge for Laravel

4161.5M4](/packages/vimeo-laravel)[s9e/text-formatter

Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding third-party media (YouTube, etc...), enhanced typography and more.

2413.1M29](/packages/s9e-text-formatter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
