Gateways have been renamed containers with sprint 9. We currently support two types of containers:
- MediaContainer: used to route a media element onto Flash's stage. There's a sample at http://opensource.adobe.com/svn/opensource/osmf/trunk/apps/samples/framework/HTMLMediaCont ainerSample
But What i would really need is that the plugin itself puts the visualElement on the stage. Would be great if all the classes ( view and logic ) could remain inside the plugin only and loaded as needed.
For example, as soon as I load an ad plugin, this adds a custom mediaElement on the stage, and I can start showing ads as I want to. I just get lost at the time of putting this on the stage.
What I don't want is to use to player wrappers or components above the player. Looking at your code, seems the best approuch should be to convert the current videoElement to a ParallelElement, putting the video inside together with the adElement, which bring me to a little more confusion because following this practice can bring a very complex structure in case of loading a growing amount of plugins.
I do not know if I explained well..
Thanks for your help BTW.
To put your custom media element loaded from a plugin on the stage, you can use a MediaContainer object:
adContainer.width = 468;
adContainer.height = 60;
addChild(adContainer); // assuming we're on a Sprite.
The video element can be in its own container:
videoContainer.width = 468;
videoContainer.height = 60;
Regardless of wheter or not the adElement and videoElement are in a parallel element together, each indiviual view will appear in the assigned container.
Does that anwer your question?
I just added a doc file explaining what we are trying to do. This doc may be useful for any developer of OSMF, so feel free to read it, or correct us if we are wrong in any aspect.
Architecture idea.doc 96.5 K
1 person found this helpful
What you're proposing seems feasible. On the plugin loading side, you might want to take a look at the ControlBarPlugin sample app:
This shows you how to load a plugin that displays the video control bar. Presumably you could carry this concept a bit further and have separate plugins for the comments track, control bar, etc.