@realsee/vreo 2.2.4 → 2.2.6

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.
@@ -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 container = document.getElementById('vreo-app') || document.createElement('div');
52
- ReactDOM.unmountComponentAtNode(container);
53
- container.setAttribute('id', 'vreo-app');
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) {
@@ -89,7 +89,7 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
89
89
  _context.next = 20;
90
90
  return five.ready();
91
91
  case 20:
92
- movePanoOptions = Object.assign(args, {
92
+ movePanoOptions = Object.assign({}, args, {
93
93
  duration: duration - (performance.now() - start),
94
94
  // 移动耗时
95
95
  moveEndCallback: function moveEndCallback() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/vreo",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "description": "Vreo (VR Video 缩写) 是基于如视三维渲染引擎 Five 和 用户界面构建库 React 实现的如视 3D 空间剧本播放器。",
5
5
  "keywords": [
6
6
  "realsee",