@plattar/plattar-ar-adapter 1.119.1 → 1.120.1
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/build/es2015/plattar-ar-adapter.js +81 -35
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +64 -24
- package/build/es2019/plattar-ar-adapter.min.js +1 -1
- package/dist/ar/product-ar.js +1 -1
- package/dist/util/util.d.ts +1 -0
- package/dist/util/util.js +13 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/dist/ar/product-ar.js
CHANGED
|
@@ -103,7 +103,7 @@ class ProductAR extends launcher_ar_1.LauncherAR {
|
|
|
103
103
|
this._setupAnalytics(product, variation);
|
|
104
104
|
// we need to define our AR module here
|
|
105
105
|
// we are in Safari/Quicklook mode here
|
|
106
|
-
if (util_1.Util.isSafari()) {
|
|
106
|
+
if (util_1.Util.isSafari() || util_1.Util.isChromeOnIOS()) {
|
|
107
107
|
// model needs to have either USDZ or REALITY files defined
|
|
108
108
|
// we load REALITY stuff first if available
|
|
109
109
|
if (model.attributes.reality_filename && util_1.Util.canRealityViewer()) {
|
package/dist/util/util.d.ts
CHANGED
package/dist/util/util.js
CHANGED
|
@@ -6,18 +6,20 @@ exports.Util = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
class Util {
|
|
8
8
|
static canAugment() {
|
|
9
|
-
|
|
9
|
+
const userAgent = navigator.userAgent;
|
|
10
|
+
// test google chrome on IOS and standard IOS test
|
|
11
|
+
if ((/CriOS/i.test(userAgent) || /Macintosh|iPad|iPhone|iPod/.test(userAgent)) && !window.MSStream) {
|
|
10
12
|
// inside facebook browser
|
|
11
|
-
if (/\bFB[\w_]+\//.test(
|
|
13
|
+
if (/\bFB[\w_]+\//.test(userAgent)) {
|
|
12
14
|
return false;
|
|
13
15
|
}
|
|
14
16
|
// inside instagram browser
|
|
15
|
-
if (/\bInstagram/i.test(
|
|
17
|
+
if (/\bInstagram/i.test(userAgent)) {
|
|
16
18
|
return false;
|
|
17
19
|
}
|
|
18
20
|
return Util.canQuicklook();
|
|
19
21
|
}
|
|
20
|
-
else if (/android/i.test(
|
|
22
|
+
else if (/android/i.test(userAgent)) {
|
|
21
23
|
return true;
|
|
22
24
|
}
|
|
23
25
|
return false;
|
|
@@ -50,6 +52,13 @@ class Util {
|
|
|
50
52
|
}
|
|
51
53
|
return false;
|
|
52
54
|
}
|
|
55
|
+
static isChromeOnIOS() {
|
|
56
|
+
const userAgent = navigator.userAgent;
|
|
57
|
+
if (userAgent) {
|
|
58
|
+
return Util.canAugment() && /CriOS/i.test(userAgent);
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
53
62
|
static getIOSVersion() {
|
|
54
63
|
if (/iP(hone|od|ad)/.test(navigator.platform)) {
|
|
55
64
|
const v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.
|
|
1
|
+
declare const _default: "1.120.1";
|
|
2
2
|
export default _default;
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plattar/plattar-ar-adapter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.120.1",
|
|
4
4
|
"description": "Plattar AR Adapter for interfacing with Google & Apple WebAR",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"homepage": "https://www.plattar.com",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@plattar/plattar-analytics": "^1.117.2",
|
|
41
|
-
"@plattar/plattar-api": "^1.
|
|
42
|
-
"@plattar/plattar-qrcode": "1.
|
|
41
|
+
"@plattar/plattar-api": "^1.120.1",
|
|
42
|
+
"@plattar/plattar-qrcode": "1.120.3",
|
|
43
43
|
"@plattar/plattar-web": "^1.117.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|