我已经在我的 Corona 游戏中集成了 Vungle 视频广告,它运行良好,但几天前它完全停止了缓存视频广告,但几天后它自己盯着它看,没有改变任何代码。现在它再次停止缓存视频广告。我怀疑这个问题来自 Corona 或 Vungle,但我不确定。
local vungleInterstitial = "540e9681c7ec2b6d4400000e"
local videoCompletedCallback=nil
videoAddListener=function( event )
if (event.isError ) then
--Cached video ad not available for display
print("problem to show ad")
elseif event.type == "cachedAdAvailable" then
print("cachedAdAvailable")
elseif tostring(event.type) == "adView" then
print("called when add is viewed")
elseif event.type == "adStart" then
print("Corona ads started")
audio.pause()
elseif event.type == "adEnd" then
print("Corona ads ended")
videoCompletedCallback()
audio.resume()
end
end
showVideoAd = function(callbackFunc)
print("showVideoAd function called")
videoCompletedCallback=callbackFunc;
if ( vads.isAdAvailable() ) then
print(" if ( vads.isAdAvailable() ) then, is true")
print("vads.show")
vads.show( "interstitial", { isBackButtonEnabled = false } )
else
local alert = native.showAlert( "Video Ad", "The Video Ad is not available at the moment. Please Try after some time.", { "OK" } )
end
end
vads.init("vungle",vungleInterstitial,videoAddListener)