Я хотел бы создать приложение Cordova для показа рекламы Rewarded Video Ad
Я пробовал следующий код, но не работал
Код Javascript
showRewardedVideoAd = function () {
AdMob.showRewardVideoAd({
onRewarded: (reward) => {
console.log("onRewarded");
this.message = "watched rewarded video";
},
onRewardedVideoAdFailedToLoad: () => console.log("onRewardedVideoAdFailedToLoad"),
onRewardedVideoAdLeftApplication: () => console.log("onRewardedVideoAdLeftApplication"),
onRewardedVideoAdClosed: () => console.log("onRewardedVideoAdClosed"),
onRewardedVideoAdOpened: () => console.log("onRewardedVideoAdOpened"),
onRewardedVideoStarted: () => console.log("onRewardedVideoStarted"),
onRewardedVideoCompleted: () => console.log("onRewardedVideoCompleted"),
}).then(
function() {
alert("RewardedVideoAd showing");
},
function(error) {
alert("admob showRewardedVideoAd error: " + error);
}
)}
showRewardedVideoAd();
любойидея ?? Спасибо