PHPackages                             jdsdev/craft-embedder - 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. jdsdev/craft-embedder

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

jdsdev/craft-embedder
=====================

Generate video embed code.

4.0.0(1y ago)6910.4k↓27.1%9MITPHPPHP ^8.2

Since Jan 16Pushed 1y ago4 watchersCompare

[ Source](https://github.com/jdsdev/Embedder)[ Packagist](https://packagist.org/packages/jdsdev/craft-embedder)[ RSS](/packages/jdsdev-craft-embedder/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (7)Used By (0)

Embedder
========

[](#embedder)

Embedder is a plugin for Craft CMS based on [Antenna](https://github.com/vector/Antenna) by Vector Media Group that will generate embed code for YouTube, Vimeo, Wistia, or Viddler. It also gives you access to the video’s title, its author, the author’s YouTube/Vimeo URL, and a thumbnail. All you have to do is pass it a single URL.

You can also output various pieces of metadata about the video.

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

[](#requirements)

This plugin requires Craft 5 or later.

> For the Craft 2 version, see the [v1 branch](https://github.com/jdsdev/Embedder/tree/v1)

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 jdsdev/craft-embedder

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

---

Simple Usage
------------

[](#simple-usage)

If used as a single tag (embedder.embed), it returns the HTML embed/object code for the video.

```
{{ craft.embedder.embed (entry.embedderVideo, {max_width:500, max_height:800}) }}
```

Full Usage and Variables
------------------------

[](#full-usage-and-variables)

If used by setting the video URL, you get access to several variables.

```
{% set video = craft.embedder.url(entry.embedderVideo, {max_width:500, max_height:800}) %}

{{ video.embed_code }}

    title : {{ video.video_title }}
    description : {{ video.video_description }}
    thumbnail :

```

There are three image sizes available for videos: `video_thumbnail`, `video_mediumres`, and `video_highres`. They are not consistent across services but they should fall into rough size brackets. `video_thumbnail` is going to be between 100-200px wide; `video_mediumres` will be around 400-500px wide; and `video_highres` will be at least the full size of your uploaded video and could be as wide as 1280px.

Parameters
----------

[](#parameters)

### Dimensions

[](#dimensions)

Set the `max_width` and/or `max_height` for whatever size your website requires. The video will be resized to be within those dimensions, and will stay at the correct proportions.

- `max_width: 500` - Can be any number. Left unspecified by default.
- `max_height: 800` - Can be any number. Left unspecified by default.

### YouTube

[](#youtube)

If you're using YouTube, you can use any of the [supported embed parameters](https://developers.google.com/youtube/player_parameters#Parameters). Simply prefix the parameters with `youtube_`. Here are some common parameters:

- `youtube_rel: 0` - Show related videos at the end of the video. Can be `0` or `1` (default).
- `youtube_showinfo: 0` - Show the video title overlay. Can be `0` or `1` (default).
- `youtube_controls: 0` - Show the video player controls. Can be `0` or `1` (default).
- `youtube_autoplay: 1` - Automatically start playback of the video. Can be `0` (default) or `1`.
- `youtube_enablejsapi: 1` - Enable the YouTube IFrame or JavaScript APIs. Can be `0` (default) or `1`.

Additionally the following non-standard parameter is available when using YouTube:

- `youtube_privacyEnhanced: 1` - Use [YouTube's privacy-enhanced mode](https://support.google.com/youtube/answer/171780#zippy=%2Cturn-on-privacy-enhanced-mode). Can be `0` (default) or `1`.

### Vimeo

[](#vimeo)

If you're using Vimeo, you can use any of the [supported embed parameters](https://github.com/vimeo/player.js#embed-options). Simply prefix the parameters with `vimeo_`. Here are some of the common parameters:

- `vimeo_byline: 0` - Shows the byline on the video. Can be `0` or `1` (default).
- `vimeo_title: 0` - Shows the title on the video. Can be `0` or `1` (default).
- `vimeo_portrait: 0` - Shows the user's avatar on the video. Can be `0` or `1` (default).
- `vimeo_loop: 1` - Loops the video playback. Can be `0` (default) or `1`.
- `vimeo_autoplay: 1` - Automatically start playback of the video. Can be `0` (default) or `1`.
- `vimeo_color: 'ff0000'` - Sets the theme color for the Vimeo player. Can be any hexidecimal color value (without the hash). Defaults to `'00adef'`.

You can also use the following Vimeo parameter:

- `vimeo_player_id: 'myVideoPlayer'` - Sets an ID on the player, which is useful if you want to control multiple videos on the same page in a different way.

The following extra variable is available when using Vimeo:

- `{{ video_description }}` - The description of the video, as set in Vimeo

### Viddler

[](#viddler)

If you're using Viddler, you get access to two more parameters:

- `viddler_type: 'simple'` - Specifies the player type. Can be `'simple'` or `'player'` (default).
- `viddler_ratio: 'widescreen'` - Aspect ratio. Can be `'widescreen'`, `'fullscreen'`, or left unspecified for automatically determined aspect ratio.

### Wistia

[](#wistia)

If you're using Wistia, you get access to two more parameters:

- `wistia_type` - Sets the supported embed type.
- `wistia_foam: true` - Makes the embedded video responsive using Wistia's Video Foam feature.

### HTML Output Control

[](#html-output-control)

You can also control your output with the following parameters:

- `id: 'myId'` - Gives the iFrame an `id=` attribute with the specified value.
- `class: 'video player'` - Gives the iFrame a `class=` attribute with the specified value.
- `attributes: 'data-video data-player'` - Gives the iFrame the specified HTML attribute(s).

### wmode (deprecated with most providers)

[](#wmode-deprecated-with-most-providers)

The optional `wmode` parameter can be used if you're experiencing issues positioning HTML content in front of the embedded media. It accepts values of `transparent`, `opaque` and `window`.

---

Contributions
-------------

[](#contributions)

- [Adam Powell](https://github.com/A-P) - Original plugin author.
- [Aaron Waldon](https://github.com/aaronwaldon) / @aaronwaldon - Reworked the logic to allow any provider parameters to be used. Added HTML output control parameters and updated the documentation.
- [Jonathan Sarmiento](https://github.com/jdsdev) - Updated the plugin for Craft 3 and Craft 4.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity78

Established project with proven stability

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

Recently: every ~335 days

Total

6

Last Release

683d ago

Major Versions

2.0.3 → 3.0.02022-05-23

3.0.0 → 4.0.02024-08-18

PHP version history (2 changes)3.0.0PHP ^8.0

4.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![jdsdev](https://avatars.githubusercontent.com/u/3828971?v=4)](https://github.com/jdsdev "jdsdev (14 commits)")[![A-P](https://avatars.githubusercontent.com/u/371169?v=4)](https://github.com/A-P "A-P (10 commits)")[![aaronwaldon](https://avatars.githubusercontent.com/u/2032940?v=4)](https://github.com/aaronwaldon "aaronwaldon (5 commits)")[![domstubbs](https://avatars.githubusercontent.com/u/717265?v=4)](https://github.com/domstubbs "domstubbs (2 commits)")[![jcdarwin](https://avatars.githubusercontent.com/u/851300?v=4)](https://github.com/jcdarwin "jcdarwin (1 commits)")[![aelvan](https://avatars.githubusercontent.com/u/2675644?v=4)](https://github.com/aelvan "aelvan (1 commits)")[![rungta](https://avatars.githubusercontent.com/u/663677?v=4)](https://github.com/rungta "rungta (1 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginembedder

### Embed Badge

![Health badge](/badges/jdsdev-craft-embedder/health.svg)

```
[![Health](https://phpackages.com/badges/jdsdev-craft-embedder/health.svg)](https://phpackages.com/packages/jdsdev-craft-embedder)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k60](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.5M54](/packages/nystudio107-craft-seomatic)[verbb/navigation

Create navigation menus for your site.

92705.0k18](/packages/verbb-navigation)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)

PHPackages © 2026

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