@cc-component/cc-ex-component 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/assets/core/ReferenceComponent.ts +24 -17
  2. package/assets/core/ViewModel.ts +50 -6
  3. package/package.json +1 -1
  4. package/assets/platform/Interface.ts +0 -80
  5. package/assets/platform/Interface.ts.meta +0 -9
  6. package/assets/platform/android/AndroidModule.ts +0 -12
  7. package/assets/platform/android/AndroidModule.ts.meta +0 -9
  8. package/assets/platform/android/AndroidSDK.ts +0 -186
  9. package/assets/platform/android/AndroidSDK.ts.meta +0 -1
  10. package/assets/platform/android/AnyThinkAds/ATBanner.ts +0 -266
  11. package/assets/platform/android/AnyThinkAds/ATBanner.ts.meta +0 -9
  12. package/assets/platform/android/AnyThinkAds/ATInterstitial.ts +0 -185
  13. package/assets/platform/android/AnyThinkAds/ATInterstitial.ts.meta +0 -9
  14. package/assets/platform/android/AnyThinkAds/ATInterstitialAuto.ts +0 -180
  15. package/assets/platform/android/AnyThinkAds/ATInterstitialAuto.ts.meta +0 -9
  16. package/assets/platform/android/AnyThinkAds/ATNative.ts +0 -256
  17. package/assets/platform/android/AnyThinkAds/ATNative.ts.meta +0 -9
  18. package/assets/platform/android/AnyThinkAds/ATRewardedAutoVideo.ts +0 -175
  19. package/assets/platform/android/AnyThinkAds/ATRewardedAutoVideo.ts.meta +0 -9
  20. package/assets/platform/android/AnyThinkAds/ATRewardedVideo.ts +0 -243
  21. package/assets/platform/android/AnyThinkAds/ATRewardedVideo.ts.meta +0 -9
  22. package/assets/platform/android/AnyThinkAds/ATSDK.ts +0 -222
  23. package/assets/platform/android/AnyThinkAds/ATSDK.ts.meta +0 -9
  24. package/assets/platform/android/AnyThinkAds/ATSplash.ts +0 -155
  25. package/assets/platform/android/AnyThinkAds/ATSplash.ts.meta +0 -9
  26. package/assets/platform/android/AnyThinkAds/Android/ATAndroidBannerTS.ts +0 -71
  27. package/assets/platform/android/AnyThinkAds/Android/ATAndroidBannerTS.ts.meta +0 -9
  28. package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialAutoTS.ts +0 -52
  29. package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialAutoTS.ts.meta +0 -9
  30. package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialTS.ts +0 -41
  31. package/assets/platform/android/AnyThinkAds/Android/ATAndroidInterstitialTS.ts.meta +0 -9
  32. package/assets/platform/android/AnyThinkAds/Android/ATAndroidNativeTS.ts +0 -47
  33. package/assets/platform/android/AnyThinkAds/Android/ATAndroidNativeTS.ts.meta +0 -9
  34. package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoAutoTS.ts +0 -52
  35. package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoAutoTS.ts.meta +0 -9
  36. package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoTS.ts +0 -41
  37. package/assets/platform/android/AnyThinkAds/Android/ATAndroidRewardedVideoTS.ts.meta +0 -9
  38. package/assets/platform/android/AnyThinkAds/Android/ATAndroidSplashTS.ts +0 -42
  39. package/assets/platform/android/AnyThinkAds/Android/ATAndroidSplashTS.ts.meta +0 -9
  40. package/assets/platform/android/AnyThinkAds/Android/ATAndroidTS.ts +0 -73
  41. package/assets/platform/android/AnyThinkAds/Android/ATAndroidTS.ts.meta +0 -9
  42. package/assets/platform/android/AnyThinkAds/Android.meta +0 -9
  43. package/assets/platform/android/AnyThinkAds/iOS/ATiOSBannerTS.ts +0 -66
  44. package/assets/platform/android/AnyThinkAds/iOS/ATiOSBannerTS.ts.meta +0 -9
  45. package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitiaAutolTS.ts +0 -54
  46. package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitiaAutolTS.ts.meta +0 -9
  47. package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitialTS.ts +0 -43
  48. package/assets/platform/android/AnyThinkAds/iOS/ATiOSInterstitialTS.ts.meta +0 -9
  49. package/assets/platform/android/AnyThinkAds/iOS/ATiOSNativeTS.ts +0 -47
  50. package/assets/platform/android/AnyThinkAds/iOS/ATiOSNativeTS.ts.meta +0 -9
  51. package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedAutoVideoTS.ts +0 -55
  52. package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedAutoVideoTS.ts.meta +0 -9
  53. package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedVideoTS.ts +0 -43
  54. package/assets/platform/android/AnyThinkAds/iOS/ATiOSRewardedVideoTS.ts.meta +0 -9
  55. package/assets/platform/android/AnyThinkAds/iOS/ATiOSSplashTS.ts +0 -47
  56. package/assets/platform/android/AnyThinkAds/iOS/ATiOSSplashTS.ts.meta +0 -9
  57. package/assets/platform/android/AnyThinkAds/iOS/ATiOSTS.ts +0 -76
  58. package/assets/platform/android/AnyThinkAds/iOS/ATiOSTS.ts.meta +0 -9
  59. package/assets/platform/android/AnyThinkAds/iOS.meta +0 -9
  60. package/assets/platform/android/AnyThinkAds.meta +0 -9
  61. package/assets/platform/android/iOSSDK.ts +0 -14
  62. package/assets/platform/android/iOSSDK.ts.meta +0 -1
  63. package/assets/platform/android.meta +0 -11
  64. package/assets/platform/base/EditorSDK.ts +0 -30
  65. package/assets/platform/base/EditorSDK.ts.meta +0 -1
  66. package/assets/platform/base/PlatfprmModule.ts +0 -152
  67. package/assets/platform/base/PlatfprmModule.ts.meta +0 -9
  68. package/assets/platform/base/SDKBase.ts +0 -59
  69. package/assets/platform/base/SDKBase.ts.meta +0 -9
  70. package/assets/platform/base/SDKEnum.ts +0 -127
  71. package/assets/platform/base/SDKEnum.ts.meta +0 -9
  72. package/assets/platform/base/TTSDK.ts +0 -366
  73. package/assets/platform/base/TTSDK.ts.meta +0 -9
  74. package/assets/platform/base/WXSDK.ts +0 -149
  75. package/assets/platform/base/WXSDK.ts.meta +0 -1
  76. package/assets/platform/base.meta +0 -9
  77. package/assets/platform/wx/MiniSDK.ts +0 -1039
  78. package/assets/platform/wx/MiniSDK.ts.meta +0 -9
  79. package/assets/platform/wx/lib.douyin.d.ts +0 -168
  80. package/assets/platform/wx/lib.douyin.d.ts.meta +0 -9
  81. package/assets/platform/wx/wxmini.d.ts +0 -2452
  82. package/assets/platform/wx/wxmini.d.ts.meta +0 -9
  83. package/assets/platform/wx.meta +0 -9
  84. package/assets/platform.meta +0 -9
@@ -1,256 +0,0 @@
1
- import {ATiOSNativeTS} from "./iOS/ATiOSNativeTS"
2
- import {ATAndroidNativeTS} from "./Android/ATAndroidNativeTS"
3
- import {Component, sys} from 'cc';
4
-
5
- const initPlatformBridge = function () {
6
- if (sys.os === sys.OS.IOS) {
7
- return ATiOSNativeTS;
8
- } else if (sys.os === sys.OS.ANDROID) {
9
- return ATAndroidNativeTS;
10
- }
11
- };
12
-
13
- const platformBridge = initPlatformBridge();
14
-
15
-
16
- export const ATNativeSDK = {
17
- ATNativeListener: {
18
- developerCallback: null, onNativeAdLoaded: function (placementId: any) {
19
- if (this.developerCallback != null && this.developerCallback.onNativeAdLoaded != null) {
20
- this.developerCallback.onNativeAdLoaded(placementId);
21
- }
22
- },
23
-
24
- onNativeAdLoadFail: function (placementId: any, errorInfo: any) {
25
- if (this.developerCallback != null && this.developerCallback.onNativeAdLoadFail != null) {
26
- this.developerCallback.onNativeAdLoadFail(placementId, errorInfo);
27
- }
28
- },
29
-
30
- onNativeAdShow: function (placementId: any, callbackInfo: any) {
31
- if (this.developerCallback != null && this.developerCallback.onNativeAdShow != null) {
32
- this.developerCallback.onNativeAdShow(placementId, callbackInfo);
33
- }
34
- },
35
-
36
- onNativeAdClick: function (placementId: any, callbackInfo: any) {
37
- if (this.developerCallback != null && this.developerCallback.onNativeAdClick != null) {
38
- this.developerCallback.onNativeAdClick(placementId, callbackInfo);
39
- }
40
- },
41
-
42
- onNativeAdVideoStart: function (placementId: any) {
43
- if (this.developerCallback != null && this.developerCallback.onNativeAdVideoStart != null) {
44
- this.developerCallback.onNativeAdVideoStart(placementId,);
45
- }
46
- },
47
-
48
- onNativeAdVideoEnd: function (placementId: any) {
49
- if (this.developerCallback != null && this.developerCallback.onNativeAdVideoEnd != null) {
50
- this.developerCallback.onNativeAdVideoEnd(placementId);
51
- }
52
- },
53
-
54
- onNativeAdCloseButtonTapped: function (placementId: any, callbackInfo: any) {
55
- if (this.developerCallback != null && this.developerCallback.onNativeAdCloseButtonTapped != null) {
56
- this.developerCallback.onNativeAdCloseButtonTapped(placementId, callbackInfo);
57
- }
58
- }, //added v5.8.10
59
- onAdSourceBiddingAttempt: function (placementId: any, callbackInfo: any) {
60
- if (this.developerCallback != null && this.developerCallback.onAdSourceBiddingAttempt != null) {
61
- this.developerCallback.onAdSourceBiddingAttempt(placementId, callbackInfo);
62
- }
63
- }, onAdSourceBiddingFilled: function (placementId: any, callbackInfo: any) {
64
- if (this.developerCallback != null && this.developerCallback.onAdSourceBiddingFilled != null) {
65
- this.developerCallback.onAdSourceBiddingFilled(placementId, callbackInfo);
66
- }
67
- }, onAdSourceBiddingFail: function (placementId: any, errorInfo: any, callbackInfo: any) {
68
- if (this.developerCallback != null && this.developerCallback.onAdSourceBiddingFail != null) {
69
- this.developerCallback.onAdSourceBiddingFail(placementId, errorInfo, callbackInfo);
70
- }
71
- }, onAdSourceAttemp: function (placementId: any, callbackInfo: any) {
72
- if (this.developerCallback != null && this.developerCallback.onAdSourceAttemp != null) {
73
- this.developerCallback.onAdSourceAttemp(placementId, callbackInfo);
74
- }
75
- }, onAdSourceLoadFilled: function (placementId: any, callbackInfo: any) {
76
- if (this.developerCallback != null && this.developerCallback.onAdSourceLoadFilled != null) {
77
- this.developerCallback.onAdSourceLoadFilled(placementId, callbackInfo);
78
- }
79
- }, onAdSourceLoadFail: function (placementId: any, errorInfo: any, callbackInfo: any) {
80
- if (this.developerCallback != null && this.developerCallback.onAdSourceLoadFail != null) {
81
- this.developerCallback.onAdSourceLoadFail(placementId, errorInfo, callbackInfo);
82
- }
83
- }
84
-
85
- },
86
-
87
- loadAd: function (placementId: any, settings = {}) {
88
-
89
- if (undefined != platformBridge) {
90
- platformBridge.loadNative(placementId, JSON.stringify(settings));
91
- } else {
92
- console.log("You must run on Android or iOS.");
93
- }
94
- },
95
-
96
- setAdListener: function (listener: any) {
97
- const eventJSON = {};
98
- eventJSON[LoadedCallbackKey] = "ATNative.ATNativeListener.onNativeAdLoaded", eventJSON[LoadFailCallbackKey] = "ATNative.ATNativeListener.onNativeAdLoadFail", eventJSON[CloseCallbackKey] = "ATNative.ATNativeListener.onNativeAdCloseButtonTapped", eventJSON[ClickCallbackKey] = "ATNative.ATNativeListener.onNativeAdClick", eventJSON[ShowCallbackKey] = "ATNative.ATNativeListener.onNativeAdShow", eventJSON[VideoStartKey] = "ATNative.ATNativeListener.onNativeAdVideoStart", eventJSON[VideoEndKey] = "ATNative.ATNativeListener.onNativeAdVideoEnd", //added v5.8.10
99
- eventJSON[BiddingAttempt] = "ATNative.ATNativeListener.onAdSourceBiddingAttempt", eventJSON[BiddingFilled] = "ATNative.ATNativeListener.onAdSourceBiddingFilled", eventJSON[BiddingFail] = "ATNative.ATNativeListener.onAdSourceBiddingFail", eventJSON[Attemp] = "ATNative.ATNativeListener.onAdSourceAttemp", eventJSON[LoadFilled] = "ATNative.ATNativeListener.onAdSourceLoadFilled", eventJSON[LoadFail] = "ATNative.ATNativeListener.onAdSourceLoadFail"
100
-
101
- if (undefined != platformBridge) {
102
- platformBridge.setAdListener(JSON.stringify(eventJSON));
103
- } else {
104
- console.log("You must run on Android or iOS.");
105
- }
106
-
107
- this.ATNativeListener.developerCallback = listener;
108
- },
109
-
110
- hasAdReady: function (placementId: any) {
111
- if (undefined != platformBridge) {
112
- return platformBridge.hasAdReady(placementId);
113
- } else {
114
- console.log("You must run on Android or iOS.");
115
- }
116
- return false;
117
- },
118
-
119
- checkAdStatus: function (placementId: any) {
120
- if (undefined != platformBridge) {
121
- return platformBridge.checkAdStatus(placementId);
122
- } else {
123
- console.log("You must run on Android or iOS.");
124
- }
125
- return "";
126
- },
127
-
128
- showAd: function (placementId: any, adViewProperty: { getAdViewProperty: () => any; }) {
129
- if (undefined != platformBridge) {
130
- platformBridge.showAd(placementId, JSON.stringify(adViewProperty.getAdViewProperty()));
131
- } else {
132
- console.log("You must run on Android or iOS.");
133
- }
134
- },
135
-
136
- showAdInScenario: function (placementId: any, adViewProperty: { getAdViewProperty: () => any; }, scenario: any) {
137
- if (undefined != platformBridge) {
138
- platformBridge.showAdInScenario(placementId, JSON.stringify(adViewProperty.getAdViewProperty()), scenario);
139
- } else {
140
- console.log("You must run on Android or iOS.");
141
- }
142
- },
143
-
144
- entryAdScenario: function (placementId: any, scenario: any) {
145
- if (undefined != platformBridge) {
146
- platformBridge.entryAdScenario(placementId, scenario);
147
- } else {
148
- console.log("You must run on Android or iOS.");
149
- }
150
- },
151
-
152
- removeAd: function (placementId: any) {
153
- if (undefined != platformBridge) {
154
- platformBridge.removeAd(placementId);
155
- } else {
156
- console.log("You must run on Android or iOS.");
157
- }
158
- },
159
-
160
- createLoadAdSize: function (width: any, height: any) {
161
- const loadAdSize = {};
162
- loadAdSize["width"] = width;
163
- loadAdSize["height"] = height;
164
- return loadAdSize;
165
- },
166
-
167
- };
168
-
169
- export class AdViewProperty extends Component {
170
-
171
- parent = null
172
- appIcon = null
173
- mainImage = null
174
- title = null
175
- desc = null
176
- adLogo = null
177
- cta = null
178
- rating = null
179
- dislike = null
180
- elements = null
181
-
182
- createItemViewProperty(x: number, y: number, width: number, height: number, backgroundColor: string, textColor: string, textSize: number, isCustomClick = false) {
183
- const itemProperty = {};
184
- itemProperty["x"] = x;
185
- itemProperty["y"] = y;
186
- itemProperty["width"] = width;
187
- itemProperty["height"] = height;
188
- itemProperty["backgroundColor"] = backgroundColor;
189
- itemProperty["textColor"] = textColor;
190
- itemProperty["textSize"] = textSize;
191
- itemProperty["isCustomClick"] = isCustomClick;
192
-
193
- return itemProperty;
194
- }
195
-
196
- getAdViewProperty() {
197
- const nativeViewProperty = {};
198
-
199
- if (this.parent != null) {
200
- nativeViewProperty["parent"] = this.parent;
201
- }
202
-
203
- if (this.appIcon != null) {
204
- nativeViewProperty["icon"] = this.appIcon;
205
- }
206
-
207
- if (this.mainImage != null) {
208
- nativeViewProperty["mainImage"] = this.mainImage;
209
- }
210
-
211
- if (this.title != null) {
212
- nativeViewProperty["title"] = this.title;
213
- }
214
-
215
- if (this.desc != null) {
216
- nativeViewProperty["desc"] = this.desc;
217
- }
218
-
219
- if (this.adLogo != null) {
220
- nativeViewProperty["adLogo"] = this.adLogo;
221
- }
222
-
223
- if (this.cta != null) {
224
- nativeViewProperty["cta"] = this.cta;
225
- }
226
-
227
- if (this.rating != null) {
228
- nativeViewProperty["rating"] = this.rating;
229
- }
230
-
231
- if (this.dislike != null) {
232
- nativeViewProperty["dislike"] = this.dislike;
233
- }
234
-
235
- if (this.elements != null) {
236
- nativeViewProperty["elements"] = this.elements
237
- }
238
-
239
- return nativeViewProperty;
240
- }
241
- }
242
-
243
- const LoadedCallbackKey = "NativeLoaded";
244
- const LoadFailCallbackKey = "NativeLoadFail";
245
- const CloseCallbackKey = "NativeCloseButtonTapped";
246
- const ClickCallbackKey = "NativeClick";
247
- const ShowCallbackKey = "NativeShow";
248
- const VideoStartKey = "NativeVideoStart";
249
- const VideoEndKey = "NativeVideoEnd";
250
- const BiddingAttempt = "NativeBiddingAttempt";
251
- const BiddingFilled = "NativeBiddingFilled";
252
- const BiddingFail = "NativeBiddingFail";
253
- const Attemp = "NativeAttemp";
254
- const LoadFilled = "NativeLoadFilled";
255
- const LoadFail = "NativeLoadFail";
256
- window["ATNative"] = ATNativeSDK;
@@ -1,9 +0,0 @@
1
- {
2
- "ver": "4.0.24",
3
- "importer": "typescript",
4
- "imported": true,
5
- "uuid": "12abf43a-0fe5-42d9-8519-3907bb7ac574",
6
- "files": [],
7
- "subMetas": {},
8
- "userData": {}
9
- }
@@ -1,175 +0,0 @@
1
- import {ATAndroidRewardedVideoAutoAdTS} from "./Android/ATAndroidRewardedVideoAutoTS";
2
- import {ATiOSRewardedVideoAutoAdJS} from "./iOS/ATiOSRewardedAutoVideoTS";
3
- import {sys} from 'cc';
4
-
5
- const initPlatformBridge = function () {
6
- if (sys.os === sys.OS.IOS) {
7
- return ATiOSRewardedVideoAutoAdJS;
8
- } else if (sys.os === sys.OS.ANDROID) {
9
- return ATAndroidRewardedVideoAutoAdTS;
10
- }
11
- };
12
-
13
- const platformBridge = initPlatformBridge();
14
- export const ATRewardedVideoAutoAdSDK = {
15
- userIdKey: "userID", userDataKey: "media_ext",
16
-
17
- ATRewardedVideoListener: {
18
- developerCallback: null,
19
-
20
- onRewardedVideoAdLoaded: function (placementId: string) {
21
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdLoaded != null) {
22
- this.developerCallback.onRewardedVideoAdLoaded(placementId);
23
- }
24
- }, onRewardedVideoAdFailed: function (placementId: string, errorInfo: string) {
25
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdFailed != null) {
26
- this.developerCallback.onRewardedVideoAdFailed(placementId, errorInfo);
27
- }
28
- }, onRewardedVideoAdPlayStart: function (placementId: string, callbackInfo: string) {
29
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayStart != null) {
30
- this.developerCallback.onRewardedVideoAdPlayStart(placementId, callbackInfo);
31
- }
32
- }, onRewardedVideoAdPlayEnd: function (placementId: string, callbackInfo: string) {
33
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayEnd != null) {
34
- this.developerCallback.onRewardedVideoAdPlayEnd(placementId, callbackInfo);
35
- }
36
- }, onRewardedVideoAdPlayFailed: function (placementId: string, errorInfo: string, callbackInfo: string) {
37
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayFailed != null) {
38
- this.developerCallback.onRewardedVideoAdPlayFailed(placementId, errorInfo, callbackInfo);
39
- }
40
- }, onRewardedVideoAdClosed: function (placementId: string, callbackInfo: string) {
41
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdClosed != null) {
42
- this.developerCallback.onRewardedVideoAdClosed(placementId, callbackInfo);
43
- }
44
- }, onRewardedVideoAdPlayClicked: function (placementId: string, callbackInfo: string) {
45
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdPlayClicked != null) {
46
- this.developerCallback.onRewardedVideoAdPlayClicked(placementId, callbackInfo);
47
- }
48
- }, onReward: function (placementId: string, callbackInfo: string) {
49
- if (this.developerCallback != null && this.developerCallback.onReward != null) {
50
- this.developerCallback.onReward(placementId, callbackInfo);
51
- }
52
- }, onRewardedVideoAdAgainPlayStart: function (placementId: string, callbackInfo: string) {
53
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdAgainPlayStart != null) {
54
- this.developerCallback.onRewardedVideoAdAgainPlayStart(placementId, callbackInfo);
55
- }
56
- }, onRewardedVideoAdAgainPlayEnd: function (placementId: string, callbackInfo: string) {
57
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdAgainPlayEnd != null) {
58
- this.developerCallback.onRewardedVideoAdAgainPlayEnd(placementId, callbackInfo);
59
- }
60
- }, onRewardedVideoAdAgainPlayFailed: function (placementId: string, errorInfo: string, callbackInfo: string) {
61
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdAgainPlayFailed != null) {
62
- this.developerCallback.onRewardedVideoAdAgainPlayFailed(placementId, errorInfo, callbackInfo);
63
- }
64
- }, onRewardedVideoAdAgainPlayClicked: function (placementId: string, callbackInfo: string) {
65
- if (this.developerCallback != null && this.developerCallback.onRewardedVideoAdAgainPlayClicked != null) {
66
- this.developerCallback.onRewardedVideoAdAgainPlayClicked(placementId, callbackInfo);
67
- }
68
- }, onAgainReward: function (placementId: string, callbackInfo: string) {
69
- if (this.developerCallback != null && this.developerCallback.onAgainReward != null) {
70
- this.developerCallback.onAgainReward(placementId, callbackInfo);
71
- }
72
- }
73
- },
74
-
75
- setAdExtraData: function (placementId: any, settings = {}) {
76
-
77
- if (undefined != platformBridge) {
78
- platformBridge.setAdExtraData(placementId, JSON.stringify(settings));
79
- } else {
80
- console.log("You must run on Android or iOS.");
81
- }
82
- },
83
-
84
- addPlacementIds: function (placementIds: string[]) {
85
-
86
- if (undefined != platformBridge) {
87
- platformBridge.addPlacementIds(JSON.stringify(placementIds));
88
- } else {
89
- console.log("You must run on Android or iOS.");
90
- }
91
- },
92
-
93
- removePlacementId: function (placementIds: any) {
94
-
95
- if (undefined != platformBridge) {
96
- platformBridge.removePlacementId(JSON.stringify(placementIds));
97
- } else {
98
- console.log("You must run on Android or iOS.");
99
- }
100
- },
101
-
102
- setAdListener: function (listener: any) {
103
- const eventJSON = {};
104
- eventJSON[LoadedCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdLoaded", eventJSON[LoadFailCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdFailed", eventJSON[PlayStartCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdPlayStart", eventJSON[PlayEndCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdPlayEnd", eventJSON[PlayFailCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdPlayFailed", eventJSON[CloseCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdClosed", eventJSON[ClickCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdPlayClicked", eventJSON[RewardCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onReward", //playAgain listener
105
- eventJSON[AgainPlayStartCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdAgainPlayStart", eventJSON[AgainPlayEndCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdAgainPlayEnd", eventJSON[AgainPlayFailCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdAgainPlayFailed", eventJSON[AgainClickCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onRewardedVideoAdAgainPlayClicked", eventJSON[AgainRewardCallbackKey] = "ATRewardedVideoAutoAdSDK.ATRewardedVideoListener.onAgainReward"
106
-
107
- if (undefined != platformBridge) {
108
- platformBridge.setAdListener(JSON.stringify(eventJSON));
109
- } else {
110
- console.log("You must run on Android or iOS.");
111
- }
112
-
113
- this.ATRewardedVideoListener.developerCallback = listener;
114
- },
115
-
116
- hasAdReady: function (placementId: any) {
117
- if (undefined != platformBridge) {
118
- return platformBridge.hasAdReady(placementId);
119
- } else {
120
- console.log("You must run on Android or iOS.");
121
- }
122
- return false;
123
- },
124
-
125
- checkAdStatus: function (placementId: any) {
126
- if (undefined != platformBridge) {
127
- return platformBridge.checkAdStatus(placementId);
128
- } else {
129
- console.log("You must run on Android or iOS.");
130
- }
131
- return "";
132
- },
133
-
134
- showAd: function (placementId: any) {
135
- if (undefined != platformBridge) {
136
- platformBridge.showAd(placementId);
137
- } else {
138
- console.log("You must run on Android or iOS.");
139
- }
140
- },
141
-
142
- showAdInScenario: function (placementId: any, scenario: any) {
143
- if (undefined != platformBridge) {
144
- platformBridge.showAdInScenario(placementId, scenario);
145
- } else {
146
- console.log("You must run on Android or iOS.");
147
- }
148
- },
149
-
150
- entryAdScenario: function (placementId: any, scenario: any) {
151
- if (undefined != platformBridge) {
152
- platformBridge.entryAdScenario(placementId, scenario);
153
- } else {
154
- console.log("You must run on Android or iOS.");
155
- }
156
- }
157
-
158
- };
159
-
160
- const LoadedCallbackKey = "RewardedVideoAutoAdLoaded";
161
- const LoadFailCallbackKey = "RewardedVideoAutoAdLoadFail";
162
- const PlayStartCallbackKey = "RewardedVideoAutoAdPlayStart";
163
- const PlayEndCallbackKey = "RewardedVideoAutoAdPlayEnd";
164
- const PlayFailCallbackKey = "RewardedVideoAutoAdPlayFail";
165
- const CloseCallbackKey = "RewardedVideoAutoAdClose";
166
- const ClickCallbackKey = "RewardedVideoAutoAdClick";
167
- const RewardCallbackKey = "RewardedVideoAutoAdReward";
168
-
169
- const AgainPlayStartCallbackKey = "RewardedVideoAutoAdAgainPlayStart";
170
- const AgainPlayEndCallbackKey = "RewardedVideoAutoAdAgainPlayEnd";
171
- const AgainPlayFailCallbackKey = "RewardedVideoAutoAdAgainPlayFail";
172
- const AgainClickCallbackKey = "RewardedVideoAutoAdAgainClick";
173
- const AgainRewardCallbackKey = "RewardedVideoAutoAdAgainReward";
174
-
175
- window["ATRewardedVideoAutoAdSDK"] = ATRewardedVideoAutoAdSDK;
@@ -1,9 +0,0 @@
1
- {
2
- "ver": "4.0.24",
3
- "importer": "typescript",
4
- "imported": true,
5
- "uuid": "24f02659-7d54-453e-b094-f8a41c091ee0",
6
- "files": [],
7
- "subMetas": {},
8
- "userData": {}
9
- }