YouTube API Example

What It Does

Wraps the YouTube API in an HTML5 Media API wrapper, so that it can be programmed against as if it was true HTML5 <video>.

Setup

1

Add Script and Styles

Add the normal files for MediaElement.js.

<script src="jquery.js"></script>
<script src="mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="mediaelementplayer.css" />
2

Add the YouTube video as a <source>

<video width="640" height="360" id="player1" preload="none">
	<source type="video/youtube" src="http://www.youtube.com/watch?v=nOEw9iiopwI" />
</video>