I have a video website with videos from youtube, I use facebook api to post via open graph to a profile that the user viewed the video. So as facebook policy said: If the person watches more than 50% of a video, but does not complete it, the action instance should be updated to reflect that the person has stopped watching by updating expires_in to the length of time the video was actually watched.
I have 2 missunderstandings:
- How can I do a action if user stop the player and didn`t play 50% of video? For example a user acces video page, press play and without stop or pause the video will go to another page. When the update should be done?
- I use the script from this Listening for Youtube Event in JavaScript or jQuery link for capture the youtube event.
In this part of code we have all events of youtube player.
function stopCycle(event) {
alert("onStateChange has fired!\nNew state:" + event.data);
}
How can I capture only the first play of player?