UNPKG

capacitor-meta-ads

Version:

Capacitor plugin for Meta Audience Network ads integration with support for rewarded video and interstitial ads

59 lines (52 loc) 2.19 kB
var capacitorMetaAds = (function (exports, core) { 'use strict'; const MetaAds = core.registerPlugin('MetaAds', { web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MetaAdsWeb()), }); class MetaAdsWeb extends core.WebPlugin { async initialize(options) { console.log('MetaAds Web: initialize', options); // Web implementation not available for Meta Audience Network throw new Error('Meta Audience Network is not available on web platform'); } async loadRewardedVideo(options) { console.log('MetaAds Web: loadRewardedVideo', options); throw new Error('Meta Audience Network is not available on web platform'); } async showRewardedVideo() { console.log('MetaAds Web: showRewardedVideo'); throw new Error('Meta Audience Network is not available on web platform'); } async isRewardedVideoLoaded() { console.log('MetaAds Web: isRewardedVideoLoaded'); return { loaded: false }; } async loadInterstitial(options) { console.log('MetaAds Web: loadInterstitial', options); throw new Error('Meta Audience Network is not available on web platform'); } async showInterstitial() { console.log('MetaAds Web: showInterstitial'); throw new Error('Meta Audience Network is not available on web platform'); } async isInterstitialLoaded() { console.log('MetaAds Web: isInterstitialLoaded'); return { loaded: false }; } async setTestMode(options) { console.log('MetaAds Web: setTestMode', options); // No-op on web } async addTestDevice(options) { console.log('MetaAds Web: addTestDevice', options); // No-op on web } } var web = /*#__PURE__*/Object.freeze({ __proto__: null, MetaAdsWeb: MetaAdsWeb }); exports.MetaAds = MetaAds; return exports; })({}, capacitorExports); //# sourceMappingURL=plugin.js.map