YouTube iFrame-JavaScript API

RESPONSIVE. Default size: 854px x 480px

See "page source" to observe the coding in this.

Added some things from the example at

Events Capture


Oct 29, 2014: Few times, you'll notice this error on Chrome console:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('') does not match the recipient window's origin ('this_window_url')

It's filed there:
I dunno how to resolve that.
You might be interested in these:
  • YouTube iframe API: how do I control a iframe player that's already in the HTML?
  • Force HTML5 video for embedded YouTube video: