thirdVideo.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. require("./AnyThinkAds/ATRewardedVideoJSSDK");
  2. require("./AnyThinkAds/ATJSSDK");
  3. require("./AnyThinkAds/ATInterstitialJSSDK");
  4. require("./AnyThinkAds/ATNativeJSSDK");
  5. require("./AnyThinkAds/ATBannerJSSDK");
  6. var thirdVideo = cc.Class({
  7. name: "thirdVideo",
  8. proxy: null,
  9. toponId: '',
  10. toponKey: '',
  11. rewardPlaceId: '',
  12. interPlacementId: '',
  13. nativePlaceId: '',
  14. newCarNativePlaceId: '',
  15. fullInterPlacementId: '',
  16. bannerPlaceId: '',
  17. curPlacementId: '',
  18. curNativeId: '',
  19. frameWidth: 0,
  20. frameHeight: 0,
  21. nativeIsShow: false,
  22. nativeType: 0,
  23. nativeShow: false,
  24. nativeIsLoad: false,
  25. nativeIsLoading: false,
  26. interType: 0,
  27. // timeID: 0,
  28. bannerIsShow: false,
  29. // 启动
  30. ctor: function () {
  31. },
  32. initATJSSDK: function (channel) {
  33. console.log("Main Scene start.......")
  34. ATJSSDK.setLogDebug(false);
  35. var customMap = {
  36. "appCustomKey1": "appCustomValue1",
  37. "appCustomKey2": "appCustomValue2"
  38. };
  39. ATJSSDK.initCustomMap(customMap);
  40. // ATJSSDK.setChannel(channel);
  41. var placementCustomMap = {
  42. "placementCustomKey1": "placementCustomValue1",
  43. "placementCustomKey2": "placementCustomValue2"
  44. };
  45. ATJSSDK.setPlacementCustomMap(this.rewardPlaceId, placementCustomMap);
  46. if (cc.sys.os === cc.sys.OS_IOS) {
  47. ATJSSDK.initSDK("a5b0e8491845b3", "7eae0567827cfe2b22874061763f30c9");
  48. } else if (cc.sys.os === cc.sys.OS_ANDROID) {
  49. ATJSSDK.initSDK(this.toponId, this.toponKey);
  50. }
  51. ATJSSDK.getUserLocation(function (userLocation) {
  52. ATJSSDK.printLog("getUserLocation callback userLocation :" + userLocation);
  53. if (userLocation === ATJSSDK.kATUserLocationInEU) {
  54. if (ATJSSDK.getGDPRLevel() === ATJSSDK.UNKNOWN) {
  55. ATJSSDK.showGDPRAuth();
  56. }
  57. }
  58. });
  59. },
  60. init: function (toponId, toponKey, rewardPlaceId, interPlacementId, nativePlaceId, fullInterPlacementId, bannerPlaceId, channel) {
  61. this.toponId = toponId
  62. this.toponKey = toponKey
  63. this.rewardPlaceId = rewardPlaceId
  64. this.interPlacementId = interPlacementId
  65. this.nativePlaceId = nativePlaceId
  66. this.fullInterPlacementId = fullInterPlacementId
  67. this.bannerPlaceId = bannerPlaceId
  68. this.initATJSSDK(channel);
  69. cc["ATRewardedVideoJSSDK"] = ATRewardedVideoJSSDK;
  70. ATRewardedVideoJSSDK.setAdListener(this);
  71. },
  72. setAdListener(v) {
  73. ATRewardedVideoJSSDK.setAdListener(v);
  74. },
  75. back: function () {
  76. cc.director.loadScene("AnyThinkDemoScene");
  77. },
  78. loadAd: function (userIdKey, userDataKey, id) {
  79. console.log("loadAd ???????????????????????????? ")
  80. var setting = {};
  81. setting[ATRewardedVideoJSSDK.userIdKey] = userIdKey;
  82. setting[ATRewardedVideoJSSDK.userDataKey] = userDataKey;
  83. this.curPlacementId = id
  84. ATRewardedVideoJSSDK.loadRewardedVideo(this.curPlacementId, setting);
  85. },
  86. showAd: function () {
  87. console.log("showAd ???????????????????????????? ", this.curPlacementId)
  88. // ATRewardedVideoJSSDK.showAd(this.curPlacementId);
  89. ATRewardedVideoJSSDK.showAdInScenario(this.curPlacementId, "");
  90. },
  91. checkReady: function () {
  92. if (this.proxy == null) return;
  93. // this.proxy.checkReady();
  94. // ATJSSDK.printLog("AnyThinkRewardedVideo::checkReady() " + (ATRewardedVideoJSSDK.hasAdReady(this.curPlacementId) ? "Ready" : "No"));
  95. return ATRewardedVideoJSSDK.hasAdReady(this.curPlacementId) ? true : false;
  96. },
  97. //Callbacks
  98. onRewardedVideoAdLoaded: function (placementId) {
  99. //ATJSSDK.printLog("AnyThinkRewardedVideo::onRewardedVideoAdLoaded(" + placementId + ")");
  100. // console.log("AnyThinkRewardedVideo::onRewardedVideoAdLoaded(" + placementId + ")");
  101. if (this.proxy == null) return;
  102. this.proxy.onRewardedVideoAdLoaded(placementId);
  103. },
  104. onRewardedVideoAdFailed: function (placementId, errorInfo) {
  105. //ATJSSDK.printLog("AnyThinkRewardedVideo::onRewardedVideoAdFailed(" + placementId + ", " + errorInfo + ")");
  106. // console.log("AnyThinkRewardedVideo::onRewardedVideoAdFailed(" + placementId + ", " + errorInfo + ")");
  107. if (this.proxy == null) return;
  108. this.proxy.onRewardedVideoAdFailed(placementId, errorInfo);
  109. },
  110. onRewardedVideoAdPlayStart: function (placementId, callbackInfo) {
  111. //ATJSSDK.printLog("AnyThinkRewardedVideo::onRewardedVideoAdPlayStart(" + placementId + ", " + callbackInfo + ")");
  112. // console.log("AnyThinkRewardedVideo::onRewardedVideoAdPlayStart(" + placementId + ", " + callbackInfo + ")");
  113. if (this.proxy == null) return;
  114. this.proxy.onRewardedVideoAdPlayStart(placementId, callbackInfo);
  115. },
  116. onRewardedVideoAdPlayEnd: function (placementId, callbackInfo) {
  117. // ATJSSDK.printLog("AnyThinkRewardedVideo::onRewardedVideoAdPlayEnd(" + placementId + ", " + callbackInfo + ")");
  118. // console.log("AnyThinkRewardedVideo::onRewardedVideoAdPlayEnd(" + placementId + ", " + callbackInfo + ")");
  119. if (this.proxy == null) return;
  120. this.proxy.onRewardedVideoAdPlayEnd(placementId, callbackInfo);
  121. },
  122. onRewardedVideoAdPlayFailed: function (placementId, errorInfo, callbackInfo) {
  123. //ATJSSDK.printLog("AnyThinkRewardedVideo::onRewardedVideoAdPlayFailed(" + placementId + ", " + errorInfo + ", " + callbackInfo + ")");
  124. // console.log("AnyThinkRewardedVideo::onRewardedVideoAdPlayFailed(" + placementId + ", " + errorInfo + ", " + callbackInfo + ")");
  125. if (this.proxy == null) return;
  126. this.proxy.onRewardedVideoAdPlayFailed(placementId, errorInfo, callbackInfo);
  127. },
  128. onRewardedVideoAdClosed: function (placementId, callbackInfo) {
  129. //ATJSSDK.printLog("AnyThinkRewardedVideo::onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")");
  130. // console.log("AnyThinkRewardedVideo::onRewardedVideoAdClosed(" + placementId + ", " + callbackInfo + ")");
  131. if (this.proxy == null) return;
  132. this.proxy.onRewardedVideoAdClosed(placementId, callbackInfo);
  133. },
  134. onRewardedVideoAdPlayClicked: function (placementId, callbackInfo) {
  135. //ATJSSDK.printLog("AnyThinkRewardedVideo::onRewardedVideoAdPlayClicked(" + placementId + ", " + callbackInfo + ")");
  136. // console.log("AnyThinkRewardedVideo::onRewardedVideoAdPlayClicked(" + placementId + ", " + callbackInfo + ")");
  137. if (this.proxy == null) return;
  138. this.proxy.onRewardedVideoAdPlayClicked(placementId, callbackInfo);
  139. },
  140. onReward: function (placementId, callbackInfo) {
  141. //ATJSSDK.printLog("AnyThinkRewardedVideo::onReward(" + placementId + ", " + callbackInfo + ")");
  142. // console.log("AnyThinkRewardedVideo::onReward(" + placementId + ", " + callbackInfo + ")");
  143. if (this.proxy == null) return;
  144. this.proxy.onReward(placementId, callbackInfo);
  145. },
  146. //插屏广告
  147. loadInter: function (type) {
  148. //v5.6.8新增,只针对Sigmob平台,Sigmob的激励视频广告源当做插屏使用
  149. var setting = {};
  150. setting[ATInterstitialJSSDK.UseRewardedVideoAsInterstitial] = false;
  151. this.interType = type
  152. ATInterstitialJSSDK.setAdListener(this);
  153. //setting[ATInterstitialJSSDK.UseRewardedVideoAsInterstitial] = true;
  154. if (this.interType == 0) {
  155. ATInterstitialJSSDK.loadInterstitial(this.interPlacementId, setting);
  156. // ATInterstitialJSSDK.showAd(this.interPlacementId);
  157. }
  158. else if (this.interType == 1) {
  159. ATInterstitialJSSDK.loadInterstitial(this.fullInterPlacementId, setting);
  160. // ATInterstitialJSSDK.showAd(this.fullInterPlacementId);
  161. }
  162. },
  163. /** 检查插屏是否加载成功 */
  164. checkInterReady(type) {
  165. if (this.proxy == null) return;
  166. if (type == 0) {
  167. return ATInterstitialJSSDK.hasAdReady(this.interPlacementId) ? true : false;
  168. }
  169. else if (type == 1) {
  170. return ATInterstitialJSSDK.hasAdReady(this.fullInterPlacementId) ? true : false;
  171. }
  172. },
  173. showInter(type) {
  174. if (type == 0) {
  175. ATInterstitialJSSDK.showAd(this.interPlacementId);
  176. }
  177. else if (type == 1) {
  178. ATInterstitialJSSDK.showAd(this.fullInterPlacementId);
  179. }
  180. },
  181. //广告加载成功
  182. onInterstitialAdLoaded: function (placementId) {
  183. // console.log("AnyThinkInterstitialDemo::onInterstitialAdLoaded(" + placementId + ")");
  184. // if (this.interType == 0) {
  185. // ATInterstitialJSSDK.showAd(this.interPlacementId);
  186. // }
  187. // else if (this.interType == 1) {
  188. // ATInterstitialJSSDK.showAd(this.fullInterPlacementId);
  189. // }
  190. if (this.proxy == null) return;
  191. this.proxy.onInterstitialAdLoaded(placementId);
  192. },
  193. //广告加载失败
  194. onInterstitialAdLoadFail: function (placementId, errorInfo) {
  195. // console.log("AnyThinkInterstitialDemo::onInterstitialAdLoadFail(" + placementId + ", " + errorInfo + ")");
  196. if (this.proxy == null) return;
  197. this.proxy.onInterstitialAdLoadFail(placementId, errorInfo);
  198. },
  199. //广告展示成功
  200. onInterstitialAdShow: function (placementId, callbackInfo) {
  201. // console.log("AnyThinkInterstitialDemo::onInterstitialAdShow(" + placementId + ", " + callbackInfo + ")");
  202. if (this.proxy == null) return;
  203. this.proxy.onInterstitialAdShow(placementId, callbackInfo);
  204. },
  205. //广告视频开始播放,部分平台有此回调
  206. onInterstitialAdStartPlayingVideo: function (placementId, callbackInfo) {
  207. // console.log("AnyThinkInterstitialDemo::onInterstitialAdStartPlayingVideo(" + placementId + ", " + callbackInfo + ")");
  208. },
  209. //广告视频播放结束,部分广告平台有此回调
  210. onInterstitialAdEndPlayingVideo: function (placementId, callbackInfo) {
  211. // console.log("AnyThinkInterstitialDemo::onInterstitialAdEndPlayingVideo(" + placementId + ", " + callbackInfo + ")");
  212. },
  213. //广告视频播放失败,部分广告平台有此回调
  214. onInterstitialAdFailedToPlayVideo: function (placementId, errorInfo) {
  215. // console.log("AnyThinkInterstitialDemo::onInterstitialAdFailedToPlayVideo(" + placementId + ", " + errorInfo + ")");
  216. },
  217. //广告展示失败
  218. onInterstitialAdFailedToShow: function (placementId) {
  219. // console.log("AnyThinkInterstitialDemo::onInterstitialAdFailedToShow(" + placementId + ")");
  220. },
  221. //广告被关闭
  222. onInterstitialAdClose: function (placementId, callbackInfo) {
  223. // console.log("AnyThinkInterstitialDemo::onInterstitialAdClose(" + placementId + ", " + callbackInfo + ")");
  224. if (this.proxy == null) return;
  225. this.proxy.onInterstitialAdClose(placementId, callbackInfo);
  226. },
  227. //广告被点击
  228. onInterstitialAdClick: function (placementId, callbackInfo) {
  229. // console.log("AnyThinkInterstitialDemo::onInterstitialAdClick(" + placementId + ", " + callbackInfo + ")");
  230. if (this.proxy == null) return;
  231. this.proxy.onInterstitialAdClick(placementId, callbackInfo);
  232. },
  233. //原生广告
  234. loadNative: function (type = 0, show = false) {
  235. this.nativeType = type
  236. this.nativeShow = show
  237. this.nativeIsLoading = true
  238. //加载原生广告时需要传入广告展示的宽高
  239. var frameSize = cc.view.getFrameSize();
  240. this.frameWidth = frameSize.width;
  241. this.frameHeight = frameSize.height;
  242. var per = this.frameWidth / 750
  243. var sw = per * 656
  244. var sh = per * 440
  245. if (this.nativeType == 2) {
  246. this.destroyNative(false)
  247. sw *= 0.9
  248. sh *= 0.8
  249. this.curNativeId = this.nativePlaceId
  250. }
  251. else if (this.nativeType == 3) {
  252. this.destroyNative(false)
  253. sw *= 0.9
  254. sh *= 0.75
  255. this.curNativeId = this.nativePlaceId
  256. }
  257. else {
  258. this.curNativeId = this.nativePlaceId
  259. sw *= 0.95
  260. }
  261. ATNativeJSSDK.setAdListener(this)
  262. ATNativeJSSDK.loadNative(this.curNativeId, ATNativeJSSDK.createLoadAdSize(sw, sh));
  263. },
  264. destroyNative: function (load = true) {
  265. ATNativeJSSDK.removeAd(this.curNativeId);
  266. // this.nativeIsLoad = false
  267. this.nativeIsShow = false
  268. this.nativeShow = false
  269. if (load) {
  270. // this.loadNative()
  271. }
  272. },
  273. /** 信息流位置
  274. * @param type 0 弹窗里 1 最底部 2 弹窗顶部 3 底部小窗口
  275. */
  276. showNative(type) {
  277. // console.log('AnyThinkNativeDemo 111111111 ')
  278. if (this.nativeIsShow) {
  279. return
  280. }
  281. if (this.nativeIsLoading) {
  282. this.nativeType = type
  283. this.nativeShow = true
  284. return
  285. }
  286. if (!this.nativeIsLoad) {
  287. this.loadNative(type, true)
  288. return
  289. }
  290. // console.log('AnyThinkNativeDemo 2222222222 ')
  291. // console.log('AnyThinkNativeDemo 333333333333 ')
  292. this.nativeIsShow = true
  293. var per = this.frameWidth / 750
  294. var sw = per * 656
  295. var sh = per * 440
  296. var fontSize = 12
  297. var nativeAdViewProperty = new ATNativeJSSDK.AdViewProperty();
  298. var posy = 0
  299. if (type == 0) {
  300. // posy = this.frameHeight * 0.5 - 100
  301. posy = this.frameHeight * 0.605 - sh * 0.5
  302. sw *= 0.95
  303. var fontSize = 10
  304. }
  305. else if (type == 1) {
  306. // posy = this.frameHeight * 0.5 + 280
  307. posy = this.frameHeight * 0.625
  308. }
  309. else if (type == 2) {
  310. // posy = this.frameHeight * 0.5 + 210
  311. sw *= 0.95
  312. posy = this.frameHeight * 0.36 - sh * 0.5
  313. }
  314. else if (type == 3) {
  315. // posy = this.frameHeight * 0.5 + 420
  316. posy = this.frameHeight * 0.69
  317. sw *= 0.9
  318. sh *= 0.75
  319. fontSize = 8
  320. }
  321. var parx = (this.frameWidth - sw) * 0.5
  322. nativeAdViewProperty.parent = nativeAdViewProperty.createItemViewProperty(parx, posy, sw, sh, "#ffffff", "", 0);
  323. nativeAdViewProperty.mainImage = nativeAdViewProperty.createItemViewProperty(0, 0, sw, sh, "#ffffff", "#ffffff", fontSize);
  324. ATNativeJSSDK.showAd(this.curNativeId, nativeAdViewProperty);
  325. },
  326. //广告加载成功
  327. onNativeAdLoaded: function (placementId) {
  328. this.nativeIsLoad = true
  329. this.nativeIsLoading = false
  330. // console.log("AnyThinkNativeDemo::onNativeAdLoaded(" + placementId + ")");
  331. if (this.nativeShow) {
  332. // console.log('AnyThinkNativeDemo aaaaaaaaaa ')
  333. this.nativeIsShow = false
  334. this.showNative(this.nativeType)
  335. }
  336. if (this.proxy == null) return;
  337. this.proxy.onNativeAdLoaded(placementId);
  338. },
  339. //广告加载失败
  340. onNativeAdLoadFail: function (placementId, errorInfo) {
  341. // console.log("AnyThinkNativeDemo::onNativeAdLoadFail(" + placementId + ", " + errorInfo + ")");
  342. this.nativeIsLoading = false
  343. this.nativeIsLoad = false
  344. if (this.proxy == null) return;
  345. this.proxy.onNativeAdLoadFail(placementId, errorInfo);
  346. },
  347. //广告展示成功
  348. onNativeAdShow: function (placementId, callbackInfo) {
  349. // console.log("AnyThinkNativeDemo::onNativeAdShow(" + placementId + ", " + callbackInfo + ")");
  350. if (this.proxy == null) return;
  351. this.proxy.onNativeAdShow(placementId, callbackInfo);
  352. },
  353. //广告被点击
  354. onNativeAdClick: function (placementId, callbackInfo) {
  355. // console.log("AnyThinkNativeDemo::onNativeAdClick(" + placementId + ", " + callbackInfo + ")");
  356. if (this.proxy == null) return;
  357. this.proxy.onNativeAdClick(placementId, callbackInfo);
  358. },
  359. //广告视频开始播放,部分广告平台有此回调
  360. onNativeAdVideoStart: function (placementId) {
  361. // console.log("AnyThinkNativeDemo::onNativeAdVideoStart(" + placementId + ")");
  362. },
  363. //广告视频结束播放,部分广告平台有此回调
  364. onNativeAdVideoEnd: function (placementId) {
  365. // console.log("AnyThinkNativeDemo::onNativeAdVideoEnd(" + placementId + ")");
  366. },
  367. //广告关闭按钮被点击,部分广告平台有此回调
  368. onNativeAdCloseButtonTapped: function (placementId, callbackInfo) {
  369. // console.log("AnyThinkNativeDemo::onNativeAdCloseButtonTapped(" + placementId + ", " + callbackInfo + ")");
  370. },
  371. /** banner广告----------------- */
  372. //加载banner
  373. loadBanner: function () {
  374. let winHeight = cc.view.getFrameSize().height
  375. if (winHeight < 1400) {
  376. return
  377. }
  378. var setting = {}
  379. var bannerH = winHeight / 1334 * 120
  380. console.log('winHeight ', winHeight, ' winWidth ', cc.view.getFrameSize().width, ' bannerHeight ', bannerH)
  381. setting[ATBannerJSSDK.kATBannerAdLoadingExtraBannerAdSizeStruct] = ATBannerJSSDK.createLoadAdSize(cc.view.getFrameSize().width, bannerH);
  382. //只针对Admob的自适应banner
  383. setting[ATBannerJSSDK.kATBannerAdInlineAdaptiveWidth] = cc.view.getFrameSize().width;
  384. setting[ATBannerJSSDK.kATBannerAdInlineAdaptiveOrientation] = ATBannerJSSDK.kATBannerAdInlineAdaptiveOrientationCurrent;
  385. // setting[ATBannerJSSDK.kATBannerAdInlineAdaptiveOrientation] = ATBannerJSSDK.kATBannerAdInlineAdaptiveOrientationPortrait;
  386. // setting[ATBannerJSSDK.kATBannerAdInlineAdaptiveOrientation] = ATBannerJSSDK.kATBannerAdInlineAdaptiveOrientationLandscape;
  387. ATBannerJSSDK.setAdListener(this)
  388. ATBannerJSSDK.loadBanner(this.bannerPlaceId, setting);
  389. },
  390. //banner是否准备就绪
  391. checkBannerReady() {
  392. return ATBannerJSSDK.hasAdReady(this.bannerPlaceId) ? true : false
  393. },
  394. //显示banner
  395. showBanner() {
  396. if (this.bannerIsShow) {
  397. return
  398. }
  399. ATBannerJSSDK.showAdInPosition(this.bannerPlaceId, ATBannerJSSDK.kATBannerAdShowingPositionBottom);
  400. },
  401. destroyBanner() {
  402. if (this.bannerIsShow) {
  403. ATBannerJSSDK.removeAd(this.bannerPlaceId);
  404. this.bannerIsShow = false
  405. this.loadBanner()
  406. }
  407. },
  408. //广告加载成功
  409. onBannerAdLoaded: function (placementId) {
  410. ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdLoaded(" + placementId + ")");
  411. if (this.proxy == null) return;
  412. this.proxy.onBannerAdLoaded(placementId);
  413. },
  414. //广告加载失败
  415. onBannerAdLoadFail: function (placementId, errorInfo) {
  416. ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdLoadFail(" + placementId + ", " + errorInfo + ")");
  417. if (this.proxy == null) return;
  418. this.proxy.onBannerAdLoadFail(placementId, errorInfo);
  419. },
  420. //广告展示成功
  421. onBannerAdShow: function (placementId, callbackInfo) {
  422. ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdShow(" + placementId + ", " + callbackInfo + ")");
  423. this.bannerIsShow = true
  424. if (this.proxy == null) return;
  425. this.proxy.onBannerAdShow(placementId, callbackInfo);
  426. },
  427. //广告被点击
  428. onBannerAdClick: function (placementId, callbackInfo) {
  429. ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdClick(" + placementId + ", " + callbackInfo + ")");
  430. if (this.proxy == null) return;
  431. this.proxy.onBannerAdClick(placementId, callbackInfo);
  432. },
  433. //广告自动刷新成功
  434. onBannerAdAutoRefresh: function (placementId, callbackInfo) {
  435. ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdAutoRefresh(" + placementId + ", " + callbackInfo + ")");
  436. if (this.proxy == null) return;
  437. },
  438. //广告自动刷新失败
  439. onBannerAdAutoRefreshFail: function (placementId, errorInfo) {
  440. ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdAutoRefreshFail(" + placementId + ", " + errorInfo + ")");
  441. if (this.proxy == null) return;
  442. },
  443. //广告关闭按钮被点击
  444. onBannerAdCloseButtonTapped: function (placementId, callbackInfo) {
  445. ATJSSDK.printLog("AnyThinkBannerDemo::onBannerAdCloseButtonTapped(" + placementId + ", " + callbackInfo + ")");
  446. if (this.proxy == null) return;
  447. }
  448. });
  449. module.exports = thirdVideo;
  450. cc["thirdVideo"] = new thirdVideo();