@smoud/playable-sdk 1.0.23 → 1.1.0
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/README.md +1 -0
- package/dist/esm/index.js +7 -11
- package/dist/iife/index.js +7 -11
- package/dist/index.js +7 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -410,6 +410,7 @@ Get started quickly with our template projects:
|
|
|
410
410
|
- [Google HTML5 Validator](https://h5validator.appspot.com/adwords/asset)
|
|
411
411
|
- [IronSource - Submit an HTML asset for review](https://developers.is.com/ironsource-mobile/general/html-upload/)
|
|
412
412
|
- [Mintegral Testing Tool](https://www.playturbo.com/review)
|
|
413
|
+
- Moloco - Test your creatives [Info](https://help.moloco.com/hc/en-us/articles/22553113373335-Test-your-creatives) / [iOS](https://apps.apple.com/us/app/creative-lab/id6474686021) / [Android](https://play.google.com/store/apps/details?id=com.moloco.peeker&pli=1)
|
|
413
414
|
|
|
414
415
|
## Issues
|
|
415
416
|
|
package/dist/esm/index.js
CHANGED
|
@@ -97,7 +97,7 @@ function ensureProtocol() {
|
|
|
97
97
|
actualProtocol = DAPI;
|
|
98
98
|
} catch (error) {
|
|
99
99
|
}
|
|
100
|
-
} else if ("facebook" === AD_NETWORK) {
|
|
100
|
+
} else if ("facebook" === AD_NETWORK || "moloco" === AD_NETWORK || "mytarget" === AD_NETWORK) {
|
|
101
101
|
try {
|
|
102
102
|
if (FbPlayableAd) actualProtocol = FACEBOOK;
|
|
103
103
|
} catch (error) {
|
|
@@ -111,7 +111,7 @@ function ensureProtocol() {
|
|
|
111
111
|
if (window.gameReady) actualProtocol = MINTEGRAL;
|
|
112
112
|
} else if ("tapjoy" === AD_NETWORK) {
|
|
113
113
|
if (window.TJ_API) actualProtocol = TAPJOY;
|
|
114
|
-
} else if ("tiktok" === AD_NETWORK) {
|
|
114
|
+
} else if ("tiktok" === AD_NETWORK || "pangle" === AD_NETWORK) {
|
|
115
115
|
if (window.openAppStore) actualProtocol = TIKTOK;
|
|
116
116
|
} else if ("smadex" === AD_NETWORK) {
|
|
117
117
|
try {
|
|
@@ -509,13 +509,9 @@ var _sdk = class _sdk {
|
|
|
509
509
|
*/
|
|
510
510
|
static install() {
|
|
511
511
|
if (!_sdk.isFinished) {
|
|
512
|
-
_sdk.isFinished = true;
|
|
513
512
|
let timeout = 0;
|
|
514
|
-
if ("tapjoy" === AD_NETWORK
|
|
515
|
-
|
|
516
|
-
timeout = 300;
|
|
517
|
-
}
|
|
518
|
-
emitEvent("finish");
|
|
513
|
+
if ("tapjoy" === AD_NETWORK) timeout = 300;
|
|
514
|
+
_sdk.finish();
|
|
519
515
|
setTimeout(function() {
|
|
520
516
|
_sdk.install();
|
|
521
517
|
}, timeout);
|
|
@@ -533,7 +529,7 @@ var _sdk = class _sdk {
|
|
|
533
529
|
dapi.openStoreUrl();
|
|
534
530
|
} else if ("nucleo" === AD_PROTOCOL && isNucleo()) {
|
|
535
531
|
NUC.trigger.convert(destinationUrl);
|
|
536
|
-
} else if ("facebook"
|
|
532
|
+
} else if (("facebook" === AD_NETWORK || "moloco" === AD_NETWORK || "mytarget" === AD_NETWORK) && isFacebook()) {
|
|
537
533
|
FbPlayableAd.onCTAClick();
|
|
538
534
|
} else if ("snapchat" == AD_NETWORK && isSnapchat()) {
|
|
539
535
|
ScPlayableAd.onCTAClick();
|
|
@@ -547,7 +543,7 @@ var _sdk = class _sdk {
|
|
|
547
543
|
window.install && window.install();
|
|
548
544
|
} else if ("tapjoy" === AD_NETWORK && isTapjoy()) {
|
|
549
545
|
window.TJ_API.click();
|
|
550
|
-
} else if ("tiktok" === AD_NETWORK && isTikTok()) {
|
|
546
|
+
} else if (("tiktok" === AD_NETWORK || "pangle" === AD_NETWORK) && isTikTok()) {
|
|
551
547
|
window.openAppStore();
|
|
552
548
|
} else {
|
|
553
549
|
window.open(destinationUrl);
|
|
@@ -653,7 +649,7 @@ var _sdk = class _sdk {
|
|
|
653
649
|
}
|
|
654
650
|
};
|
|
655
651
|
/** Current version of the SDK */
|
|
656
|
-
_sdk.version = "1.0
|
|
652
|
+
_sdk.version = "1.1.0";
|
|
657
653
|
/** Current maximum width of the playable ad container in pixels */
|
|
658
654
|
_sdk.maxWidth = Math.floor(window.innerWidth);
|
|
659
655
|
/** Current maximum height of the playable ad container in pixels */
|
package/dist/iife/index.js
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
actualProtocol = DAPI;
|
|
100
100
|
} catch (error) {
|
|
101
101
|
}
|
|
102
|
-
} else if ("facebook" === AD_NETWORK) {
|
|
102
|
+
} else if ("facebook" === AD_NETWORK || "moloco" === AD_NETWORK || "mytarget" === AD_NETWORK) {
|
|
103
103
|
try {
|
|
104
104
|
if (FbPlayableAd) actualProtocol = FACEBOOK;
|
|
105
105
|
} catch (error) {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
if (window.gameReady) actualProtocol = MINTEGRAL;
|
|
114
114
|
} else if ("tapjoy" === AD_NETWORK) {
|
|
115
115
|
if (window.TJ_API) actualProtocol = TAPJOY;
|
|
116
|
-
} else if ("tiktok" === AD_NETWORK) {
|
|
116
|
+
} else if ("tiktok" === AD_NETWORK || "pangle" === AD_NETWORK) {
|
|
117
117
|
if (window.openAppStore) actualProtocol = TIKTOK;
|
|
118
118
|
} else if ("smadex" === AD_NETWORK) {
|
|
119
119
|
try {
|
|
@@ -511,13 +511,9 @@
|
|
|
511
511
|
*/
|
|
512
512
|
static install() {
|
|
513
513
|
if (!_sdk.isFinished) {
|
|
514
|
-
_sdk.isFinished = true;
|
|
515
514
|
let timeout = 0;
|
|
516
|
-
if ("tapjoy" === AD_NETWORK
|
|
517
|
-
|
|
518
|
-
timeout = 300;
|
|
519
|
-
}
|
|
520
|
-
emitEvent("finish");
|
|
515
|
+
if ("tapjoy" === AD_NETWORK) timeout = 300;
|
|
516
|
+
_sdk.finish();
|
|
521
517
|
setTimeout(function() {
|
|
522
518
|
_sdk.install();
|
|
523
519
|
}, timeout);
|
|
@@ -535,7 +531,7 @@
|
|
|
535
531
|
dapi.openStoreUrl();
|
|
536
532
|
} else if ("nucleo" === AD_PROTOCOL && isNucleo()) {
|
|
537
533
|
NUC.trigger.convert(destinationUrl);
|
|
538
|
-
} else if ("facebook"
|
|
534
|
+
} else if (("facebook" === AD_NETWORK || "moloco" === AD_NETWORK || "mytarget" === AD_NETWORK) && isFacebook()) {
|
|
539
535
|
FbPlayableAd.onCTAClick();
|
|
540
536
|
} else if ("snapchat" == AD_NETWORK && isSnapchat()) {
|
|
541
537
|
ScPlayableAd.onCTAClick();
|
|
@@ -549,7 +545,7 @@
|
|
|
549
545
|
window.install && window.install();
|
|
550
546
|
} else if ("tapjoy" === AD_NETWORK && isTapjoy()) {
|
|
551
547
|
window.TJ_API.click();
|
|
552
|
-
} else if ("tiktok" === AD_NETWORK && isTikTok()) {
|
|
548
|
+
} else if (("tiktok" === AD_NETWORK || "pangle" === AD_NETWORK) && isTikTok()) {
|
|
553
549
|
window.openAppStore();
|
|
554
550
|
} else {
|
|
555
551
|
window.open(destinationUrl);
|
|
@@ -655,7 +651,7 @@
|
|
|
655
651
|
}
|
|
656
652
|
};
|
|
657
653
|
/** Current version of the SDK */
|
|
658
|
-
_sdk.version = "1.0
|
|
654
|
+
_sdk.version = "1.1.0";
|
|
659
655
|
/** Current maximum width of the playable ad container in pixels */
|
|
660
656
|
_sdk.maxWidth = Math.floor(window.innerWidth);
|
|
661
657
|
/** Current maximum height of the playable ad container in pixels */
|
package/dist/index.js
CHANGED
|
@@ -124,7 +124,7 @@ function ensureProtocol() {
|
|
|
124
124
|
actualProtocol = DAPI;
|
|
125
125
|
} catch (error) {
|
|
126
126
|
}
|
|
127
|
-
} else if ("facebook" === AD_NETWORK) {
|
|
127
|
+
} else if ("facebook" === AD_NETWORK || "moloco" === AD_NETWORK || "mytarget" === AD_NETWORK) {
|
|
128
128
|
try {
|
|
129
129
|
if (FbPlayableAd) actualProtocol = FACEBOOK;
|
|
130
130
|
} catch (error) {
|
|
@@ -138,7 +138,7 @@ function ensureProtocol() {
|
|
|
138
138
|
if (window.gameReady) actualProtocol = MINTEGRAL;
|
|
139
139
|
} else if ("tapjoy" === AD_NETWORK) {
|
|
140
140
|
if (window.TJ_API) actualProtocol = TAPJOY;
|
|
141
|
-
} else if ("tiktok" === AD_NETWORK) {
|
|
141
|
+
} else if ("tiktok" === AD_NETWORK || "pangle" === AD_NETWORK) {
|
|
142
142
|
if (window.openAppStore) actualProtocol = TIKTOK;
|
|
143
143
|
} else if ("smadex" === AD_NETWORK) {
|
|
144
144
|
try {
|
|
@@ -536,13 +536,9 @@ var _sdk = class _sdk {
|
|
|
536
536
|
*/
|
|
537
537
|
static install() {
|
|
538
538
|
if (!_sdk.isFinished) {
|
|
539
|
-
_sdk.isFinished = true;
|
|
540
539
|
let timeout = 0;
|
|
541
|
-
if ("tapjoy" === AD_NETWORK
|
|
542
|
-
|
|
543
|
-
timeout = 300;
|
|
544
|
-
}
|
|
545
|
-
emitEvent("finish");
|
|
540
|
+
if ("tapjoy" === AD_NETWORK) timeout = 300;
|
|
541
|
+
_sdk.finish();
|
|
546
542
|
setTimeout(function() {
|
|
547
543
|
_sdk.install();
|
|
548
544
|
}, timeout);
|
|
@@ -560,7 +556,7 @@ var _sdk = class _sdk {
|
|
|
560
556
|
dapi.openStoreUrl();
|
|
561
557
|
} else if ("nucleo" === AD_PROTOCOL && isNucleo()) {
|
|
562
558
|
NUC.trigger.convert(destinationUrl);
|
|
563
|
-
} else if ("facebook"
|
|
559
|
+
} else if (("facebook" === AD_NETWORK || "moloco" === AD_NETWORK || "mytarget" === AD_NETWORK) && isFacebook()) {
|
|
564
560
|
FbPlayableAd.onCTAClick();
|
|
565
561
|
} else if ("snapchat" == AD_NETWORK && isSnapchat()) {
|
|
566
562
|
ScPlayableAd.onCTAClick();
|
|
@@ -574,7 +570,7 @@ var _sdk = class _sdk {
|
|
|
574
570
|
window.install && window.install();
|
|
575
571
|
} else if ("tapjoy" === AD_NETWORK && isTapjoy()) {
|
|
576
572
|
window.TJ_API.click();
|
|
577
|
-
} else if ("tiktok" === AD_NETWORK && isTikTok()) {
|
|
573
|
+
} else if (("tiktok" === AD_NETWORK || "pangle" === AD_NETWORK) && isTikTok()) {
|
|
578
574
|
window.openAppStore();
|
|
579
575
|
} else {
|
|
580
576
|
window.open(destinationUrl);
|
|
@@ -680,7 +676,7 @@ var _sdk = class _sdk {
|
|
|
680
676
|
}
|
|
681
677
|
};
|
|
682
678
|
/** Current version of the SDK */
|
|
683
|
-
_sdk.version = "1.0
|
|
679
|
+
_sdk.version = "1.1.0";
|
|
684
680
|
/** Current maximum width of the playable ad container in pixels */
|
|
685
681
|
_sdk.maxWidth = Math.floor(window.innerWidth);
|
|
686
682
|
/** Current maximum height of the playable ad container in pixels */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smoud/playable-sdk",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "It's unified Playable SDK that supports MRAID, Google, Facebook, Vungle, and many more Ad Networks, simplifying playable ad development with a standardized interface for seamless cross-network compatibility.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|