<p>There are quite a few plugins here that you can use.</p>

<p><a href="https://straightupcraft.com/craft-plugins" rel="nofollow">Some Video Plugins on Straightup Craft</a></p>

<p>My personal preference after trying some of these out is </p>

<p><a href="https://github.com/benjamminf/craft-embedded-assets" rel="nofollow">Embedded Assets</a></p>

CC BY-SA 3.0
2016-09-12T20:55:48.523Z
+1, didn't know about Embedded Assets, that looks nice.
RitterKnight
CC BY-SA 3.0
2016-09-12T21:00:19.083Z
It's really nice. I used to create video "channels" but now I just create a video asset source and seems more user friendly.
AbbeyDesign
CC BY-SA 3.0
2016-09-14T15:14:39.427Z
Embedded assets looks perfect! Thanks a bunch.
Katie Fritz
CC BY-SA 3.0
2016-09-12T20:53:27.737Z
2016-09-12T20:58:31.153Z
2016-09-12T20:58:31.153Z
AbbeyDesign
<p>I've always had a Plain Text field for the user to paste a Vimeo or YouTube URL into and then used the <a href="https://github.com/A-P/Embedder" rel="nofollow">Embedder</a> plugin in the template to generate the correct embed code (with options to turn off related videos etc).</p>

<pre><code>{% set video = craft.embedder.url(matrix.videoUrl, {max_width:1200, youtube_rel:0, youtube_showinfo:0, vimeo_portrait:'false', vimeo_title:'false', vimeo_byline:'false'}) %}
&lt;div class="widescreen"&gt;{{ video.embed_code }}&lt;/div&gt;
</code></pre>

CC BY-SA 3.0
2016-09-14T17:07:22.207Z
I'm gonna say usually a plugin is a bit sexier and user friendly. Using a text field is not going to show a preview of the video or let the user know they've entered a valid url or not.
AbbeyDesign
CC BY-SA 3.0
2016-09-14T15:20:00.077Z
2016-09-14T15:20:00.077Z
Ant Cooper
<p>I try to avoid too many plugin dependencies and user exposure to embed code.</p>

<p>For those reasons my setup has just one input field for YouTube videos, "YouTube ID", which is the video's ID users copy and paste after they've found the video they're after on YouTube.</p>

<p>This is part of a Matrix field that allows users to insert all kinds of components (text, quotes, videos etc.).</p>

<p>It'll take you only a few minutes to set up in the fields, not much code for the Matrix, and gives you a DRY component for videos.</p>

CC BY-SA 4.0
2018-08-23T00:39:33.077Z
2018-08-23T00:39:33.077Z
Crafty Cat
<p>From basic to robust:</p>

<p><a href="https://www.imperavi.com/redactor/plugins/video/" rel="nofollow noreferrer">Redactor</a> has a plugin along that same vein but it's more basic—feed it a URL and it spits out the embed code in a Redactor field.</p>

<p><a href="https://github.com/Staplegun-US/craft-video-embed-utility" rel="nofollow noreferrer">Craft-video-embed-utilty</a> sounds like it might work as a basic option here. It's not a field type but a Twig filter that'll take the video URL the user enters (you could use it with any field, including a plain text field) and then spit out the necessary Twig embed code. If you want to build your own "options" from scratch, this could work.</p>

<p><a href="https://github.com/benjamminf/craft-embedded-assets" rel="nofollow noreferrer">Embedded Assets</a> allows you to use embeddable media such as YouTube videos to your assets manager and spit out the embed code necessary. </p>

<p>Dukt's premium <a href="https://dukt.net/craft/videos" rel="nofollow noreferrer">Videos</a> plugin is probably the most robust option. It'll actually connect to YouTube or Vimeo, hooks into Craft's interface, and visually allow you to search for and embed videos. It includes a videos field type that matrix compatible.</p>

CC BY-SA 3.0
2016-09-14T15:15:31.570Z
Great options. I think I'll try Embedded Assets unless it ends up slowing anything down. Thanks!
Katie Fritz
CC BY-SA 4.0
2016-09-12T20:52:26.947Z
2020-02-09T16:48:03.113Z
2020-02-09T16:48:03.113Z
RitterKnight
<p>I want to make it super easy for my user to embed a video from YouTube (maybe eventually from other sources) without having to get the iframe code. They should only have to enter the URL for the video, and maybe check a couple of optional settings, and the code will do the rest.</p>

<p>I'm planning to share the snippet and field architecture I develop here to save myself/others time in the future, but if someone else has already done this and wants to share first, even better!</p>

<matrix>
What's the most user friendly way to create a video block in a matrix field?
# What's the most user friendly way to create a video block in a matrix field?

(Asked by: username_0 on 2016-09-12)

I want to make it super easy for my user to embed a video from YouTube (maybe eventually from other sources) without having to get the iframe code. They should only have to enter the URL for the video, and maybe check a couple of optional settings, and the code will do the rest.

I'm planning to share the snippet and field architecture I develop here to save myself/others time in the future, but if someone else has already done this and wants to share first, even better!

**Tags:** matrix

---

## 4 answers

### Answer by username_2 on 2016-09-12. Score: 6 | Accepted answer

From basic to robust:

[Redactor](https://www.imperavi.com/redactor/plugins/video/) has a plugin along that same vein but it's more basic—feed it a URL and it spits out the embed code in a Redactor field.

[Craft-video-embed-utilty](https://github.com/Staplegun-US/craft-video-embed-utility) sounds like it might work as a basic option here. It's not a field type but a Twig filter that'll take the video URL the user enters (you could use it with any field, including a plain text field) and then spit out the necessary Twig embed code. If you want to build your own "options" from scratch, this could work.

[Embedded Assets](https://github.com/benjamminf/craft-embedded-assets) allows you to use embeddable media such as YouTube videos to your assets manager and spit out the embed code necessary.

Dukt's premium [Videos](https://dukt.net/craft/videos) plugin is probably the most robust option. It'll actually connect to YouTube or Vimeo, hooks into Craft's interface, and visually allow you to search for and embed videos. It includes a videos field type that matrix compatible.

> **Comments:**
> **username_0**: Great options. I think I'll try Embedded Assets unless it ends up slowing anything down. Thanks!  

---

### Answer by username_1 on 2016-09-12. Score: 4

There are quite a few plugins here that you can use.

[Some Video Plugins on Straightup Craft](https://straightupcraft.com/craft-plugins)

My personal preference after trying some of these out is

[Embedded Assets](https://github.com/benjamminf/craft-embedded-assets)

> **Comments:**
> **username_2**: +1, didn't know about Embedded Assets, that looks nice.  
> **username_1**: It's really nice. I used to create video "channels" but now I just create a video asset source and seems more user friendly.  
> **username_0**: Embedded assets looks perfect! Thanks a bunch.  

---

### Answer by username_3 on 2016-09-14. Score: 2

I've always had a Plain Text field for the user to paste a Vimeo or YouTube URL into and then used the Embedder plugin in the template to generate the correct embed code (with options to turn off related videos etc).
{% set video = craft.embedder.url(matrix.videoUrl, {max_width:1200, youtube_rel:0, youtube_showinfo:0, vimeo_portrait:'false', vimeo_title:'false', vimeo_byline:'false'}) %}
{{ video.embed_code }}

> **Comments:**
> **username_1**: I'm gonna say usually a plugin is a bit sexier and user friendly. Using a text field is not going to show a preview of the video or let the user know they've entered a valid url or not.  

---

### Answer by username_4 on 2018-08-23. Score: 2

I try to avoid too many plugin dependencies and user exposure to embed code.

For those reasons my setup has just one input field for YouTube videos, "YouTube ID", which is the video's ID users copy and paste after they've found the video they're after on YouTube.

This is part of a Matrix field that allows users to insert all kinds of components (text, quotes, videos etc.).

It'll take you only a few minutes to set up in the fields, not much code for the Matrix, and gives you a DRY component for videos.


---

