@realsee/vreo 2.0.0-alpha.0 → 2.1.1-dev.0

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.
@@ -48,10 +48,13 @@ function BgMusic() {
48
48
  audio.addEventListener('ended', function () {
49
49
  cleanAudio();
50
50
  });
51
+ audio.addEventListener('pause', function () {
52
+ audio.play();
53
+ });
51
54
  controller.once('paused', function () {
52
55
  cleanAudio();
53
56
  });
54
- case 10:
57
+ case 11:
55
58
  case "end":
56
59
  return _context.stop();
57
60
  }
@@ -29,15 +29,10 @@ function InfoPanelImg(_ref) {
29
29
  return /*#__PURE__*/React.createElement("div", {
30
30
  className: "vreo-infoPanel-container"
31
31
  }, /*#__PURE__*/React.createElement("div", {
32
- className: "vreo-infoPanel vreo-infoPanel--img"
33
- }, /*#__PURE__*/React.createElement("div", {
34
- className: "ratio-4-5 vreo-infoPanel-wrapper"
35
- }, /*#__PURE__*/React.createElement("div", {
36
- className: "vreo-infoPanel-inner"
32
+ className: "vreo-infoPanel"
37
33
  }, children, /*#__PURE__*/React.createElement("img", {
38
- className: "vreo-infoPanelImg",
39
34
  src: url
40
- })))));
35
+ })));
41
36
  }
42
37
  function InfoPanelVideo(_ref2) {
43
38
  var url = _ref2.url,
@@ -55,28 +50,21 @@ function InfoPanelVideo(_ref2) {
55
50
  return /*#__PURE__*/React.createElement("div", {
56
51
  className: "vreo-infoPanel-container"
57
52
  }, /*#__PURE__*/React.createElement("div", {
58
- className: "vreo-infoPanel vreo-infoPanel--video"
59
- }, /*#__PURE__*/React.createElement("div", {
60
- className: "ratio-4-5 vreo-infoPanel-wrapper"
61
- }, /*#__PURE__*/React.createElement("div", {
62
- className: "vreo-infoPanel-inner"
53
+ className: "vreo-infoPanel"
63
54
  }, children, /*#__PURE__*/React.createElement("div", {
64
- className: "vreo-infoPanelVideo",
55
+ className: "vreo-infoPanel-inner",
65
56
  ref: videoWrapperRef
66
57
  }, !isWX && /*#__PURE__*/React.createElement("video", {
67
58
  playsInline: true,
68
59
  autoPlay: true,
69
- className: "vreo-infoPanelVideo",
70
60
  src: url
71
- }))))));
61
+ }))));
72
62
  }
73
63
  var Title = function Title(props) {
74
64
  if (!props.title && !props.subTitle) {
75
65
  return null;
76
66
  }
77
67
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
78
- className: "vreo-infoPanel-title-shadow"
79
- }), /*#__PURE__*/React.createElement("div", {
80
68
  className: "vreo-infoPanel-title"
81
69
  }, /*#__PURE__*/React.createElement("div", {
82
70
  className: "vreo-infoPanel-t1"
@@ -147,38 +135,12 @@ function InfoPanel() {
147
135
  }, end - start);
148
136
  };
149
137
  controller.on(_VreoUnit.VreoKeyframeEnum.InfoPanel, callback);
150
-
151
- // Object.assign(window, {
152
- // $setInfoPanel: () => {
153
- // controller.openPopUp(
154
- // // <InfoPanelImg url='//vrlab-static.ljcdn.com/release/web/psq/a.8e868cb2.gif' />
155
- // // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/b.f9a1ed52.png' />
156
- // // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/c.4f88c112.png' />
157
- // // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/seesay/tools/cat_music___f68fb9bbe1f7cd6d00a16456dd0b09ad.gif' />
158
- // <InfoPanelImg url="http://vrlab-public.ljcdn.com/common/images/web/d94e1bd7-0311-4b20-9c41-a1294fe43554.png">
159
- // <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
160
- // </InfoPanelImg>
161
- // // <InfoPanelVideo url="//vrlab-public.ljcdn.com/release/seesay/tools/2022011713142___b320f74a5e1b5ad4bb46b4dc69d73ecc.mp4">
162
- // // <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
163
- // // </InfoPanelVideo>
164
- // )
165
- // },
166
- // $setInfoPanel2: () => {
167
- // controller.openPopUp(
168
- // <InfoPanelImg url='//vrlab-static.ljcdn.com/release/web/psq/a.8e868cb2.gif' />
169
- // // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/b.f9a1ed52.png' />
170
- // // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/c.4f88c112.png' />
171
- // // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/seesay/tools/cat_music___f68fb9bbe1f7cd6d00a16456dd0b09ad.gif' />
172
- // // <InfoPanelImg url="http://vrlab-public.ljcdn.com/common/images/web/d94e1bd7-0311-4b20-9c41-a1294fe43554.png">
173
- // // <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
174
- // // </InfoPanelImg>
175
- // // <InfoPanelVideo url="//vrlab-public.ljcdn.com/release/seesay/tools/2022011713142___b320f74a5e1b5ad4bb46b4dc69d73ecc.mp4">
176
- // // <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
177
- // // </InfoPanelVideo>
178
- // )
179
- // },
180
- // })
181
-
138
+ controller.on('ended', function () {
139
+ controller.openPopUp(false);
140
+ });
141
+ controller.on('paused', function () {
142
+ controller.openPopUp(false);
143
+ });
182
144
  return function () {
183
145
  controller.off(_VreoUnit.VreoKeyframeEnum.InfoPanel, callback);
184
146
  if (timeoutRef.current) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/vreo",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.1.1-dev.0",
4
4
  "description": "Vreo (VR Video 缩写) 是基于如视三维渲染引擎 Five 和 用户界面构建库 React 实现的如视 3D 空间剧本播放器。",
5
5
  "keywords": [
6
6
  "realsee",
@@ -732,38 +732,35 @@
732
732
  align-items: center;
733
733
  }
734
734
 
735
- .vreo-infoPanel-wrapper {
735
+ .vreo-infoPanel {
736
736
  position: relative;
737
- }
738
-
739
- .vreo-infoPanel-inner {
740
- position: absolute;
741
- left: 0;
742
- top: 0;
743
737
  width: 100%;
744
738
  height: 100%;
739
+ min-width: 70%;
740
+ max-width: 80%;
741
+ min-height: 30%;
742
+ max-height: 60%;
745
743
  border-radius: 4px;
746
744
  overflow: hidden;
747
- background-color: rgba(0, 0, 0, 1);
745
+ display: flex;
746
+ justify-content: center;
747
+ align-items: center;
748
748
  }
749
749
 
750
- .vreo-infoPanel {
750
+ .vreo-infoPanel-inner {
751
751
  position: relative;
752
+ width: 100%;
753
+ height: 100%;
752
754
  }
753
755
 
754
- .vreo-app .vreo-infoPanel,
755
- .vreo-app[data-size="S"] .vreo-infoPanel {
756
- width: 327px;
757
- }
758
- .vreo-app[data-size="M"][data-orientation="landscape"] .vreo-infoPanel {
759
- width: 192px;
760
- }
761
- .vreo-app[data-size="M"][data-orientation="portrait"] .vreo-infoPanel,
762
- .vreo-app[data-size="L"] .vreo-infoPanel {
763
- width: 319px;
764
- }
765
- .vreo-app[data-size="XL"] .vreo-infoPanel {
766
- width: 384px;
756
+ .vreo-infoPanel video,
757
+ .vreo-infoPanel img {
758
+ display: block;
759
+ width: 100%;
760
+ height: 100%;
761
+ object-fit: contain;
762
+ border-radius: 4px;
763
+ overflow: hidden;
767
764
  }
768
765
 
769
766
  .vreo-infoPanel-title {
@@ -790,15 +787,6 @@
790
787
  padding-top: 6px;
791
788
  }
792
789
 
793
- .vreo-infoPanelImg,
794
- .vreo-infoPanelVideo {
795
- position: absolute;
796
- width: 100%;
797
- height: 100%;
798
- object-position: center center;
799
- object-fit: contain;
800
- }
801
-
802
790
  .vreo-panel--hidden .vreo-panel-inner {
803
791
  opacity: 0;
804
792
  transition: opacity 0.45s;
@@ -839,7 +827,7 @@
839
827
  box-sizing: border-box;
840
828
  padding-left: 16px;
841
829
  padding-right: 16px;
842
- margin-bottom: 16.5%;
830
+ margin-bottom: 30px;
843
831
  bottom: 0;
844
832
  z-index: 1;
845
833
  flex-direction: column;
@@ -855,6 +843,11 @@
855
843
  z-index: 1;
856
844
  }
857
845
 
846
+ .vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t1,
847
+ .vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t2 {
848
+ text-shadow: 0 1px 3px rgba(0, 0, 0, 1);
849
+ }
850
+
858
851
  .vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t1 {
859
852
  padding-left: 0;
860
853
  font-weight: 600;