Hi Everybody,

I would like to ask You about Youtube Api and what to do that after refreshing page video from youtube will be at current time, not to load from the start.

I have code like this on the page:

Code:
<div id="ytplayer" style="height:400px; background-color:#000;"></div>

  <script>var tag=document.createElement('script');tag.src="https://www.youtube.com/player_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);var player;function onYouTubePlayerAPIReady(){player=new YT.Player('ytplayer',{height:'400',width:'100%',videoId:'Chri7jfMMEQ?autoplay=1&rel=0&start=645&showinfo=0&controls=0&modestbranding=1&iv_load_policy=3&cc_load_policy=1'});player.addEventListener("onStateChange","onytplayerStateChange");$(function(){if(userConnection.cookie.get("volume")){volume=userConnection.cookie.get("volume");}else{volume=userConnection.cookie.set("volume",50);}
$("#master").slider({value:volume,orientation:"horizontal",range:"min",animate:true,slide:function(event,ui){player.setVolume(ui.value);userConnection.cookie.set("volume",ui.value);}});$("a#playpause").button({icons:{primary:"ui-icon-pause"},text:false});$("a#toggleSize").button({icons:{primary:"ui-icon-arrowthick-2-ne-sw"},text:false});});}
function onytplayerStateChange(event){player.setVolume(userConnection.cookie.get("volume"));newState=player.getPlayerState();if(newState==2||newState==1){player.playVideo();}}
var toggle=false;function toggleSize(){if(!toggle){$("iframe#ytplayer").animate({'height':'600'},300,function(){});$("div.left").animate({'width':'100%'},300,function(){toggle=!toggle;});$("div.right").animate({'width':'100%'},300,function(){});}else{$("iframe#ytplayer").animate({'height':'400'},300,function(){});$("div.left").animate({'width':'65%'},300,function(){toggle=!toggle;});$("div.right").animate({'width':'35%'},300,function(){});}}
function togglePlay(){if(player.getPlayerState()==1){player.stopVideo();$("a#playpause").button({icons:{primary:"ui-icon-play"}})}else{player.playVideo();$("a#playpause").button({icons:{primary:"ui-icon-pause"}})}}</script>
Check the java file too in the head section:

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<script src="http://ikogut.pl/static/js/user.js"></script>

So when I refresh the page the movie always starts at 645 seconds after video beginning (look at the code &start=645)

But I would like to make it like after refreshing the page everybody will be able to see the same action on video like it would be onine.

I don't know how to make the getCurrent time from Youtube Api. The final effect i would like to achieve is like on THIS website.

I read that getCurrenttime must be on Session Storage which is here http://ikogut.pl/static/js/user.js but i dont see it here.

I don't know if you know what i mean cause my English is not good, but I will appreciate any help from You.

Regards and Thank You for help!