/// import { IProvider } from './ad-provider'; import { AdType, H5AdWrapper } from '../h5-ad-wrapper'; export interface ICustomParams { [name: string]: string | number | any[]; } export declare class Ima3 implements IProvider { private gameContent; private adContent; private adDisplay; private adLoader; private adsManager; private googleEnabled; adsEnabled: boolean; private adTagUrl; private adRequested; adManager: H5AdWrapper; private resizeListener; constructor(canvas: HTMLCanvasElement, adTagUrl: string); setManager(manager: H5AdWrapper): void; /** * Doing an ad request, if anything is wrong with the lib (missing ima3, failed request) we just dispatch the contentResumed event * Otherwise we display an ad */ showAd(adType: AdType, customParams?: ICustomParams): void; adAvailable(adType: AdType): boolean; preloadAd(): void; destroyAd(): void; hideAd(): void; /** * Called when the ads manager was loaded. * We register all ad related events here, and initialize the manager with the game width/height * * @param adsManagerLoadedEvent */ private onAdManagerLoader; /** * Generic ad events are handled here * @param adEvent */ private onAdEvent; private onAdError; /** * When the ad starts playing, and the game should be paused */ private onContentPauseRequested; /** * When the ad is finished and the game should be resumed */ private onContentResumeRequested; private parseCustomParams; /** * Checks if the ads are enabled (e.g; adblock is enabled or not) * @returns {boolean} */ private areAdsEnabled; }