@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.
@@ -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()) {
@@ -7,6 +7,7 @@ export declare class Util {
7
7
  static canSceneViewer(): boolean;
8
8
  static canRealityViewer(): boolean;
9
9
  static isSafari(): boolean;
10
+ static isChromeOnIOS(): boolean;
10
11
  static getIOSVersion(): number[];
11
12
  static getChromeVersion(): number;
12
13
  }
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
- if (/Macintosh|iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
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(navigator.userAgent)) {
13
+ if (/\bFB[\w_]+\//.test(userAgent)) {
12
14
  return false;
13
15
  }
14
16
  // inside instagram browser
15
- if (/\bInstagram/i.test(navigator.userAgent)) {
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(navigator.userAgent)) {
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.119.1";
1
+ declare const _default: "1.120.1";
2
2
  export default _default;
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = "1.119.1";
3
+ exports.default = "1.120.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plattar/plattar-ar-adapter",
3
- "version": "1.119.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.118.1",
42
- "@plattar/plattar-qrcode": "1.119.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": {