@smoud/playable-sdk 1.0.16 → 1.0.18
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/defines.d.ts +1 -0
- package/dist/esm/index.js +7 -10
- package/dist/iife/index.js +7 -10
- package/dist/index.js +7 -10
- package/package.json +1 -1
package/defines.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -169,9 +169,8 @@ function startMraidProtocol() {
|
|
|
169
169
|
mraid.removeEventListener("ready", startMraidProtocol);
|
|
170
170
|
function mraidStateChanged(viewable) {
|
|
171
171
|
if (viewable) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
} else {
|
|
172
|
+
handleResume();
|
|
173
|
+
if (!sdk.isReady) {
|
|
175
174
|
const maxSize = mraid.getMaxSize();
|
|
176
175
|
sdk.maxWidth = Math.floor(maxSize.width);
|
|
177
176
|
sdk.maxHeight = Math.floor(maxSize.height);
|
|
@@ -223,9 +222,8 @@ function startDapiProtocol() {
|
|
|
223
222
|
if (isProtocolInitialized) return;
|
|
224
223
|
function dapiIsViewable(event) {
|
|
225
224
|
if (event.isViewable) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
} else {
|
|
225
|
+
handleResume();
|
|
226
|
+
if (!sdk.isReady) {
|
|
229
227
|
const screenSize = dapi.getScreenSize();
|
|
230
228
|
screenSize.width = Math.floor(screenSize.width);
|
|
231
229
|
screenSize.height = Math.floor(screenSize.height);
|
|
@@ -273,9 +271,8 @@ function startDefaultProtocol() {
|
|
|
273
271
|
}
|
|
274
272
|
document.addEventListener("visibilitychange", () => {
|
|
275
273
|
if (document.visibilityState === "visible") {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
} else {
|
|
274
|
+
handleResume();
|
|
275
|
+
if (!sdk.isReady && document.readyState === "complete") {
|
|
279
276
|
bootAd();
|
|
280
277
|
}
|
|
281
278
|
} else {
|
|
@@ -594,7 +591,7 @@ var _sdk = class _sdk {
|
|
|
594
591
|
}
|
|
595
592
|
};
|
|
596
593
|
/** Current version of the SDK */
|
|
597
|
-
_sdk.version = "1.0.
|
|
594
|
+
_sdk.version = "1.0.18";
|
|
598
595
|
/** Current maximum width of the playable ad container in pixels */
|
|
599
596
|
_sdk.maxWidth = Math.floor(window.innerWidth);
|
|
600
597
|
/** Current maximum height of the playable ad container in pixels */
|
package/dist/iife/index.js
CHANGED
|
@@ -171,9 +171,8 @@
|
|
|
171
171
|
mraid.removeEventListener("ready", startMraidProtocol);
|
|
172
172
|
function mraidStateChanged(viewable) {
|
|
173
173
|
if (viewable) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
} else {
|
|
174
|
+
handleResume();
|
|
175
|
+
if (!sdk.isReady) {
|
|
177
176
|
const maxSize = mraid.getMaxSize();
|
|
178
177
|
sdk.maxWidth = Math.floor(maxSize.width);
|
|
179
178
|
sdk.maxHeight = Math.floor(maxSize.height);
|
|
@@ -225,9 +224,8 @@
|
|
|
225
224
|
if (isProtocolInitialized) return;
|
|
226
225
|
function dapiIsViewable(event) {
|
|
227
226
|
if (event.isViewable) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
} else {
|
|
227
|
+
handleResume();
|
|
228
|
+
if (!sdk.isReady) {
|
|
231
229
|
const screenSize = dapi.getScreenSize();
|
|
232
230
|
screenSize.width = Math.floor(screenSize.width);
|
|
233
231
|
screenSize.height = Math.floor(screenSize.height);
|
|
@@ -275,9 +273,8 @@
|
|
|
275
273
|
}
|
|
276
274
|
document.addEventListener("visibilitychange", () => {
|
|
277
275
|
if (document.visibilityState === "visible") {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
} else {
|
|
276
|
+
handleResume();
|
|
277
|
+
if (!sdk.isReady && document.readyState === "complete") {
|
|
281
278
|
bootAd();
|
|
282
279
|
}
|
|
283
280
|
} else {
|
|
@@ -596,7 +593,7 @@
|
|
|
596
593
|
}
|
|
597
594
|
};
|
|
598
595
|
/** Current version of the SDK */
|
|
599
|
-
_sdk.version = "1.0.
|
|
596
|
+
_sdk.version = "1.0.18";
|
|
600
597
|
/** Current maximum width of the playable ad container in pixels */
|
|
601
598
|
_sdk.maxWidth = Math.floor(window.innerWidth);
|
|
602
599
|
/** Current maximum height of the playable ad container in pixels */
|
package/dist/index.js
CHANGED
|
@@ -196,9 +196,8 @@ function startMraidProtocol() {
|
|
|
196
196
|
mraid.removeEventListener("ready", startMraidProtocol);
|
|
197
197
|
function mraidStateChanged(viewable) {
|
|
198
198
|
if (viewable) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
} else {
|
|
199
|
+
handleResume();
|
|
200
|
+
if (!sdk.isReady) {
|
|
202
201
|
const maxSize = mraid.getMaxSize();
|
|
203
202
|
sdk.maxWidth = Math.floor(maxSize.width);
|
|
204
203
|
sdk.maxHeight = Math.floor(maxSize.height);
|
|
@@ -250,9 +249,8 @@ function startDapiProtocol() {
|
|
|
250
249
|
if (isProtocolInitialized) return;
|
|
251
250
|
function dapiIsViewable(event) {
|
|
252
251
|
if (event.isViewable) {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
} else {
|
|
252
|
+
handleResume();
|
|
253
|
+
if (!sdk.isReady) {
|
|
256
254
|
const screenSize = dapi.getScreenSize();
|
|
257
255
|
screenSize.width = Math.floor(screenSize.width);
|
|
258
256
|
screenSize.height = Math.floor(screenSize.height);
|
|
@@ -300,9 +298,8 @@ function startDefaultProtocol() {
|
|
|
300
298
|
}
|
|
301
299
|
document.addEventListener("visibilitychange", () => {
|
|
302
300
|
if (document.visibilityState === "visible") {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
} else {
|
|
301
|
+
handleResume();
|
|
302
|
+
if (!sdk.isReady && document.readyState === "complete") {
|
|
306
303
|
bootAd();
|
|
307
304
|
}
|
|
308
305
|
} else {
|
|
@@ -621,7 +618,7 @@ var _sdk = class _sdk {
|
|
|
621
618
|
}
|
|
622
619
|
};
|
|
623
620
|
/** Current version of the SDK */
|
|
624
|
-
_sdk.version = "1.0.
|
|
621
|
+
_sdk.version = "1.0.18";
|
|
625
622
|
/** Current maximum width of the playable ad container in pixels */
|
|
626
623
|
_sdk.maxWidth = Math.floor(window.innerWidth);
|
|
627
624
|
/** 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.0.18",
|
|
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",
|