0 Replies Latest reply on Nov 2, 2011 7:03 AM by johnnicholas

    reusing AdvertisementPlugin

    johnnicholas Level 1

      I'm experimenting with using the AdvertisementPlugin and having some issues . My project is more than a player, it has a video window and a larger interface for selecting videos. The code below is basically from the sample code and works fine for the first video.


      adPluginResource = new PluginInfoResource(new AdvertisementPluginInfo());

      adPluginResource.addMetadataValue("MediaPlayer", _mediaPlayer);

      adPluginResource.addMetadataValue("MediaContainer", _mediaContainer);

      adPluginResource.addMetadataValue("preroll", "http://gcdn.2mdn.net/MotifFiles/html/1379578/PID_938961_1237818260000_women.flv");

      _mediaFactory.loadPlugin( adPluginResource );


      If I select another video then it plays with no preroll. I haven't been able to figure out how to update the plugin data for the next video.


      If no one knows the answer to this specific question, pointers on how the plug lifecycle works might point me in the right direction.