@plattar/plattar-ar-adapter 1.139.2 → 1.140.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 +42 -40
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +30 -43
- package/build/es2019/plattar-ar-adapter.min.js +1 -1
- package/dist/util/util.d.ts +6 -1
- package/dist/util/util.js +29 -42
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -2730,63 +2730,65 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2730
2730
|
_createClass(Util, null, [{
|
|
2731
2731
|
key: "canAugment",
|
|
2732
2732
|
value: function canAugment() {
|
|
2733
|
-
|
|
2734
|
-
// test google chrome on IOS and standard IOS test
|
|
2735
|
-
if ((/CriOS/i.test(userAgent) || /Macintosh|iPad|iPhone|iPod/.test(userAgent)) && !window.MSStream) {
|
|
2736
|
-
// inside facebook browser
|
|
2737
|
-
if (/\bFB[\w_]+\//.test(userAgent)) {
|
|
2738
|
-
return false;
|
|
2739
|
-
}
|
|
2740
|
-
// inside instagram browser
|
|
2741
|
-
if (/\bInstagram/i.test(userAgent)) {
|
|
2742
|
-
return false;
|
|
2743
|
-
}
|
|
2744
|
-
return Util.canQuicklook();
|
|
2745
|
-
} else if (/android/i.test(userAgent)) {
|
|
2746
|
-
return true;
|
|
2747
|
-
}
|
|
2748
|
-
return false;
|
|
2733
|
+
return Util.canQuicklook() || Util.canSceneViewer();
|
|
2749
2734
|
}
|
|
2750
2735
|
}, {
|
|
2751
2736
|
key: "canQuicklook",
|
|
2752
2737
|
value: function canQuicklook() {
|
|
2753
|
-
|
|
2754
|
-
|
|
2738
|
+
if (Util.isIOS()) {
|
|
2739
|
+
var isWKWebView = Boolean((window && window).webkit && window.webkit.messageHandlers);
|
|
2740
|
+
if (isWKWebView) {
|
|
2741
|
+
return Boolean(/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent));
|
|
2742
|
+
}
|
|
2743
|
+
var tempAnchor = document.createElement("a");
|
|
2744
|
+
return tempAnchor.relList && tempAnchor.relList.supports && tempAnchor.relList.supports("ar");
|
|
2745
|
+
}
|
|
2746
|
+
return false;
|
|
2755
2747
|
}
|
|
2756
2748
|
}, {
|
|
2757
2749
|
key: "canSceneViewer",
|
|
2758
2750
|
value: function canSceneViewer() {
|
|
2759
|
-
return Util.
|
|
2751
|
+
return Util.isAndroid() && !Util.isFirefox() && !Util.isOculus();
|
|
2760
2752
|
}
|
|
2761
2753
|
}, {
|
|
2762
2754
|
key: "canRealityViewer",
|
|
2763
2755
|
value: function canRealityViewer() {
|
|
2764
|
-
|
|
2765
|
-
return false;
|
|
2766
|
-
}
|
|
2767
|
-
if (/Macintosh|iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
|
2768
|
-
if (Util.isSafari() && Util.getIOSVersion()[0] >= 13) {
|
|
2769
|
-
return true;
|
|
2770
|
-
}
|
|
2771
|
-
}
|
|
2772
|
-
return false;
|
|
2756
|
+
return Util.isIOS() && Util.getIOSVersion()[0] >= 13;
|
|
2773
2757
|
}
|
|
2774
2758
|
}, {
|
|
2775
|
-
key: "
|
|
2776
|
-
value: function
|
|
2777
|
-
|
|
2778
|
-
return navigator.vendor.indexOf("Apple") > -1 && navigator.userAgent.indexOf("CriOS") === -1 && navigator.userAgent.indexOf("FxiOS") === -1;
|
|
2779
|
-
}
|
|
2780
|
-
return false;
|
|
2759
|
+
key: "isSafariOnIOS",
|
|
2760
|
+
value: function isSafariOnIOS() {
|
|
2761
|
+
return Util.isIOS() && Util.isSafari();
|
|
2781
2762
|
}
|
|
2782
2763
|
}, {
|
|
2783
2764
|
key: "isChromeOnIOS",
|
|
2784
2765
|
value: function isChromeOnIOS() {
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2766
|
+
return Util.isIOS() && /CriOS\//.test(navigator.userAgent);
|
|
2767
|
+
}
|
|
2768
|
+
}, {
|
|
2769
|
+
key: "isIOS",
|
|
2770
|
+
value: function isIOS() {
|
|
2771
|
+
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !self.MSStream || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
2772
|
+
}
|
|
2773
|
+
}, {
|
|
2774
|
+
key: "isAndroid",
|
|
2775
|
+
value: function isAndroid() {
|
|
2776
|
+
return /android/i.test(navigator.userAgent);
|
|
2777
|
+
}
|
|
2778
|
+
}, {
|
|
2779
|
+
key: "isFirefox",
|
|
2780
|
+
value: function isFirefox() {
|
|
2781
|
+
return /firefox/i.test(navigator.userAgent);
|
|
2782
|
+
}
|
|
2783
|
+
}, {
|
|
2784
|
+
key: "isOculus",
|
|
2785
|
+
value: function isOculus() {
|
|
2786
|
+
return /OculusBrowser/.test(navigator.userAgent);
|
|
2787
|
+
}
|
|
2788
|
+
}, {
|
|
2789
|
+
key: "isSafari",
|
|
2790
|
+
value: function isSafari() {
|
|
2791
|
+
return /Safari\//.test(navigator.userAgent);
|
|
2790
2792
|
}
|
|
2791
2793
|
}, {
|
|
2792
2794
|
key: "getIOSVersion",
|
|
@@ -2825,7 +2827,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2825
2827
|
Object.defineProperty(exports, "__esModule", {
|
|
2826
2828
|
value: true
|
|
2827
2829
|
});
|
|
2828
|
-
exports["default"] = "1.
|
|
2830
|
+
exports["default"] = "1.140.1";
|
|
2829
2831
|
}, {}],
|
|
2830
2832
|
17: [function (require, module, exports) {
|
|
2831
2833
|
"use strict";
|