Of course, it's a swf around a flv. This makes a bit more sense now.
My guess is that the size of the flv _will_ vary, after all there are
lots of different video formats. The YouTube shell is going to have its
own internal algorithms for computing the scaling of the flv and the
placement of the nav bar. These factors will determine the resulting
"opaque" area.
I'm still a bit confused though, because I'm wondering where does the
YouTube shell get its information about size of the stage within which
it resides, if not from stage.stageWidth/Height. Typically a YouTube
shell would get loaded into an html page and the embed tags would
specify the size and scaling options for the video. The standard
YouTube supplied embed tags specify a size of 425x344, but I just did a
test, editing the tag for both a smaller and a larger rect: the video
gets scaled accordingly. So, it looks like the YouTube shell is
dynamically scaling depending on the size of the stage within which it
resides. However, when I wrap it in my own shell, it always gets
displayed at 480x385.
Of course, my intent isn't to obsess about how YouTube videos get
displayed, but rather to tackle the generalized problem: A user
supplies the url (or embed code) for some arbitrary content that they
want to include in their own presentation (e.g. a quiz). It's easy
enough to parse out the url of the content and load it into the
presentation swf. The difficult part is figuring how to size the loaded
swf to fit within a predefined layout. Some swfs should be
cropped/masked to their "nominal" size and then scaled to fit the
layout. Some swfs contain internal scaling functions that will reflect
the stage size of the presentation swf. Other swfs don't fit nicely
into either of these categories.
Ian Thomas wrote:
Hi Andrew,
As far as I remember, the YouTube .swf is a shell around an .flv.
So the dimensions of the shell .swf may bear absolutely no
resemblance at all to the size of the contained video; and off-hand, I
can't think of a way to get at the contained video size. But aren't
they all consistent in YouTube - I mean - does it ever vary?
In other words, I think your loaderInfo.width and loaderInfo.height
are correct _for the Youtube shell .swf_ - but it, in turn, contains
an FLV, and you have no way to get at that scaling.
I'm just guessing here. :-) But AFAIK, loaderInfo.width and .height
are correctly returning the width and height encoded into the SWF
header. They do give you the stage size.
Ian
On Tue, Oct 7, 2008 at 1:39 PM, Andrew Sinning <[EMAIL PROTECTED]> wrote:
Hi Ian,
Some of what I'm seeing is that quite a few of the swfs that I happen to be
loading contain their own internal scaling functions. Most typically I'm
seeing are swfs that automatically scale to stage.stageWidth and
stage.stageHeight. This is for the most part easy to detect, but there are
some timing issues -- the scaling doesn't happen right away.
A different issue that I'm seeing is with the videos on YouTube. The
expectation is that end users will want to appropriate YouTube videos in
their own content. Here are two randomly selected addresses parsed out of
the embed tags:
url = 'http://www.youtube.com/v/PbeMwl_PA6A&hl=en&fs=1'
url = 'http://www.youtube.com/v/Jag7oTemldY&hl=en&fs=1'
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders