Getting Started
-
YouTubeController depends on the jQuery library, so be sure to include it within your markup.
<script src="//code.jquery.com/jquery-latest.min.js"></script> <script src="//youtube_controller.min.js"></script>
-
Tag your html element with either a class or id attribute so that the controller can reference it.
<!-- HTML --> <div id="playerId"> ... </div>
-
Attach the YouTubeController object onto your html element, add the required videoId and you're done!
If you are wondering where you can find your video's videoId here is a helpful video.// JavaScript var ytController = $("#playerId").YTController({ videoId: "youtube_video_id" });