@nativescript/google-mobile-ads
Version:
NativeScript Google mobile Ads
46 lines (45 loc) • 1.55 kB
TypeScript
import { ContainerView, ContentView, CoreTypes, Property, View } from '@nativescript/core';
import { AdEventType } from '../common';
import { IMediaContent, INativeAd } from '.';
export declare abstract class NativeAdViewBase extends ContentView {
abstract adChoicesView: View;
abstract advertiserView: View;
abstract bodyView: View;
abstract callToActionView: View;
abstract headlineView: View;
abstract iconView: View;
abstract imageView: View;
abstract mediaView: MediaViewBase;
abstract nativeAd: INativeAd;
abstract priceView: View;
abstract starRatingView: View;
abstract storeView: View;
}
export declare const stretchProperty: Property<MediaViewBase, CoreTypes.ImageStretchType>;
export declare const mediaContentProperty: Property<MediaViewBase, IMediaContent>;
export declare class MediaViewBase extends ContainerView {
mediaContent: IMediaContent;
stretch: CoreTypes.ImageStretchType;
}
export declare enum VideoStatus {
Unstarted = 0,
Playing = 1,
Paused = 2,
Ended = 3
}
export declare enum MediaAspectRatio {
LANDSCAPE = "landscape",
PORTRAIT = "portrait",
SQUARE = "square",
ANY = "any"
}
export declare enum AdChoicesPlacement {
TOP_LEFT = "topLeft",
TOP_RIGHT = "topRight",
BOTTOM_RIGHT = "bottomRight",
BOTTOM_LEFT = "bottomLeft"
}
export declare enum NativeAdEventType {
LOADED = "native_ad_loaded"
}
export type NativeAdEventListener = (type: AdEventType | NativeAdEventType, error?: Error, data?: any | INativeAd) => void;