@realsee/vreo 0.2.0-alpha.9 → 1.0.0-alpha.10

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.
Files changed (161) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +16 -5
  3. package/docs/assets/highlight.css +1 -1
  4. package/docs/assets/main.js +2 -2
  5. package/docs/assets/search.js +1 -1
  6. package/docs/assets/style.css +28 -2
  7. package/docs/classes/Player.AudioLike.html +52 -0
  8. package/docs/classes/Player.Controller.html +13 -13
  9. package/docs/classes/Player.Player-1.html +11 -11
  10. package/docs/classes/Player.VideoAgentMesh.html +53 -53
  11. package/docs/classes/Player.VideoAgentScene.html +1 -1
  12. package/docs/demo/assets/AppReact.ea8cbdb3.js +1 -0
  13. package/docs/demo/assets/default.1dd2b2d4.js +3988 -0
  14. package/docs/demo/assets/default.bc4c715d.css +1 -0
  15. package/docs/demo/assets/dynamic.cd7d1da6.js +1 -0
  16. package/docs/demo/assets/examples.98aaf9e2.js +25 -0
  17. package/docs/demo/assets/examples.dac4a6fe.css +1 -0
  18. package/docs/demo/assets/index.9331038f.css +1 -0
  19. package/docs/demo/assets/index.a3d7bd8a.js +1 -0
  20. package/docs/demo/assets/main.f0c47cae.js +1 -0
  21. package/docs/demo/assets/react.2ee8565f.css +1 -0
  22. package/docs/demo/assets/react.5f3bcfc5.js +25 -0
  23. package/docs/demo/assets/znRoyv06SZQeqA7m.0057e8ae.js +1 -0
  24. package/docs/demo/examples.html +17 -0
  25. package/docs/demo/index-react-dynamic.html +20 -0
  26. package/docs/demo/index-react.html +20 -0
  27. package/docs/demo/index.html +19 -0
  28. package/docs/enums/Player.InfoPanelStyleEnum.html +1 -1
  29. package/docs/enums/Player.InfoPanelTypeEnum.html +2 -2
  30. package/docs/enums/Player.PanoEffectEnum.html +2 -2
  31. package/docs/enums/Player.PanoTagEnum.html +2 -2
  32. package/docs/enums/Player.PanoTagStyleEnum.html +7 -0
  33. package/docs/enums/Player.VreoKeyframeEnum.html +12 -12
  34. package/docs/enums/fivePlugins.CameraMovementEffect.html +1 -1
  35. package/docs/enums/fivePlugins.Rotation.html +1 -1
  36. package/docs/index.html +13 -6
  37. package/docs/interfaces/Player.CustomVreoKeyframeProps.html +1 -1
  38. package/docs/interfaces/Player.PlayerConfigs.html +4 -3
  39. package/docs/interfaces/Player.Vertex.html +2 -2
  40. package/docs/interfaces/Player.VideoAgentMeshOptions.html +8 -1
  41. package/docs/interfaces/Player.VreoKeyframe.html +2 -2
  42. package/docs/interfaces/Player.VreoUnit.html +2 -2
  43. package/docs/interfaces/Player.VreoVideo.html +2 -2
  44. package/docs/interfaces/fivePlugins.CSS3DRenderPluginExportType.html +4 -0
  45. package/docs/interfaces/fivePlugins.CameraMovementOptsCallback.html +1 -1
  46. package/docs/interfaces/fivePlugins.CameraMovementPluginExportType.html +2 -2
  47. package/docs/interfaces/fivePlugins.CameraMovementPluginParameterType.html +1 -1
  48. package/docs/interfaces/fivePlugins.ModelTVVideoPluginData.html +1 -1
  49. package/docs/interfaces/fivePlugins.ModelTVVideoPluginExportType.html +1 -1
  50. package/docs/interfaces/fivePlugins.ModelTVVideoPluginParameterType.html +1 -1
  51. package/docs/interfaces/fivePlugins.Vector3Position.html +3 -0
  52. package/docs/interfaces/react.VreoActionCallbacks.html +15 -7
  53. package/docs/interfaces/react.VreoProviderProps.html +1 -1
  54. package/docs/modules/Player.html +21 -15
  55. package/docs/modules/custom.html +1 -1
  56. package/docs/modules/fivePlugins.html +5 -2
  57. package/docs/modules/react.html +1 -1
  58. package/docs/modules.html +1 -1
  59. package/lib/PlayController/createHTMLAudioElement.js +6 -11
  60. package/lib/PlayController/index.js +19 -85
  61. package/lib/Player/App.js +7 -29
  62. package/lib/Player/Controller.d.ts +29 -8
  63. package/lib/Player/Controller.js +185 -87
  64. package/lib/Player/custom/SpatialScenePanel/index.js +47 -72
  65. package/lib/Player/hooks.js +2 -12
  66. package/lib/Player/index.d.ts +5 -3
  67. package/lib/Player/index.js +108 -122
  68. package/lib/Player/modules/Drawer/index.js +1 -18
  69. package/lib/Player/modules/PopUp/index.js +1 -11
  70. package/lib/Player/modules/ResizeObserver/index.d.ts +2 -0
  71. package/lib/Player/modules/ResizeObserver/index.js +29 -0
  72. package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +16 -2
  73. package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +124 -145
  74. package/lib/Player/modules/VideoAgent/VideoAgentScene.d.ts +3 -6
  75. package/lib/Player/modules/VideoAgent/VideoAgentScene.js +25 -52
  76. package/lib/Player/modules/VideoAgent/index.js +46 -22
  77. package/lib/Player/modules/Wave/index.d.ts +5 -0
  78. package/lib/Player/modules/Wave/index.js +77 -0
  79. package/lib/Player/modules/keyframes/BgMusic/index.js +3 -16
  80. package/lib/Player/modules/keyframes/CameraMovement/index.js +4 -28
  81. package/lib/Player/modules/keyframes/InfoPanel/index.js +30 -35
  82. package/lib/Player/modules/keyframes/ModelVideo/index.js +40 -29
  83. package/lib/Player/modules/keyframes/PanoEffect/index.js +16 -44
  84. package/lib/Player/modules/keyframes/PanoEffect/lineAnime.js +1 -8
  85. package/lib/Player/modules/keyframes/PanoTag/index.d.ts +1 -2
  86. package/lib/Player/modules/keyframes/PanoTag/index.js +75 -132
  87. package/lib/Player/modules/keyframes/PanoTextLabel/index.d.ts +3 -0
  88. package/lib/Player/modules/keyframes/PanoTextLabel/index.js +93 -66
  89. package/lib/Player/modules/keyframes/Prompter/index.js +18 -53
  90. package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +22 -25
  91. package/lib/Player/modules/keyframes/VideoEffect/index.js +13 -48
  92. package/lib/Player/typings.d.ts +12 -1
  93. package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.d.ts +2 -0
  94. package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.js +10 -0
  95. package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.d.ts +7 -0
  96. package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.js +31 -0
  97. package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.d.ts +3 -0
  98. package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.js +10 -0
  99. package/lib/fivePlugins/CSS3DRenderPlugin/index.d.ts +56 -0
  100. package/lib/fivePlugins/CSS3DRenderPlugin/index.js +234 -0
  101. package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.d.ts +7 -0
  102. package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.js +15 -0
  103. package/lib/fivePlugins/CameraMovementPlugin/index.js +36 -82
  104. package/lib/fivePlugins/CameraMovementPlugin/typings.js +0 -4
  105. package/lib/fivePlugins/ModelTVVideoPlugin/index.js +12 -61
  106. package/lib/index.js +0 -1
  107. package/lib/react/index.d.ts +8 -4
  108. package/lib/react/index.js +10 -37
  109. package/lib/shared-utils/AduioLike.d.ts +37 -0
  110. package/lib/shared-utils/AduioLike.js +132 -0
  111. package/lib/shared-utils/Preloader.js +0 -7
  112. package/lib/shared-utils/addResizeListener.d.ts +4 -0
  113. package/lib/shared-utils/addResizeListener.js +46 -0
  114. package/lib/shared-utils/animationFrame/BetterTween.js +7 -39
  115. package/lib/shared-utils/animationFrame/index.js +2 -10
  116. package/lib/shared-utils/animationFrame/tween.js +3 -16
  117. package/lib/shared-utils/createTransMatrix.d.ts +1 -0
  118. package/lib/shared-utils/createTransMatrix.js +28 -0
  119. package/lib/shared-utils/getFileExpandedName.d.ts +1 -0
  120. package/lib/shared-utils/getFileExpandedName.js +12 -0
  121. package/lib/shared-utils/getMediaInfo.d.ts +9 -0
  122. package/lib/shared-utils/getMediaInfo.js +66 -0
  123. package/lib/shared-utils/setElementDataset.d.ts +1 -0
  124. package/lib/shared-utils/setElementDataset.js +22 -0
  125. package/lib/typings/VreoUnit.d.ts +37 -2
  126. package/lib/typings/VreoUnit.js +10 -13
  127. package/package.json +10 -10
  128. package/resources/PlayController/index.ts +0 -13
  129. package/resources/Player/App.tsx +5 -4
  130. package/resources/Player/Controller.ts +274 -146
  131. package/resources/Player/custom/SpatialScenePanel/index.tsx +5 -5
  132. package/resources/Player/hooks.ts +3 -5
  133. package/resources/Player/index.tsx +190 -140
  134. package/resources/Player/modules/ResizeObserver/index.tsx +23 -0
  135. package/resources/Player/modules/VideoAgent/VideoAgentMesh.ts +87 -31
  136. package/resources/Player/modules/VideoAgent/VideoAgentScene.ts +27 -24
  137. package/resources/Player/modules/VideoAgent/index.tsx +28 -12
  138. package/resources/Player/modules/Wave/index.tsx +64 -0
  139. package/resources/Player/modules/keyframes/InfoPanel/index.tsx +26 -11
  140. package/resources/Player/modules/keyframes/ModelVideo/index.tsx +36 -3
  141. package/resources/Player/modules/keyframes/PanoTag/index.tsx +52 -97
  142. package/resources/Player/modules/keyframes/PanoTextLabel/index.tsx +86 -34
  143. package/resources/Player/modules/keyframes/Prompter/index.tsx +6 -16
  144. package/resources/Player/modules/keyframes/UpdateVRPanorama/index.tsx +6 -2
  145. package/resources/Player/typings.ts +15 -1
  146. package/resources/fivePlugins/CSS3DRenderPlugin/centerPoint.ts +5 -0
  147. package/resources/fivePlugins/CSS3DRenderPlugin/createResizeObserver.ts +17 -0
  148. package/resources/fivePlugins/CSS3DRenderPlugin/evenNumber.ts +4 -0
  149. package/resources/fivePlugins/CSS3DRenderPlugin/index.ts +254 -0
  150. package/resources/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.ts +5 -0
  151. package/resources/fivePlugins/CameraMovementPlugin/index.ts +19 -12
  152. package/resources/react/index.tsx +7 -3
  153. package/resources/shared-utils/AduioLike.ts +109 -0
  154. package/resources/shared-utils/addResizeListener.ts +46 -0
  155. package/resources/shared-utils/createTransMatrix.ts +12 -0
  156. package/resources/shared-utils/getFileExpandedName.ts +6 -0
  157. package/resources/shared-utils/getMediaInfo.ts +52 -0
  158. package/resources/shared-utils/setElementDataset.ts +18 -0
  159. package/resources/typings/VreoUnit.ts +41 -3
  160. package/stylesheets/custom/SpatialScenePanel.css +2 -1
  161. package/stylesheets/default.css +350 -84
@@ -1,50 +1,74 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.VideoAgent = VideoAgent;
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _hooks = require("../../hooks");
13
-
14
10
  var _VideoAgentScene = require("./VideoAgentScene");
15
-
11
+ var _classnames = _interopRequireDefault(require("classnames"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
-
18
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
15
  function VideoAgent(props) {
16
+ var _controller$avatar2;
21
17
  var ref = React.useRef(null);
22
18
  var controller = (0, _hooks.useController)();
19
+ var showAvatar = React.useMemo(function () {
20
+ var _controller$avatar;
21
+ return ((_controller$avatar = controller.avatar) === null || _controller$avatar === void 0 ? void 0 : _controller$avatar.url) && controller.avatar.force === true;
22
+ }, [controller.avatar]);
23
+ var showVideoAgent = React.useMemo(function () {
24
+ var _controller$videoAgen;
25
+ if (showAvatar) return false;
26
+ return ((_controller$videoAgen = controller.videoAgentScene) === null || _controller$videoAgen === void 0 ? void 0 : _controller$videoAgen.videoAgentMesh.mediaInstance) instanceof HTMLVideoElement;
27
+ }, [controller.videoAgentScene]);
23
28
  React.useEffect(function () {
24
29
  if (!ref.current) throw new Error('React 渲染异常,请稍后重试 ...');
25
-
26
30
  if (controller.videoAgentScene) {
27
- console.warn('"VideoAgentScene" 重复初始化,已被过滤 ...');
31
+ console.warn('VideoAgentScene" 重复初始化,已被过滤');
28
32
  return;
29
33
  }
30
-
31
- var videoAgentScene = new _VideoAgentScene.VideoAgentScene(ref.current, true, props.options || {});
34
+ var videoAgentScene = new _VideoAgentScene.VideoAgentScene(ref.current, props.options);
32
35
  controller.videoAgentScene = videoAgentScene;
33
36
  return function () {
34
- var _controller$videoAgen;
35
-
37
+ var _controller$videoAgen2;
36
38
  controller.dispose();
37
- (_controller$videoAgen = controller.videoAgentScene) === null || _controller$videoAgen === void 0 ? void 0 : _controller$videoAgen.dispose();
39
+ (_controller$videoAgen2 = controller.videoAgentScene) === null || _controller$videoAgen2 === void 0 ? void 0 : _controller$videoAgen2.dispose();
38
40
  };
39
41
  }, []);
40
- return /*#__PURE__*/React.createElement("div", {
41
- className: "VideoAgent",
42
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
43
+ className: "Avatar",
44
+ style: {
45
+ display: showAvatar ? 'block' : 'none'
46
+ }
47
+ }, /*#__PURE__*/React.createElement("div", {
48
+ className: "Avatar-wrapper ratio-1-1"
49
+ }, /*#__PURE__*/React.createElement("img", {
50
+ className: "Avatar-img",
51
+ src: (_controller$avatar2 = controller.avatar) === null || _controller$avatar2 === void 0 ? void 0 : _controller$avatar2.url,
42
52
  onClick: function onClick() {
43
- if (!props.onClick) return;
44
- props.onClick();
45
- },
53
+ var _props$onClick;
54
+ return (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props);
55
+ }
56
+ }))), /*#__PURE__*/React.createElement("div", {
57
+ className: (0, _classnames["default"])('VideoAgent', {
58
+ hide: !showVideoAgent
59
+ })
60
+ }, /*#__PURE__*/React.createElement("div", {
61
+ className: "VideoAgent-container"
62
+ }, /*#__PURE__*/React.createElement("div", {
63
+ className: "VideoAgent-wrapper ratio-16-9"
64
+ }, /*#__PURE__*/React.createElement("div", {
65
+ className: "VideoAgent-inner",
46
66
  ref: ref
47
67
  }, /*#__PURE__*/React.createElement("div", {
48
- className: "VideoAgent-play"
49
- }));
68
+ className: "VideoAgent-play",
69
+ onClick: function onClick() {
70
+ var _props$onClick2;
71
+ return (_props$onClick2 = props.onClick) === null || _props$onClick2 === void 0 ? void 0 : _props$onClick2.call(props);
72
+ }
73
+ }))))));
50
74
  }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { WaveAppearance } from '../../typings';
3
+ export declare function Wave(props?: {
4
+ appearance?: WaveAppearance;
5
+ }): JSX.Element;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Wave = Wave;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
9
+ function Wave(props) {
10
+ var waveUrl = _react["default"].useMemo(function () {
11
+ var _props$appearance;
12
+ var appearance = (_props$appearance = props === null || props === void 0 ? void 0 : props.appearance) !== null && _props$appearance !== void 0 ? _props$appearance : 'solid';
13
+ var userAgent = typeof navigator !== 'undefined' ? navigator.userAgent : '';
14
+ var isAppleDevice = /(iPhone|iPad|iPod)/i.test(userAgent);
15
+ var isSafari = /safari/i.test(userAgent) && !/chrome/i.test(userAgent) && /version/i.test(userAgent);
16
+ var canPlayHevc = isAppleDevice || isSafari;
17
+ var canPlayVp9 = typeof MediaSource !== 'undefined' && MediaSource.isTypeSupported("video/webm; codecs=vp9");
18
+ var prefix = 'https://vr-public.realsee-cdn.cn/release/static/image/release/';
19
+ var WAVES = {
20
+ single: {
21
+ width: 766,
22
+ height: 60,
23
+ frames: 20,
24
+ hevc: 'vapor/static/wave-single.140d197f4838c130b69e87dfd0705479.mov',
25
+ vp9: 'vapor/static/wave-single.eda65de390a830193fff40d1f1255555.webm',
26
+ png: 'vapor/static/wave-single.f51aade2a6e1c59211698a1a24e6135f.png'
27
+ },
28
+ "double": {
29
+ width: 766,
30
+ height: 60,
31
+ frames: 16,
32
+ hevc: 'vapor/static/wave-double.3e6d73050ee6958cc3060b107ebe5f39.mov',
33
+ vp9: '/vapor/static/wave-double.77dfe8548ebcb3f3d336785d4fe9c7b2.webm',
34
+ png: '/vapor/static/wave-double.ab4fe7d8a70395109ca4f759af7bd53f.png'
35
+ },
36
+ solid: {
37
+ width: 1126,
38
+ height: 90,
39
+ frames: 48,
40
+ hevc: 'vapor/static/wave-solid.cf68912a93275d07aa6b5097ea11fdda.mov',
41
+ vp9: 'vapor/static/wave-solid.64438b63cbb346906d066bb7b8dc3e20.webm',
42
+ png: 'vapor/static/wave-solid.6969d7f3f2f44f7ac1ade30e65660cb1.png'
43
+ },
44
+ swap: {
45
+ width: 2250,
46
+ height: 180,
47
+ frames: 41,
48
+ hevc: 'vapor/static/wave-swap.b38f22e2cf84ee21e9be35f7f56c9cfc.mov',
49
+ vp9: 'vapor/static/wave-swap.c02e4b94cf05aecf6e7a0023bc7bb90f.webm',
50
+ png: 'vapor/static/wave-swap.772ba526a7210dcc01567062c6319545.png'
51
+ },
52
+ expand: {
53
+ width: 2250,
54
+ height: 180,
55
+ frames: 45,
56
+ hevc: 'vapor/static/wave-expand.9529956c5954740cd4c9d07d51e32822.mov',
57
+ vp9: 'vapor/static/wave-expand.a0d2a0074001cd3d4fea56818c6d3c38.webm',
58
+ png: 'vapor/static/wave-expand.62fcf27b445533e6eb1b17bab5eafa0d.png'
59
+ }
60
+ };
61
+ if (canPlayVp9) return prefix + WAVES[appearance]['vp9'];
62
+ if (canPlayHevc) return prefix + WAVES[appearance]['hevc'];
63
+ return '';
64
+ }, [props === null || props === void 0 ? void 0 : props.appearance]);
65
+ return /*#__PURE__*/_react["default"].createElement("video", {
66
+ className: "vreo-wave",
67
+ width: "100%",
68
+ preload: "auto",
69
+ muted: true,
70
+ autoPlay: true,
71
+ loop: true,
72
+ playsInline: true,
73
+ disablePictureInPicture: true,
74
+ controls: false,
75
+ src: waveUrl
76
+ });
77
+ }
@@ -1,22 +1,15 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.BgMusic = BgMusic;
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _VreoUnit = require("../../../../typings/VreoUnit");
13
-
14
10
  var _hooks = require("../../../hooks");
15
-
16
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
-
18
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
13
  function BgMusic() {
21
14
  var controller = (0, _hooks.useController)();
22
15
  var timeoutIdRef = React.useRef(null);
@@ -33,21 +26,17 @@ function BgMusic() {
33
26
  audio.setAttribute('playsinline', 'true');
34
27
  audio.loop = true;
35
28
  document.body.append(audio);
36
-
37
29
  var callback = function callback(keyframe) {
38
30
  var start = keyframe.start,
39
- end = keyframe.end;
31
+ end = keyframe.end;
40
32
  var _ref = keyframe.data,
41
- url = _ref.url;
33
+ url = _ref.url;
42
34
  audio.src = url;
43
-
44
35
  var playCallback = function playCallback() {
45
36
  audio.play();
46
37
  };
47
-
48
38
  audio.addEventListener('canplaythrough', playCallback);
49
39
  cleanTimeout();
50
-
51
40
  var cleanAudio = function cleanAudio() {
52
41
  audio.pause();
53
42
  audio.currentTime = 0;
@@ -55,7 +44,6 @@ function BgMusic() {
55
44
  cleanTimeout();
56
45
  audio.removeEventListener('canplaythrough', playCallback);
57
46
  };
58
-
59
47
  var duration = end - start || 5000;
60
48
  timeoutIdRef.current = setTimeout(function () {
61
49
  cleanAudio();
@@ -64,7 +52,6 @@ function BgMusic() {
64
52
  cleanAudio();
65
53
  });
66
54
  };
67
-
68
55
  controller.on(_VreoUnit.VreoKeyframeEnum.BgMusic, callback);
69
56
  return function () {
70
57
  controller.off(_VreoUnit.VreoKeyframeEnum.BgMusic, callback);
@@ -1,92 +1,70 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.CameraMovement = CameraMovement;
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _CameraMovementPlugin = require("../../../../fivePlugins/CameraMovementPlugin");
13
-
14
10
  var _typings = require("../../../../fivePlugins/CameraMovementPlugin/typings");
15
-
16
11
  var _VreoUnit = require("../../../../typings/VreoUnit");
17
-
18
12
  var _hooks = require("../../../hooks");
19
-
20
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
-
22
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
15
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
24
16
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
25
-
26
17
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
27
-
28
18
  function CameraMovement() {
29
19
  var controller = (0, _hooks.useController)();
30
20
  var five = (0, _hooks.useFiveInstance)();
31
21
  var ref = React.useRef();
32
22
  React.useEffect(function () {
33
23
  var callback = /*#__PURE__*/function () {
34
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(keyframe) {
24
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(keyframe) {
35
25
  var start, end, data, cameraMovementData, effect;
36
- return regeneratorRuntime.wrap(function _callee$(_context) {
26
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
37
27
  while (1) {
38
28
  switch (_context.prev = _context.next) {
39
29
  case 0:
40
30
  if (!ref.current) {
41
31
  ref.current = (0, _CameraMovementPlugin.CameraMovementPlugin)(five, {});
42
32
  }
43
-
44
33
  start = keyframe.start, end = keyframe.end, data = keyframe.data;
45
34
  cameraMovementData = data;
46
35
  effect = cameraMovementData.effect;
47
-
48
36
  if (!(effect === _typings.CameraMovementEffect.Rotate)) {
49
37
  _context.next = 9;
50
38
  break;
51
39
  }
52
-
53
40
  _context.next = 7;
54
41
  return ref.current.rotate(data, end - start);
55
-
56
42
  case 7:
57
43
  _context.next = 21;
58
44
  break;
59
-
60
45
  case 9:
61
46
  if (!(effect === _typings.CameraMovementEffect.Move)) {
62
47
  _context.next = 14;
63
48
  break;
64
49
  }
65
-
66
50
  _context.next = 12;
67
51
  return ref.current.move(data, end - start);
68
-
69
52
  case 12:
70
53
  _context.next = 21;
71
54
  break;
72
-
73
55
  case 14:
74
56
  if (!(cameraMovementData.panoIndex !== undefined && cameraMovementData.panoIndex !== five.panoIndex)) {
75
57
  _context.next = 19;
76
58
  break;
77
59
  }
78
-
79
60
  _context.next = 17;
80
61
  return ref.current.move(data, end - start);
81
-
82
62
  case 17:
83
63
  _context.next = 21;
84
64
  break;
85
-
86
65
  case 19:
87
66
  _context.next = 21;
88
67
  return ref.current.rotate(data, end - start);
89
-
90
68
  case 21:
91
69
  case "end":
92
70
  return _context.stop();
@@ -94,12 +72,10 @@ function CameraMovement() {
94
72
  }
95
73
  }, _callee);
96
74
  }));
97
-
98
75
  return function callback(_x) {
99
76
  return _ref.apply(this, arguments);
100
77
  };
101
78
  }();
102
-
103
79
  controller.on(_VreoUnit.VreoKeyframeEnum.CameraMovement, callback);
104
80
  return function () {
105
81
  controller.off(_VreoUnit.VreoKeyframeEnum.CameraMovement, callback);
@@ -1,83 +1,81 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.InfoPanel = InfoPanel;
9
-
10
8
  var React = _interopRequireWildcard(require("react"));
11
-
12
9
  var _VreoUnit = require("../../../../typings/VreoUnit");
13
-
14
10
  var _hooks = require("../../../hooks");
15
-
16
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
-
18
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
13
  function InfoPanelImg(_ref) {
21
14
  var url = _ref.url,
22
- children = _ref.children;
15
+ children = _ref.children;
23
16
  return /*#__PURE__*/React.createElement("div", {
17
+ className: "vreo-infoPanel-container"
18
+ }, /*#__PURE__*/React.createElement("div", {
24
19
  className: "vreo-infoPanel vreo-infoPanel--img"
25
- }, children, /*#__PURE__*/React.createElement("div", {
20
+ }, /*#__PURE__*/React.createElement("div", {
21
+ className: "ratio-4-5 vreo-infoPanel-wrapper"
22
+ }, /*#__PURE__*/React.createElement("div", {
23
+ className: "vreo-infoPanel-inner"
24
+ }, children, /*#__PURE__*/React.createElement("img", {
26
25
  className: "vreo-infoPanelImg",
27
- style: {
28
- backgroundImage: "url(".concat(url, ")")
29
- }
30
- }));
26
+ src: url
27
+ })))));
31
28
  }
32
-
33
29
  function InfoPanelVideo(_ref2) {
34
30
  var url = _ref2.url,
35
- children = _ref2.children;
31
+ children = _ref2.children;
36
32
  return /*#__PURE__*/React.createElement("div", {
33
+ className: "vreo-infoPanel-container"
34
+ }, /*#__PURE__*/React.createElement("div", {
37
35
  className: "vreo-infoPanel vreo-infoPanel--video"
36
+ }, /*#__PURE__*/React.createElement("div", {
37
+ className: "ratio-4-5 vreo-infoPanel-wrapper"
38
+ }, /*#__PURE__*/React.createElement("div", {
39
+ className: "vreo-infoPanel-inner"
38
40
  }, children, /*#__PURE__*/React.createElement("div", {
39
- className: "vreo-infoPanelWrapper"
41
+ className: "vreo-infoPanelVideo"
40
42
  }, /*#__PURE__*/React.createElement("video", {
41
43
  playsInline: true,
42
44
  autoPlay: true,
43
45
  className: "vreo-infoPanelVideo",
44
46
  src: url
45
- })));
47
+ }))))));
46
48
  }
47
-
48
49
  var Title = function Title(props) {
49
50
  if (!props.title && !props.subTitle) {
50
51
  return null;
51
52
  }
52
-
53
- return /*#__PURE__*/React.createElement("div", {
53
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
54
+ className: "vreo-infoPanel-title-shadow"
55
+ }), /*#__PURE__*/React.createElement("div", {
54
56
  className: "vreo-infoPanel-title"
55
57
  }, /*#__PURE__*/React.createElement("div", {
56
58
  className: "vreo-infoPanel-t1"
57
59
  }, props.title), /*#__PURE__*/React.createElement("div", {
58
60
  className: "vreo-infoPanel-t2"
59
- }, props.subTitle));
61
+ }, props.subTitle)));
60
62
  };
61
-
62
63
  function InfoPanel() {
63
64
  var timeoutRef = React.useRef();
64
65
  var controller = (0, _hooks.useController)();
65
66
  React.useEffect(function () {
66
67
  var _controller$configs;
67
-
68
68
  if (((_controller$configs = controller.configs) === null || _controller$configs === void 0 ? void 0 : _controller$configs.keyframeMap.InfoPanel) === false) {
69
69
  return;
70
70
  }
71
-
72
71
  var callback = function callback(keyframe) {
73
72
  var start = keyframe.start,
74
- end = keyframe.end,
75
- data = keyframe.data;
73
+ end = keyframe.end,
74
+ data = keyframe.data;
76
75
  var infoPanelData = data;
77
76
  var title = infoPanelData.title,
78
- subTitle = infoPanelData.subTitle,
79
- style = infoPanelData.style;
80
-
77
+ subTitle = infoPanelData.subTitle,
78
+ style = infoPanelData.style;
81
79
  do {
82
80
  if (style === _VreoUnit.InfoPanelStyleEnum.PopUp) {
83
81
  if (infoPanelData.type === _VreoUnit.InfoPanelTypeEnum.Image) {
@@ -95,10 +93,8 @@ function InfoPanel() {
95
93
  subTitle: subTitle
96
94
  })));
97
95
  }
98
-
99
96
  break;
100
97
  }
101
-
102
98
  if (infoPanelData.type === _VreoUnit.InfoPanelTypeEnum.Image) {
103
99
  controller.openDrawer({
104
100
  content: /*#__PURE__*/React.createElement(InfoPanelImg, {
@@ -121,14 +117,14 @@ function InfoPanel() {
121
117
  });
122
118
  }
123
119
  } while (false);
124
-
125
120
  timeoutRef.current = setTimeout(function () {
126
121
  controller.openDrawer(false);
127
122
  controller.openPopUp(false);
128
123
  }, end - start);
129
124
  };
125
+ controller.on(_VreoUnit.VreoKeyframeEnum.InfoPanel, callback);
130
126
 
131
- controller.on(_VreoUnit.VreoKeyframeEnum.InfoPanel, callback); // Object.assign(window, {
127
+ // Object.assign(window, {
132
128
  // $setInfoPanel: () => {
133
129
  // controller.openPopUp(
134
130
  // // <InfoPanelImg url='//vrlab-static.ljcdn.com/release/web/psq/a.8e868cb2.gif' />
@@ -161,7 +157,6 @@ function InfoPanel() {
161
157
 
162
158
  return function () {
163
159
  controller.off(_VreoUnit.VreoKeyframeEnum.InfoPanel, callback);
164
-
165
160
  if (timeoutRef.current) {
166
161
  clearTimeout(timeoutRef.current);
167
162
  }