@latest-thinking/lt-player 1.1.0-a → 1.1.0-b
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/package.json
CHANGED
package/src/services/Helper.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import {defaultType} from "../global/types/ModuleTypes";
|
|
2
2
|
|
|
3
3
|
export class Helper {
|
|
4
|
+
|
|
5
|
+
static inIframe () {
|
|
6
|
+
try {
|
|
7
|
+
return window.self !== window.top;
|
|
8
|
+
} catch (e) {
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
static getDevice() {
|
|
5
14
|
let device = 'desktop'; //initiate as false
|
|
6
15
|
if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
|
|
@@ -212,37 +212,39 @@ export class ResizeService {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
// return;
|
|
233
|
-
// }
|
|
234
|
-
//
|
|
235
|
-
// if (this.addInfoInSide) {
|
|
236
|
-
// return;
|
|
237
|
-
// }
|
|
238
|
-
//
|
|
239
|
-
// this.addInfoInSide = true;
|
|
240
|
-
// this.addInfoOutSide = false;
|
|
241
|
-
// createAddInfoButtonsInSide();
|
|
242
|
-
// }
|
|
243
|
-
|
|
244
|
-
createAddInfoButtonsInSide();
|
|
215
|
+
if (Helper.inIframe()) {
|
|
216
|
+
createAddInfoButtonsInSide();
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (containerWidth >= 380) {
|
|
221
|
+
|
|
222
|
+
if (this.addInfoInSide && (containerWidth + 70 <= 380)) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (this.addInfoOutSide) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
this.addInfoOutSide = true;
|
|
231
|
+
this.addInfoInSide = false;
|
|
245
232
|
|
|
233
|
+
createAddInfoButtonsOutSide();
|
|
234
|
+
} else {
|
|
235
|
+
|
|
236
|
+
if (this.addInfoOutSide && (containerWidth + 70 >= 380)) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (this.addInfoInSide) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
this.addInfoInSide = true;
|
|
245
|
+
this.addInfoOutSide = false;
|
|
246
|
+
createAddInfoButtonsInSide();
|
|
247
|
+
}
|
|
246
248
|
}
|
|
247
249
|
|
|
248
250
|
protected setDimensions(containerWidth: number, containerHeight: number, defaultData: defaultType) {
|