I am just trying to trigger an alert('test') at the end of a youtube video, worked well until today.
I just made a jsfiddle http://jsfiddle.net/264BB/, if anyone can check the code or faced the same issue please let me know, it would be nice.
function onPlayerStateChange(event) {
alert('test')
if (event.data == YT.PlayerState.ENDED) {
alert('test')
}
}
If the trigger works well notice me too, maybe it is a browser specific problem.