UNPKG

capacitor-unity-ads

Version:

Capacitor plugin for Unity Ads integration with support for rewarded video and interstitial ads

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