No results found

Ad SWC will be compatible with Player API SWC

Until recently, ad feature developers have been unable to use the BrightcovePlayerAPI.swc for API code hinting and strong typing while developing ad display SWFs, ad translators and ad rules SWFs . Developers using both BrightcovePlayerAPI.swc and bc_ads.swc reported seeing various run-time errors during ad feature load, which made developing using both SWC files impossible. The workaround was to refrain from strong-typing variables or casting and, instead, type all API module references as generic objects.

Brightcove is happy to announce that developers will soon be able to successfully use both SWCs in their ad feature development, making developing much faster and easier. An update to our players in the near future will eliminate the incompatibility between the ad SDK SWC and the Player API SWC. All the ad SDK examples in will updated to include the BrightcovePlayerAPI.swc, which should help answer questions you might have about usage. If you want to refactor your existing ad feature to work with the BrightcovePlayerAPI.swc, then you will just add the SWC to your library path in your Flex project (or drop it into the same folder as your .fla) and you should be ready to go!

For example, once you've included both SWCs in your project, the following code may go from this:

var advertisingModule:Object = adContext.moduleLoader.getModule("advertising");

to this:

var advertisingModule:AdvertisingModule = adContext.moduleLoader.getModule(APIModules.ADVERTISING)
 as AdvertisingModule;

Note: All ad integrations that continue with generic objects will still work fine in the Brightcove player. Adding the BrightcovePlayerAPI.swc to your project may just help make future work easier and more efficient.