@jolibox/ads 1.4.8 → 1.4.9
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.
|
@@ -39,7 +39,7 @@ export declare class RewardAdManager {
|
|
|
39
39
|
*
|
|
40
40
|
* @param context The context for the rewarded ad, containing callbacks for ad events.
|
|
41
41
|
*/
|
|
42
|
-
requestAds: (context: IRewardAdContext) => void
|
|
42
|
+
requestAds: (context: IRewardAdContext) => Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* Shows the rewarded ad by calling beforeReward then showRewardAd.
|
|
45
45
|
*/
|
package/dist/index.js
CHANGED
|
@@ -4334,7 +4334,7 @@ class hs {
|
|
|
4334
4334
|
this._isReady = !1, (n = (i = this.adsContext) == null ? void 0 : i.adBreakDone) == null || n.call(i, e), e !== "ignored" && (this.adsContext = null);
|
|
4335
4335
|
}), ge(this, "reinit", async (e) => {
|
|
4336
4336
|
this.destroy(e), await this.init();
|
|
4337
|
-
}), ge(this, "requestAds", (e) => {
|
|
4337
|
+
}), ge(this, "requestAds", async (e) => {
|
|
4338
4338
|
if (console.log("[JoliboxSDK] NewsBreak newsbreak this.adsContext", this.adsContext), this.adsContext) {
|
|
4339
4339
|
this.destroy("ignored");
|
|
4340
4340
|
return;
|
|
@@ -4345,8 +4345,12 @@ class hs {
|
|
|
4345
4345
|
this.destroy("notReady");
|
|
4346
4346
|
return;
|
|
4347
4347
|
}
|
|
4348
|
-
|
|
4349
|
-
|
|
4348
|
+
if (this._isReady) {
|
|
4349
|
+
console.log("[JoliboxSDK] NewsBreak requestAds isReady from cache"), this.showAd();
|
|
4350
|
+
return;
|
|
4351
|
+
}
|
|
4352
|
+
const n = await i.isRewardReady();
|
|
4353
|
+
if (console.log("[JoliboxSDK] NewsBreak requestAds sdk.isRewardReady", n), n)
|
|
4350
4354
|
this._isReady = !0, this.showAd();
|
|
4351
4355
|
else {
|
|
4352
4356
|
const r = window.setTimeout(() => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jolibox/ads",
|
|
3
3
|
"description": "This project is for integrating Jolibox ads providers",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.9",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
],
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@jolibox/common": "1.4.
|
|
15
|
+
"@jolibox/common": "1.4.9",
|
|
16
16
|
"@emotion/css": "11.13.5",
|
|
17
|
-
"@jolibox/types": "1.4.
|
|
17
|
+
"@jolibox/types": "1.4.9",
|
|
18
18
|
"preact": "10.26.4",
|
|
19
19
|
"@preact/signals": "2.0.4",
|
|
20
|
-
"@jolibox/native-bridge": "1.4.
|
|
20
|
+
"@jolibox/native-bridge": "1.4.9"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "7.23.3",
|