Main | Tune Your Flex Builder Java VM Settings »

June 08, 2008

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e552badf4c883300e552ffdac18833

Listed below are links to weblogs that reference Embed The YouTube Chromeless Player In Your Flex Application:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Paulo Fierro

Well that just saved me a days work. Thanks! :)

zdravko

Garth,

On the YT forum I posted a comment about the scaling of the watermark with the link to your demo. If Geoff is correct then could you please fix the demo ;?)

From: "Geoff Stearns"
The new scaling code should never make the watermark larger than it's
original size. If you are seeing the logo get very large, it's likely that
someone has loaded the player into a swf and set the size by changing the
scale of the entire chromeless swf rather than calling setSize() via the
api.

zdravko

Garth,

On the YT forum I posted a comment about the scaling of the watermark with the link to your demo. If Geoff is correct then could you please fix the demo ;?)

From: "Geoff Stearns"
The new scaling code should never make the watermark larger than it's
original size. If you are seeing the logo get very large, it's likely that
someone has loaded the player into a swf and set the size by changing the
scale of the entire chromeless swf rather than calling setSize() via the
api.

zdravko

Garth,

On the YT forum I posted a comment about the scaling of the watermark with the link to your demo. If Geoff is correct then could you please fix the demo ;?)

From: "Geoff Stearns"
The new scaling code should never make the watermark larger than it's
original size. If you are seeing the logo get very large, it's likely that
someone has loaded the player into a swf and set the size by changing the
scale of the entire chromeless swf rather than calling setSize() via the
api.

dehash

Garth,
Nice example code. We have made a youtube feed display @
http://www.dehash.com/?p=75
Will clean it up and release the source soon. May be able to make it able to be integrated with your player if you need it.

-dehash

lipo2000

Thanks for nice and useful post! Unfortunately right now the demo is not available and there is nothing to download. Is it possible to repost it? Thanks in advance!

Garth Somerville

@lipo2000 Thanks for pointing this out, it should be fixed now.

@dehash Nice work on the feed display. It would go nicely with a player ;-)

@zdravko It is easy to change the code I provided to call setSize(). Just set scaleContent=false and then call setSize() whenever the size of the SWFLoader changes. I intend to update this demo with a couple of changes, and this is one of them. I will have a few thoughts on how best to handle resizing.

dehash

Hi Garth

@garthNice work on the feed display. It would go nicely with a player ;-)
Thanks. It is really simple for now but works ok.
The source code is now available and should work fine with your player, let me know it does not.

You can download the source code here http://www.dehash.com/?p=75

-dehash

Rob Heittman

Thanks for simplifying this and providing the appropriate SWF workaround artifacts. I've cast about for a couple days looking for a good "pure Flex 3 to chromeless YT player" solution and yours was a quick drop-in. Thanks for also not complicating the example with unrelated YT Data API cruft.

laurent

Hello,
I'm really interested by your solution but how can I download zip file containing ytbridge.swf ?
Thanks in advance.
Laurent

Laurent

I've found answer to my question. Sorry ! :D

George

Hello Garth,

I am coming across this exception "ArgumentError: Error #2082: Connect failed because the object is already connected."

Is there a good way to close the connections properly, while closing the browser?

is there a facility like unloading a flex application?

Thanks for your efforts.

George

Leon

Thanks for this, a great example and really helped us.

Steve

Thanks Alot! how do I listen for status changes? for example video ending? instead of checking for YTPlayer.ENDED , how do I setup a listener for a playerState change?

Calvin

I downloaded the code & everything works great... except when I run it in the debug mode, I get the following error. Any idea what it might be?

Error #2044: Unhandled StatusEvent:. level=error, code=

oriol

Hello, it looks great but when loading a second window at the same time using your URL example (http://otoh.typepad.com/on_the_other_hand/files/flex-youtube/YouTubeTest.html) it reports an error: ArgumentError: Error #2082: Connection fail. The Object is alrerady connected) Any ideas??

lf

I'm trying to do this as an Air desktop app rather than in Flash. However onPlayerLoaded, onChannel, etc. never get called. I see a console message that indicates that ytbridge.swf is loaded. It works fine in Flash. Any ideas?

lf

Error #2082 that people are seeing is due to the fact that the flex app listens on a fixed channel name.

marc

Hi,
First of all thanks for this post. Everything works great when I test in on my localhost, but whenever I try to upload id on my website, I get a 'broken image' instead of the video on the 'YTPlayer' component.
Any ideas ? I created a youtube api developper key but it's still not working. Thanks for your help.

Tom

Hi,

same here: I can't use it in multiple browsers at the same time (object already connected...) and get a broken image instead of the component... Anybody solve these problems?

Tom

Ok fixed the broken image, but still can't seem to run it in multiple browsers...

Garth Somerville

Tom, as lf said, multiple instances of the demo player do not work because I initially used a single, fixed local connection for messages from the bridge to the Flex app. I have already fixed this and I will try to post an update this week. I have been incredibly busy and have not had time to take this further, not to mention write about all the other interesting Flex topics I have queued up!

Chris Black

Great post. Has anybody tried this AS3/Flex library for controlling the YouTube AS2 Player?

http://code.google.com/p/tubeloc/

There has been a lot of interest on this topic recently. Hopefully YouTube will create a AS3 player soon and make life easier for everyone :)

Chris

HI all... i have this running currently on an application of mine, with 1 flaw... if there is a video playing another cannot be initialized. this is similar to the comment that Tom has added. I made sure that the local connection names are unique... so i think it has something to do with the api? Even if i grab the url to the flv and paste it into another browser it wont start downloading until i kill the previous window... bugs me out .... has anyone had any success displaying multiple videos?

nils

Hello All,
I tried to just rebuild ytbridge.swf and use as it is (without any changes) and found that video doesn't really load. But if I use as it is (without compiling), things works. Any clue what must be happening ?

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment