@inappstory/slide-api 0.1.7 → 0.1.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.
- package/dist/index.cjs +20 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1151,6 +1151,12 @@ class EsModuleSdkApi {
|
|
|
1151
1151
|
enableVerticalSwipeGesture() {
|
|
1152
1152
|
this.sdkBinding.enableVerticalSwipeGesture();
|
|
1153
1153
|
}
|
|
1154
|
+
disableHorizontalSwipeGesture() {
|
|
1155
|
+
this.sdkBinding.disableHorizontalSwipeGesture();
|
|
1156
|
+
}
|
|
1157
|
+
enableHorizontalSwipeGesture() {
|
|
1158
|
+
this.sdkBinding.enableHorizontalSwipeGesture();
|
|
1159
|
+
}
|
|
1154
1160
|
disableBackpress() { }
|
|
1155
1161
|
enableBackpress() { }
|
|
1156
1162
|
closeCard(reason) {
|
|
@@ -2241,6 +2247,15 @@ class Video {
|
|
|
2241
2247
|
this._isVOD = Boolean(this._vodData != null && this._VideoPlayer != null);
|
|
2242
2248
|
if (this._isVOD) ;
|
|
2243
2249
|
else {
|
|
2250
|
+
if (this._vodData != null && Array.isArray(this._vodData.formats)) {
|
|
2251
|
+
this._vodData.formats.forEach(format => {
|
|
2252
|
+
const videoSource = window.document.createElement("source");
|
|
2253
|
+
videoSource.type = format.mimeType;
|
|
2254
|
+
videoSource.src = format.url;
|
|
2255
|
+
videoSource.dataset.remoteSrc = format.url;
|
|
2256
|
+
this._video.appendChild(videoSource);
|
|
2257
|
+
});
|
|
2258
|
+
}
|
|
2244
2259
|
this.mediaElementsLoadingPromises.push(waitForVideoHtmlElementLoad(this._video));
|
|
2245
2260
|
}
|
|
2246
2261
|
// console.log({mediaElementsLoadingPromises: this.mediaElementsLoadingPromises})
|
|
@@ -3860,7 +3875,7 @@ let SlideApi$1 = class SlideApi {
|
|
|
3860
3875
|
async _onAllMediaLoaded(slide) {
|
|
3861
3876
|
return new Promise((resolve, reject) => {
|
|
3862
3877
|
const promises = slide.layers.flatMap(layer => layer.elements.flatMap(element => element.mediaElementsLoadingPromises));
|
|
3863
|
-
console.log({ promises });
|
|
3878
|
+
// console.log({ promises });
|
|
3864
3879
|
let checkerTimerId = undefined;
|
|
3865
3880
|
let timeOutFired = false;
|
|
3866
3881
|
if (promises.length > 0) {
|
|
@@ -17099,6 +17114,7 @@ class WidgetProducts extends WidgetBase {
|
|
|
17099
17114
|
this.isOpen = true;
|
|
17100
17115
|
// prevent next slide navigation gesture
|
|
17101
17116
|
this.isClickCapturedByWidget = true;
|
|
17117
|
+
this.sdkApi.disableHorizontalSwipeGesture();
|
|
17102
17118
|
this.sdkApi.disableVerticalSwipeGesture();
|
|
17103
17119
|
this.sdkApi.disableBackpress();
|
|
17104
17120
|
this._statEventWidgetOpen(this.currentModels);
|
|
@@ -17118,6 +17134,7 @@ class WidgetProducts extends WidgetBase {
|
|
|
17118
17134
|
this.productsView?.classList.add("ias-products-container-view--hidden");
|
|
17119
17135
|
this.element.classList.remove("hidden");
|
|
17120
17136
|
this.isClickCapturedByWidget = false;
|
|
17137
|
+
this.sdkApi.enableHorizontalSwipeGesture();
|
|
17121
17138
|
if (this.swipeGestureDetector != null) {
|
|
17122
17139
|
this.swipeGestureDetector.destroy();
|
|
17123
17140
|
this.swipeGestureDetector = null;
|
|
@@ -18577,6 +18594,7 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
18577
18594
|
}
|
|
18578
18595
|
e.preventDefault();
|
|
18579
18596
|
this.isClickCapturedBySlider = true;
|
|
18597
|
+
this.sdkApi.disableHorizontalSwipeGesture();
|
|
18580
18598
|
if (!this.maxHandlePos) {
|
|
18581
18599
|
this.update(true, false);
|
|
18582
18600
|
}
|
|
@@ -18606,6 +18624,7 @@ class WidgetRangeSlider extends WidgetBase {
|
|
|
18606
18624
|
handleEnd(e) {
|
|
18607
18625
|
this.env.requestAnimationFrame(() => {
|
|
18608
18626
|
this.isClickCapturedBySlider = false;
|
|
18627
|
+
this.sdkApi.enableHorizontalSwipeGesture();
|
|
18609
18628
|
});
|
|
18610
18629
|
// e.preventDefault();
|
|
18611
18630
|
this.env.document.removeEventListener("touchmove", this.handleMove);
|