Use the youtube-controller module to control YouTube iframe embeds with JavaScript.

  • The YouTube iframe src must have jsapienabled=1 as a URL parameter for the JS API to work.

Examples

Basic

Video Modal

Combine the youtube-controller module with the video-modal module to implement autoplay.