It's not possible for a single instance of the YouTube player to show
multiple YouTube videos at once.
If you don't need to support the option of playing multiple videos at
once, the you could probably work out a system in which you only
embedded the YouTube player once and then used the Player API to load
the appropriate video for playback in that player instance in response
to a user navigating your site. Maybe you'd want to position the
player so that it's always visible, even when the user has scrolled
down in your site. It's up to you.
http://code.google.com/apis/youtube/js_api_reference.html
Cheers,
-Jeff Posnick, YouTube API Team
~ YouTube is hiring! ~ http://google.com/jobs/workyoutube ~
On Mar 2, 1:43 pm, nicotroia <nicotr...@gmail.com> wrote:
> I run a blog that features content from youtube. The front page can have a
> maximum of 10 youtube players up at any one time, and for that to load, it
> has become painfully slow, upwards of 40 seconds to load an entire page! So
> now i have begun my search for optimization. Firebug's net tab shows a lot
> of activity such as GET crossdomain.xml from ytimg.com (which i assume is
> grabbing the content for thumbnails).
>
> Would there be a way to download one instance of the youtube player and
> reuse it for every embed on the page, rather than downloading it each time?
>
> I would be using the iFrame API (although im not sure if this method is any
> faster) but i'm not understanding how to dynamically embed iFrames (since
> the iFrame API seems to work differently and waits for the API to load to
> call an onReady event handler, rather than each player object calling the
> handler itself)
>
> Thanks for the help!
--
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