# Autoplay YouTube videos (opt-in)

**URL:** https://meta.discourse.org/t/autoplay-youtube-videos-opt-in/40370
**Category:** Marketplace
**Created:** [1 במרץ,‏ 2016,‏ 4:28am UTC](https://meta.discourse.org/t/autoplay-youtube-videos-opt-in/40370 "2016-03-01T04:28:04Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![dtchau](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dtchau/32/121852_2.png) [@dtchau](https://meta.discourse.org/u/dtchau)
#### Post date: [4 במרץ,‏ 2016,‏ 7:45pm UTC](https://meta.discourse.org/t/autoplay-youtube-videos-opt-in/40370/8 "2016-03-04T19:45:48Z")

</div>

Hi @charleswalter, try this plugin I just made - [GitHub Repo: discourse-plugin-autoplay](https://github.com/dtchau/discourse-plugin-autoplay).

> [@Media Autoplay](https://meta.discourse.org/t/media-autoplay-plugin-discourse-plugin-autoplay/40595):
>
> Hello everyone, I was learning to develop plugins when I came across [this topic](https://meta.discourse.org/t/autoplay-youtube-videos-opt-in/40370) and decided to make a plugin for it. Here are what the [discourse-plugin-autoplay (GitHub Repo)](https://github.com/dtchau/discourse-plugin-autoplay) plugin is going to do: Once a topic is loaded, the plugin will observe any changes made to the document object for the #post\_1 element. As soon as that element is found, the plugin will stop observing document. Within the #post\_1 node, if Youtube links are found, the first one will be played; if not, then the first audi…

---

_[View the full topic](https://meta.discourse.org/t/autoplay-youtube-videos-opt-in/40370)._
