The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript.
The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript. Unlike the Flash and JavaScript player APIs, which both involve embedding a Flash object on your web page, the IFrame API posts content to an <iframe>
tag on your page. This approach provides more flexibility than the previously available APIs since it allows YouTube to serve an HTML5 player rather than a Flash player for mobile devices that do not support Flash.
YouTube Player API Reference: https://developers.google.com/youtube/iframe_api_reference