PHPackages                             viget/craft-video-embed - 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. viget/craft-video-embed

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

viget/craft-video-embed
=======================

Generate an embed URL from a YouTube or Vimeo URL

3.0.0(1y ago)2465.3k↓37.3%3MITPHPPHP ^8.2.0CI passing

Since Sep 13Pushed 1y ago25 watchersCompare

[ Source](https://github.com/vigetlabs/craft-videoembed)[ Packagist](https://packagist.org/packages/viget/craft-video-embed)[ RSS](/packages/viget-craft-video-embed/feed)WikiDiscussions v3 Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (11)Used By (0)

Video Embed plugin for Craft CMS 5.x
====================================

[](#video-embed-plugin-for-craft-cms-5x)

Generate an embed URL from a YouTube or Vimeo URL.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 5.0.0 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

---

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require viget/craft-video-embed

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Video Embed.

Using Video Embed
-----------------

[](#using-video-embed)

Pass a YouTube or Vimeo URL to the `getVideoData` method and a `VideoData` object is returned.

If the plugin is unable to parse the URL, `null` is returned.

- `type` - If the video is `youtube` or `vimeo`
- `id` - The ID of the video
- `image` - The thumbnail of the video (only works for Youtube)
- `embedUrl` - The URL you would use for the embed
- `url` - The link to the embedded video

**Example:**

```
{% set video = craft.videoEmbed.getVideoData('https://www.youtube.com/watch?v=6xWpo5Dn254') %}

{% if video %}

{% endif %}
```

**Output:**

```

```

---

[ ![Code At Viget](https://camo.githubusercontent.com/93b8927421fe8b33578eb274ce1d4b71954df6f83e2b0e51c28d92e8ac64d6ac/687474703a2f2f636f64652e76696765742e636f6d2f6769746875622d62616e6e65722e706e67)](http://code.viget.com)Visit [code.viget.com](http://code.viget.com) to see more projects from [Viget.](https://viget.com)

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance42

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~170 days

Total

10

Last Release

469d ago

Major Versions

1.2.2 → 2.0.02022-09-07

v2.x-dev → 3.0.02025-02-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/9728af4299f2de6d5f099f957bf6f4c8b312076b104910f8d4d8afc39540b686?d=identicon)[viget](/maintainers/viget)

---

Top Contributors

[![joshuapease](https://avatars.githubusercontent.com/u/2145998?v=4)](https://github.com/joshuapease "joshuapease (9 commits)")[![davist11](https://avatars.githubusercontent.com/u/199985?v=4)](https://github.com/davist11 "davist11 (5 commits)")[![ten1seven](https://avatars.githubusercontent.com/u/137020?v=4)](https://github.com/ten1seven "ten1seven (4 commits)")[![maxfenton](https://avatars.githubusercontent.com/u/906502?v=4)](https://github.com/maxfenton "maxfenton (1 commits)")

---

Tags

craft-plugincraft5craftcmscmsCraftcraftcmscraft-pluginvideo-embed

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/viget-craft-video-embed/health.svg)

```
[![Health](https://phpackages.com/badges/viget-craft-video-embed/health.svg)](https://phpackages.com/packages/viget-craft-video-embed)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[pennebaker/craft-architect

CraftCMS plugin to generate content models from JSON/YAML data.

72148.5k5](/packages/pennebaker-craft-architect)

PHPackages © 2026

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