提交 defa29fc 编写于 作者: d-u-a's avatar d-u-a

update:增加getProvider方法获取广告服务商,增加服务器验证回调事件

上级 8b6a0e87
...@@ -35,6 +35,9 @@ class RewardedVideoAd { ...@@ -35,6 +35,9 @@ class RewardedVideoAd {
this._loadAd() this._loadAd()
this._dispatchEvent('close', { isEnded: e.isEnded }) this._dispatchEvent('close', { isEnded: e.isEnded })
}) })
rewardAd.onVerify((e) => {
this._dispatchEvent('verify', { isValid: e.valid })
})
rewardAd.onError((e) => { rewardAd.onError((e) => {
const { code, message } = e const { code, message } = e
const data = { code: code, errMsg: message } const data = { code: code, errMsg: message }
...@@ -68,6 +71,9 @@ class RewardedVideoAd { ...@@ -68,6 +71,9 @@ class RewardedVideoAd {
} }
}) })
} }
getProvider () {
return this._rewardAd.getProvider()
}
_loadAd () { _loadAd () {
this._isLoad = false this._isLoad = false
this._rewardAd.load() this._rewardAd.load()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册