capacitor-unity-ads
Version:
Capacitor plugin for Unity Ads integration with support for rewarded video and interstitial ads
41 lines • 1.59 kB
JavaScript
import { WebPlugin } from '@capacitor/core';
export class UnityAdsWeb extends 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' };
}
}
//# sourceMappingURL=web.js.map