■ jQuery.tubeplayer.js ↓(ダウンロードは下記サイトの画面右下【Download ZIP】から)
https://github.com/nirvanatikku/jQuery-TubePlayer-Plugin
コードは下記のようになります
<script src="jquery.js"></script> <script src="jQuery.tubeplayer.min.js"></script> <div id='player'></div> <script> jQuery("#player").tubeplayer({ width: 600, // the width of the player height: 450, // the height of the player allowFullScreen: "true", // true by default, allow user to go full screen initialVideo: "[some video id]", // the video that is loaded into the player preferredQuality: "default",// preferred quality: default, small, medium, large, hd720 onPlay: function(id){}, // after the play method is called onPause: function(){}, // after the pause method is called onStop: function(){}, // after the player is stopped onSeek: function(time){}, // after the video has been seeked to a defined point onMute: function(){}, // after the player is muted onUnMute: function(){} // after the player is unmuted }); </script>
簡単ですね。