Dalo by sa to cez Youtube API. Dokumentácia:
http://code.google.com/apis/youtube/js_ ... rence.html
Player zobrazíš cez JavaScript:
Kód:
<script type="text/javascript" src="swfobject.js"></script>
<div id="ytapiplayer">
You need Flash player 8+ and JavaScript enabled to view this video.
</div>
<script type="text/javascript">
var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/VIDEO_ID&enablejsapi=1&playerapiid=ytplayer",
"ytapiplayer", "425", "356", "8", null, null, params, atts);
</script>
A ešte kúsok JS:
Kód:
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("myytplayer");
ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
}
function onytplayerStateChange(newState) {
if (newState == 0) {
location.href = 'ADRESA PRE POKRAČOVANIE';
}
}
Nebudem ti vysvetľovať, o čo konkrétnejšie tu ide, môžeš si to prečítať
v dokumentácii.
Môj kód nebol testovaný