@jolibox/ads 1.4.11 → 1.4.12
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.
- package/dist/index.js +5 -19
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4336,7 +4336,7 @@ class fs {
|
|
|
4336
4336
|
var i, n;
|
|
4337
4337
|
this._isReady = !1, (n = (i = this.adsContext) == null ? void 0 : i.adBreakDone) == null || n.call(i, e), e !== "ignored" && (this.adsContext = null);
|
|
4338
4338
|
}), ge(this, "reinit", async (e) => {
|
|
4339
|
-
this.destroy(e), await this.init();
|
|
4339
|
+
console.log("[JoliboxSDK] NewsBreak reinit breakStatus:", e), this.destroy(e), await this.init();
|
|
4340
4340
|
}), ge(this, "requestAds", async (e) => {
|
|
4341
4341
|
if (console.log("[JoliboxSDK] NewsBreak newsbreak this.adsContext", this.adsContext), this.adsContext) {
|
|
4342
4342
|
this.destroy("ignored");
|
|
@@ -4353,25 +4353,11 @@ class fs {
|
|
|
4353
4353
|
return;
|
|
4354
4354
|
}
|
|
4355
4355
|
const n = await i.isRewardReady();
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
const r = window.setTimeout(() => {
|
|
4360
|
-
var o, s;
|
|
4361
|
-
console.log("[JoliboxSDK] NewsBreak requestAds timeoutId:", this._isReady), this._isReady || ((s = (o = this.adsContext) == null ? void 0 : o.adBreakDone) == null || s.call(o, "timeout"), this.reinit("timeout"));
|
|
4362
|
-
}, 5e3);
|
|
4363
|
-
i.createRewardAd({
|
|
4364
|
-
platform: "jolibox"
|
|
4365
|
-
}).then((o) => {
|
|
4366
|
-
var s, a;
|
|
4367
|
-
console.log("[JoliboxSDK] NewsBreak requestAds sdk.createRewardAd result:", o), clearTimeout(r), o.success && o.ready ? (this._isReady = !0, this.showAd()) : (this.reinit("noAdPreloaded"), (a = (s = this.adsContext) == null ? void 0 : s.adBreakDone) == null || a.call(s, "noAdPreloaded"));
|
|
4368
|
-
}).catch((o) => {
|
|
4369
|
-
var s, a;
|
|
4370
|
-
console.log("[JoliboxSDK] NewsBreak requestAds sdk.createRewardAd error:", o), clearTimeout(r), this.reinit("noAdPreloaded"), (a = (s = this.adsContext) == null ? void 0 : s.adBreakDone) == null || a.call(s, "noAdPreloaded");
|
|
4371
|
-
});
|
|
4372
|
-
}
|
|
4356
|
+
console.log("[JoliboxSDK] NewsBreak requestAds sdk.isRewardReady", n), n ? (this._isReady = !0, this.showAd()) : (await i.createRewardAd({
|
|
4357
|
+
platform: "jolibox"
|
|
4358
|
+
}), this.showAd());
|
|
4373
4359
|
}), ge(this, "showAd", () => {
|
|
4374
|
-
if (!this.adsContext) {
|
|
4360
|
+
if (console.log("[JoliboxSDK] NewsBreak showAd"), !this.adsContext) {
|
|
4375
4361
|
this.destroy("error");
|
|
4376
4362
|
return;
|
|
4377
4363
|
}
|
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.12",
|
|
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.12",
|
|
16
16
|
"@emotion/css": "11.13.5",
|
|
17
|
-
"@jolibox/types": "1.4.
|
|
17
|
+
"@jolibox/types": "1.4.12",
|
|
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.12"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/core": "7.23.3",
|