PHPackages                             cacko/yii2-widget-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cacko/yii2-widget-video

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

cacko/yii2-widget-video
=======================

Yii2 widget video

0.1.6(1y ago)022MITPHPPHP &gt;=7.4

Since Aug 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/cacko/yii2-widget-video)[ Packagist](https://packagist.org/packages/cacko/yii2-widget-video)[ GitHub Sponsors](https://github.com/cacko)[ RSS](/packages/cacko-yii2-widget-video/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (8)Versions (5)Used By (0)

THIS IS JUNK&lt; NEEDS MAJOR REFACTRING, DO NOT USE
===================================================

[](#this-is-junk-needs-major-refactring-do-not-use)

yii2-widget-video
=================

[](#yii2-widget-video)

Yii2 widget for handling videos from:

- youtube - videos and playlists
- vimeo - can't remember, probably both
- wistia - whatever, it's paid crap
- brightcove - same as above
- twitch - supports it all, there's obviously limitations on the livestreams etc, just use common sense
- mp4 containers - as long as the browser supports it

it obviously relies on all the shite Yii2 decided to put as their defaults - bootshite, jQueer...etc

Demo
----

[](#demo)

 it's just a form with all options, so you can test, it has a barbaric look and feel. Demo site source is at

Usage
-----

[](#usage)

```
VideoWidget::widget([
  'url' => 'https://www.youtube.com/watch?v=N4q2kBe82-o',
])
```

### Options

[](#options)

- `url` - mandatory
- `autoPlay` - auto play the video. if using the new IE aka Chromium based browsers - you will most likely end up with muted video. the script will try its best ot play it with sound whenever possible. *JUST DO NOT USE IT, IT IS STUPID IDEA*.
- `hideContols` - hides the native provder controls and puts volume and full screen only. genereraly the idea is combined with startTimestamp to make a a non live stream look like a stream. pretty much useless, since average joe can just open dev tools and remove the non touch events, anyway.
- `startTimestamp` - when to start it, in Unix timestamp in seconds. Note that the timestamp comes from the server, but the wait is happening on the client browser, so if their's time is off, it will be off.
- `startPosition` - from where to start the video, in seconds
- `openInModal` - open the video in modal dialog
- `loop` - rather pointless thing, but whatever, repeats the video or playlist after it ends.
- `placeholderImage` - replaces the thumbnail from the video, in case you want to put your crappy logo to boost your genitals
- `placeholderEndImage` - shows it after the video ends. logically if you use loop that will never show..capishe ?

combining some options can be nonse, again use common sense.

Setup
-----

[](#setup)

Instalation
-----------

[](#instalation)

just use composer, ok ? or better just write your own.

```
composer require cacko/yii2-widget-video
```

### Screenshot persistance

[](#screenshot-persistance)

the extension stores downloaded thumbnails in the system temp folder. If you want to change, set a dependency of `Cacko\Yii2\Widgets\Video\Models\ScreenshotInterface`. if you don't know how - [RTFM](https://www.yiiframework.com/doc/guide/2.0/en/concept-di-container).

### Controller for captures

[](#controller-for-captures)

some providers or if you are using mp4 file, do not have api for screeshots, so it is done via the shite way and requires a controller endpoint. it points somewhere now, if you want to change it, same as above , DI -&gt; `Cacko\Yii2\Widgets\Video\Controller\ControllerInterface`..etc

```
Yii::$container->set('Cacko\Yii2\Widgets\Video\Models\ScreenshotInterface', MyJunkPersistanceCrap::class);
```

### Providers credentials

[](#providers-credentials)

currently only youtube and twich require credentials, simply set a component definitions in the main app config.

```
    'components' => [

        'youtubeApi' => [
            'class' => 'Cacko\Yii2\Widgets\Video\Components\YouTube\Api',
            'youtubeKey' => 'xxxx',
        ],
        'twitchApi' => [
            'class' => 'Cacko\Yii2\Widgets\Video\Components\Twitch\Api',
            'clientId' => 'xxx',
            'secretId' => 'xxx',
        ]
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance42

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~421 days

Total

4

Last Release

472d ago

PHP version history (2 changes)0.1.3PHP ~7.4

0.1.4PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/c95592e02929e2b3f43b20a3c61951df04a0980162453f55c85a3a84c51c5b4d?d=identicon)[cacko](/maintainers/cacko)

---

Top Contributors

[![cacko](https://avatars.githubusercontent.com/u/1057733?v=4)](https://github.com/cacko "cacko (3 commits)")

### Embed Badge

![Health badge](/badges/cacko-yii2-widget-video/health.svg)

```
[![Health](https://phpackages.com/badges/cacko-yii2-widget-video/health.svg)](https://phpackages.com/packages/cacko-yii2-widget-video)
```

###  Alternatives

[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[simialbi/yii2-kanban

Kanban board module for yii2

111.1k1](/packages/simialbi-yii2-kanban)

PHPackages © 2026

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