5 Replies Latest reply on May 7, 2010 7:36 AM by rjspring

    Help creating Proxy Plugin for an Ad SWC


      I'm trying to create a plugin for an ad component, where ad video playback is all handled in a SWC.


      I took the OSMSPlayer example, and modifed the constructor to load my plugin using the players factory object, and once loaded, I continue with the player setup and configuration.  There doesn't seem to be a problem here, everything loads fine.


      I then proceeded to create a proxy plugin.


      Within ProxyElement, when set proxyElement is called, I create a SerialElement, and add the passed mediaElement as the first child of the SerialElement.


      I then add a loadTrait to the proxyElement, and listen for the LoadEvent.LOAD_STATE_CHANGE event.  When this is fired, I insert a MediaElement (preroll), which has a PlayTrait, DisplayTrait, TimeTrait and AudioTrait, as the first child of the proxied serialElement, and call play.  The preroll video plays fine, i hear audio and see the time updates in the player, but the video is not visible.  If I then pause the video, it suddenly appears, and is visible for the remainder of the clip.  Once the preroll is complete, the orginal mediaElement plays fine.


      I followed the MASTPlugin example, as I am trying to do something similar, except my video playback is handled via a SWC (added to the DisplayTrait).  If I just insert a plain VideoElement as the preroll and load a flv it plays fine, so its something specific to my MediaElement impl, but I can't figure out why it doesn't display until I hit pause.


      Any help would be greatly appreciated, I've already burned hours trying to figure this out.


      Also, looking at the use case chart below, I probably actually need to create a reference plugin.  Does anyone have an example of a reference plugin?


      http://help.adobe.com/en_US/OSMF/1.0/Dev/WSc6f922f643dd2e6d-12f30d7b1262b59cb0d- 7ffe.html