@realsee/vreo 2.2.3 → 2.2.5
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/lib/Player/index.js
CHANGED
|
@@ -32,6 +32,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
32
32
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33
33
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
34
|
var DefaultAudioCacheLength = 3;
|
|
35
|
+
var id = "vreo-app-dhjskadhksahdjskahdjksa";
|
|
35
36
|
var audioCacheLength = Number((_location$search$matc = (_location$search$matc2 = location.search.match(/audio_cache=(\d+)/)) === null || _location$search$matc2 === void 0 ? void 0 : _location$search$matc2[1]) !== null && _location$search$matc !== void 0 ? _location$search$matc : DefaultAudioCacheLength);
|
|
36
37
|
var Player = /*#__PURE__*/function (_Subscribe) {
|
|
37
38
|
_inherits(Player, _Subscribe);
|
|
@@ -48,9 +49,13 @@ var Player = /*#__PURE__*/function (_Subscribe) {
|
|
|
48
49
|
}
|
|
49
50
|
if (!configs.container) {
|
|
50
51
|
var _five$getElement;
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
var oldElement = document.getElementById(id);
|
|
53
|
+
if (oldElement) {
|
|
54
|
+
ReactDOM.unmountComponentAtNode(oldElement);
|
|
55
|
+
oldElement.remove();
|
|
56
|
+
}
|
|
57
|
+
var container = document.createElement('div');
|
|
58
|
+
container.id = id;
|
|
54
59
|
configs.container = container;
|
|
55
60
|
var fiveCanvasDomParent = (_five$getElement = five.getElement()) === null || _five$getElement === void 0 ? void 0 : _five$getElement.parentNode;
|
|
56
61
|
if (fiveCanvasDomParent) {
|
|
@@ -98,8 +98,9 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
|
|
|
98
98
|
// 移动结束
|
|
99
99
|
moveCancelCallback: function moveCancelCallback() {
|
|
100
100
|
resolve(true);
|
|
101
|
-
}
|
|
102
|
-
//
|
|
101
|
+
},
|
|
102
|
+
// 移动开始
|
|
103
|
+
effect: args.transEffect || 'fly'
|
|
103
104
|
});
|
|
104
105
|
_context.next = 23;
|
|
105
106
|
return five.moveToPano(panoIndex, movePanoOptions);
|