Home > Youtube, Youtube Wrapper > Youtube AS3 Wrapper – Multiple instances sample

Youtube AS3 Wrapper – Multiple instances sample

March 27th, 2009

The test video player is a flex application using Youtube AS3 Wrapper.
You can download the latest files for both the wrapper and the test player HERE.

This player demonstrates the latest wrapper’s capabilities, that to play multiple videos in the same time on the same stage.

Alternative content

Get Adobe Flash player


To start playing a video, click one title on the right playlist or copy and paste a youtube video id (or entire link) in the Custom youtube input text field and click Load.
Here is one instance of the test harness:

You need javascript enabled!

Here is another instance of the harness player:

You need javascript enabled!

And yet another one if you wish:

You need javascript enabled!
DeliciousFacebookMySpaceStumbleUponDiggLinkedInRedditShare

admin Youtube, Youtube Wrapper , , , ,

  1. howard
    July 4th, 2009 at 07:24 | #1

    hi,
    what exactly does “multiple” mean? to play many video, one at a time?
    is it possible to play multiple “different” videos in “one” flash at the same time like this http://www.perkstoveland.com/archives/40 ? thx!

  2. July 4th, 2009 at 10:33 | #2

    Hi,
    Multiple means that multiple instances of a player can be embedded in the same html page.
    You cannot play multiple videos in the same time on the same flash. However you can play multiple video in the same time but in different flash files, like in the example in this post.
    However there is one more limitation: you cannot play the same video in the same browser twice or more in the same time. That’s a limitation from the youtube streaming server.
    You can also play any number of videos in the same flash, but one at a time.

  3. howard
    July 4th, 2009 at 22:46 | #3

    ya that’s what i figure :)
    just wondering, can you figure out how this is done? (same reference as above) http://www.perkstoveland.com/demos/youtube.swf
    that’s exactly an example of “multiple videos” in “same flash” playing at the same time, and the author claims it uses his customized wrapper with diff ids, I’ve tested and it’s true. However I can’t manage to write up such a wrapper myself (after testing only one video is able to play at a time) any idea?

  4. July 5th, 2009 at 15:48 | #4

    Hmm, I can’t figure out how is that done, but I will look into a new version of the wrapper to support what you’re looking for when I have the time.
    I’ll keep you posted when any update is available.

  5. July 12th, 2009 at 23:34 | #5

    I would like to announce the new Youtube AS3 Wrapper v0.8.0m.
    This new version of the wrapper support multiple videos in the same time on the same stage.
    A sample has been added in Youtube AS3 Multiple Instances Sample.
    Enjoy!

  6. Wenhu
    September 20th, 2009 at 23:35 | #6

    have you tried this page/player in safari? it does not work in safari and works in firefox. i am using safari 4 on mac os snow lepoard

  7. September 21st, 2009 at 11:02 | #7

    Actually for me it doesn’t work in either browser. That’s because there is a problem in flash player for mac that affects LocalConnection objects. The player doesn’t work right now because I was playing with isPerUser property (added in the latest flash player, usable only for mac, with no effect on other operating systems, which is supposed to fix the problems with local connections, but unfortunately it doesn’t, it actually makes things worse) which you can see for your self, it totally renders the player useless.
    However the versions of the wrapper available for download will work (until you refresh your page a few times).

  8. Gerrit
    March 10th, 2010 at 02:28 | #8

    @admin

    Is there really no way around this limitation of the youtube streaming server?
    Is there any documentation on this?

    Thanks

  9. March 11th, 2010 at 17:38 | #9

    I’m not sure of which limitation are you talking about?

  1. March 30th, 2009 at 23:21 | #1