You Ready To Go Gung HO? A Hotshot Challenge
In this project we're simply providing links back to a full-screen video player for each video on the YouTube site. So when the visitor clicks on a video thumbnail or title, they'll be sent off to YouTube to actually watch the video.
While there's nothing inherently wrong in doing this, a much cooler thing to do would be to open up a lightbox containing a video player embedded in an <iframe>
. This would let the visitor view the video without ever leaving your site. The response from YouTube for the videos contains a link that can be used as the src
attribute of an <iframe>
, so why not see if you can hook this up yourself?
You'll notice that if you scroll to the bottom of the page, but then carry on scrolling down immediately, the same set of videos are requested multiple times. As an alternative task, see if you can prevent this from happening by only requesting more data if there is not currently a request in progress.
This should be...