youtube api - clear browser cache on redirect javascript -


i'm using youtube api track video onstatechange , it's been working when refresh page(clear cache). when try youtube video on page exact same headers doesn't want respond onstatechange function

var ytplayer; function onyoutubeplayerapiready() { ytplayer = new yt.player('ytplayer', { events: { 'onstatechange': onplayerstatechange } }); }  function onplayerstatechange(event) {  alert("changed"); if(event.data === 0) {  players.playnext(videos_data[0].hash); } } 

basically, i'm trying autoplay next video using

playnext: function (hash) { window.location.href = "//my.website.com/video?hash=" + hash + "&n=" + date.now(); } 

note: i'm including javascripts in header of html page question: i'm doing wrong , how make work?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -