Before starting this chapter, be sure that you already finished SDK settings. If not, check 5) Unity Settings first. For video Ad, you have to load a video Ad by invoking prepareVideoAd() method and showVdieoAd() to play it. Once you have invoked prepareVideoAd() method, next video Ads are being loaded automatically at background task. [Loading a Video Ad] Once your app has started, you have to call initialization method as belows. To load a video Ad, you have to invoke prepareVideoAd() method of TnkAd.Plugin. First parameter is the name of Display Logic. (See 5) Display Logic for detail) and second parameter is the name of EventHandler. (See B. EventHandler for detail.) EventHandler is used for receiving events of video loading. [EventHandler] By EventHandler, you can get events releated to video Ad such as loading completion and closing video ad and can implements any logics you need for each events. EventHandler is also used for getting result from async invocations such as querying points and withdrawing points and used for getting events from interstitial Ads and video Ads. See [EventHandler] for detail. Events related to video Ads are as followings.
[Video Ad Sample] [Video Ad APIs] - TnkAd.Plugin - prepareVideoAd() Method - void prepareVideoAd() - void prepareVideoAd(string logicName) - void prepareVideoAd(string logicName, string handlerName) Description Load a video Ad. Once the video ad is loaded, you can play it by invoking showVideoAd() method. Parameters
- TnkAd.Plugin - prepareVideoAdOnce() Method - void prepareVideoAdOnce(string logicName, string handlerName) Description Load a video Ad just once. If you want to load a video again, you have to invoke this API again. Once the video ad is loaded, you can play it by invoking showVideoAd() method. If loading a video has failed, onFailure() Event is invoked. Parameters
|
6. Video Ad >