Rewarded Video Manual Integration for Adobe Air
In addition to loading ironSource rewarded video ads automatically, you can also set rewarded video ads to load manually. To do this, you must set the entire session loading mode prior to SDK initialization. This is supported from ironSource SDK 7.2.0+. (Beta 7.1.13 Android).
Step 1. Implement the Rewarded Video Manual Events
The ironSource Adobe Air plugin fires events to inform you of ad availability. These events will be triggered only upon manual rewarded video implementation.
Add the following code to register to the events, in addition to the Rewarded Video events.
// Rewarded Video - manual load events
// Indication that the rewarded video ad was loaded successfully
IronSource.instance.addEventListener("ManualRewardedVideoAdReady", ManualRewardedVideoAdReady);
// Indication that the rewarded video ad was not loaded successfully
IronSource.instance.addEventListener("ManualRewardedVideoAdLoadFailed", ManualRewardedVideoAdLoadFailed);
Events with AdInfo
As part of ironSource SDK 7.2.3 you can use a new set of listeners to get more data in ad callbacks, including network, segment, and A/B indication.
When using these listeners, we recommend you unregister from any other rewarded video listeners, to avoid any data duplications.
When you’re implementing manual load of rewarded video, use the following events instead:
IronSource.instance.addEventListener("levelPlayManualRewardedVideoAdReady", levelPlayManualRewardedVideoAdReady);
IronSource.instance.addEventListener("levelPlayManualRewardedVideoAdLoadFailed", levelPlayManualRewardedVideoAdLoadFailed);
IronSource.instance.addEventListener("ManualRewardedVideoAdReady", ManualRewardedVideoAdReady);
IronSource.instance.addEventListener("ManualRewardedVideoAdLoadFailed", ManualRewardedVideoAdLoadFailed);
The Plugin will notify the Listener of all possible events listed below:
private function levelPlayManualRewardedVideoAdReady(event:Event):void {
//level Play Manual Rewarded Video Ad Ready
}
private function levelPlayManualRewardedVideoAdLoadFailed(event:Event):void {
//level Play Manual Rewarded Video Ad Load Failed
}
private function ManualRewardedVideoAdReady(event:Event):void {
//Manual Rewarded Video Ad Ready
}
private function ManualRewardedVideoAdLoadFailed(event:Event):void {
//Manual Rewarded Video Ad Load Failed
}
Step 2: Set up rewarded video manual loading
Set the operation mode for rewarded video ads before you initialize the ironSource SDK. This will affect your current session.
IronSource.instance.setManualRewardedVideo();
Step 3: Manually load rewarded video ads
Request a rewarded video ad d before you plan on showing it to your users as the loading process can take time. Use the following API to load your ad:
IronSource.instance.loadManualRewardedVideo();
Done!
After defining your operation loading mode to Manual, you can complete your Rewarded Video integration, as described here.