css - jquery.countdown.css
js - jquery.countdown.js
html - index.html
My goal is to have a YT video switch on two conditions
1) if the page is loaded before the timer hits zero. When the timer reaches zero -switch-
2) if the page is loaded AFTER the timer hits zero then immediately -switch-
var expire_date = '+10s'; // new Date(2011, 4-1, 4, 17, 13); // expiration time: new Date(Year, Month, Day, Hour, Min, Sec)
This line (html) controls when the timer expires. Right now it's set to 10 seconds from page load. At this setting everything works perfectly. If you change it to use the date variable instead then it works partially. As long as the date is in front of you it works. If the date has passed nothing happens to the video.
I've tried this from every angle and I seem to have narrowed my problem down to the YT code I have. In the html if you switch some code around line 49:
function change_video() {// ytid = next_vid;// player.cueVideoById(ytid);alert('We have lift off!');}
If you comment out these lines of code then again everything works as fine.. only the action is just an alert and not anything to do with the video. The alert bings when the timer hits zero. the alert bings if the timer has already passed. Everything works fine on my site unless someone reloads or arrives late. They're watching the old video until I get in there and manually update.
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment