« Come Work at Brightcove | Main

Lessons Learned with StageVideo

Last week, along with the release of Flash Player 10.2, Brightcove released a page showing off the Brightcove player using StageVideo.

Here's the lessons I learned from working with StageVideo:
  • Getting started with StageVideo is fairly simple. The article on getting started spells things out well, and while the StageVideo object is quite different from the regular Video object, it's not hard at all to use.
  • Things can get tricky when using StageVideo with a complicated player given the fact that StageVideo sits below all objects on the display list. If you had your Video object added on top of a complicated display, you'll need rework this.
  • You can use StageVideo in a player that doesn't require Flash Player 10.2 Try loading the Brightcove player page in a browser using an older version of the Flash Player to see this- it can even be loaded with Flash Player 9. This isn't done too easily but can be managed with loading the StageVideo code in its own SWF as needed.
  • The StageVideo numbers are impressive, as shown in the link above. I heard more than one person surprised at how much it knocked down the processing power needed on their machine.

Comments (4)

I agree if your not using a built in class and starting from scratch check out this vid. It is a tutorial style how to , steps needed and why to get things rolling:



"it can even be loaded with Flash Player 9"

Hmm, interesting.

I wasn't able to do that when loading SFW compiled for Flash 10.2 with references to stage.stageVideos into SWF compiled for Flash 9 and run in Flash 10.3 plugin. Although StageVideo class reference could be attained via getDefinitionByName().

How do you think it is done by Brightcove?

Thank you.


To my previous post...

What I meant was that yes, I can load SWF compiled for Flash 10.2 into SWF compiled for Flash 9. All code works fine as long as there are no calls to API that is not supported by Flash 9 AS3 library objects.

In other words, in SWFs compiled for Flash 9 an older version of Stage class is instantiated - thus there is no way to get Vector of stage videos.

It seems like Brightcove just falls back onto conventional Video instance in cases when player is loaded into SWFs compiled for Flash 9.

Hi Andrei, to be clear the example does not work if you are using Flash Player 9 but rather that the base SWF we use is targeting Flash Player 9 while all of the pieces needed for StageVideo can be compiled into a SWF that is loaded targets Flash Player 10.2. Although, actually, that's no longer the case. We now load a different base SWF based on what's needed due to some issues we saw (unrelated to StageVideo) when using the setup described. So that point is completely moot.