@fonixtree/magic-design 0.0.160 → 0.0.161

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 (31) hide show
  1. package/es/common/SwiperBan/index.less +1 -1
  2. package/es/common/Video/index.js +8 -5
  3. package/es/common/Video/index.less +9 -0
  4. package/es/composite-comp/bol/components/Video/components/VideoTag/index.js +3 -1
  5. package/es/composite-comp/bol/components/Video/components/VideoTag/index.less +4 -0
  6. package/es/composite-comp/bol/components/Video/mobile/Layout1/index.js +30 -21
  7. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.js +29 -21
  8. package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +1 -1
  9. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.js +30 -21
  10. package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +2 -2
  11. package/es/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
  12. package/es/composite-comp/bol/components/Video/pc/Layout2/index.js +41 -40
  13. package/es/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
  14. package/es/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
  15. package/es/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
  16. package/lib/common/SwiperBan/index.less +1 -1
  17. package/lib/common/Video/index.js +8 -5
  18. package/lib/common/Video/index.less +9 -0
  19. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.js +3 -1
  20. package/lib/composite-comp/bol/components/Video/components/VideoTag/index.less +4 -0
  21. package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.js +30 -21
  22. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.js +29 -21
  23. package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +1 -1
  24. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.js +30 -21
  25. package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +2 -2
  26. package/lib/composite-comp/bol/components/Video/pc/Layout1/index.js +30 -21
  27. package/lib/composite-comp/bol/components/Video/pc/Layout2/index.js +41 -40
  28. package/lib/composite-comp/bol/components/Video/pc/Layout3/index.js +33 -24
  29. package/lib/composite-comp/bol/components/Video/pc/Layout4/index.js +30 -21
  30. package/lib/composite-comp/bol/components/Video/pc/Layout5/index.js +30 -21
  31. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  .swiper-ban-wrap {
2
2
  position: absolute;
3
3
  width: 100%;
4
- bottom: 6px;
4
+ bottom: 10px;
5
5
  display: flex;
6
6
  align-items: center;
7
7
  justify-content: center;
@@ -382,9 +382,8 @@ function (_super) {
382
382
 
383
383
  case 3:
384
384
  _a.player = _b.sent();
385
- this.player.on('pause', function () {
386
- if (!_this.props.opts.loop) {
387
- _this.props.onPause();
385
+ this.player.on('ended', function () {
386
+ if (!_this.props.opts.loop) {// this.props.onEnd();
388
387
  }
389
388
  });
390
389
  _b.label = 4;
@@ -417,12 +416,16 @@ function (_super) {
417
416
  AComponent.prototype.render = function () {
418
417
  var _a = this.props,
419
418
  videoId = _a.videoId,
420
- opts = _a.opts;
419
+ opts = _a.opts,
420
+ play = _a.play;
421
+ console.log('play: ', play);
421
422
  return /*#__PURE__*/_react["default"].createElement("div", {
422
423
  className: "video-container"
423
424
  }, opts.source ? /*#__PURE__*/_react["default"].createElement("div", {
424
425
  id: 'video' + videoId
425
- }) : null);
426
+ }) : null, !play && /*#__PURE__*/_react["default"].createElement("div", {
427
+ className: "cover-video"
428
+ }));
426
429
  };
427
430
 
428
431
  AComponent.defaultProps = {
@@ -6,6 +6,15 @@
6
6
  .prism-player .prism-cover {
7
7
  z-index: 0;
8
8
  }
9
+
10
+ .cover-video {
11
+ position: absolute;
12
+ left: 0;
13
+ right: 0;
14
+ bottom: 0;
15
+ top: 0;
16
+ background-color: rgba(0, 0, 0, 0);
17
+ }
9
18
  }
10
19
 
11
20
  .pc-video-modal-wrap {
@@ -63,6 +63,7 @@ function (_super) {
63
63
 
64
64
  VideoTag.prototype.render = function () {
65
65
  var _a = this.props,
66
+ onPlayClick = _a.onPlayClick,
66
67
  data = _a.data,
67
68
  _b = _a.position,
68
69
  position = _b === void 0 ? 'absolute' : _b,
@@ -81,7 +82,8 @@ function (_super) {
81
82
  }, showBtn && /*#__PURE__*/_react["default"].createElement("div", {
82
83
  className: "left-wrap"
83
84
  }, /*#__PURE__*/_react["default"].createElement("div", {
84
- className: "play-btn center"
85
+ className: "play-btn center",
86
+ onClick: onPlayClick
85
87
  }, /*#__PURE__*/_react["default"].createElement("img", {
86
88
  alt: "",
87
89
  src: _playCircle["default"]
@@ -12,6 +12,7 @@
12
12
  width: 85px;
13
13
  height: 100%;
14
14
  flex-shrink: 0;
15
+ align-self: end;
15
16
 
16
17
  .play-btn {
17
18
  position: absolute;
@@ -22,6 +23,9 @@
22
23
  height: 60px;
23
24
  z-index: 1;
24
25
  cursor: pointer;
26
+ transform: translateX(-50%) !important;
27
+ bottom: 0;
28
+ top: unset !important;
25
29
 
26
30
  img {
27
31
  width: 100%;
@@ -81,6 +81,27 @@ function (_super) {
81
81
  /** 视频ref映射 */
82
82
 
83
83
  _this.videoRefMap = {};
84
+
85
+ _this.playOrPause = function (group) {
86
+ (0, _commonUtil.ensure)(function () {
87
+ if (_this.videoRefMap[group.id].playing) {
88
+ _this.videoRefMap[group.id].playing = false;
89
+
90
+ _this.videoRefMap[group.id].el.player.pause();
91
+ } else {
92
+ if (group.video.playPosition == 'Popup') {
93
+ _this.videoRefMap[group.id].el.fullPlay('h5');
94
+ } else {
95
+ _this.videoRefMap[group.id].playing = true;
96
+
97
+ _this.videoRefMap[group.id].el.player.play();
98
+ }
99
+ }
100
+
101
+ _this.setState({});
102
+ });
103
+ };
104
+
84
105
  return _this;
85
106
  }
86
107
 
@@ -91,7 +112,7 @@ function (_super) {
91
112
  return /*#__PURE__*/_react["default"].createElement("div", {
92
113
  className: "video-layout1-wrap"
93
114
  }, data.groupSource.map(function (group) {
94
- var _a;
115
+ var _a, _b;
95
116
  /** 当前是否在播放 */
96
117
 
97
118
 
@@ -99,25 +120,6 @@ function (_super) {
99
120
  return /*#__PURE__*/_react["default"].createElement("div", {
100
121
  key: group.id,
101
122
  className: "video-item-wrap",
102
- onClick: function onClick() {
103
- (0, _commonUtil.ensure)(function () {
104
- if (_this.videoRefMap[group.id].playing) {
105
- _this.videoRefMap[group.id].playing = false;
106
-
107
- _this.videoRefMap[group.id].el.player.pause();
108
- } else {
109
- if (group.video.playPosition == 'Popup') {
110
- _this.videoRefMap[group.id].el.fullPlay('h5');
111
- } else {
112
- _this.videoRefMap[group.id].playing = true;
113
-
114
- _this.videoRefMap[group.id].el.player.play();
115
- }
116
- }
117
-
118
- _this.setState({});
119
- });
120
- },
121
123
  style: {
122
124
  height: data.mobileHeight
123
125
  }
@@ -141,9 +143,13 @@ function (_super) {
141
143
  cover: (0, _coreUtil.getVideoCover)(group),
142
144
  source: group.video.sourceUrl
143
145
  }),
146
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
144
147
  videoId: group.id
145
148
  }), !isPlaying && group.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
146
- className: "play-btn center"
149
+ className: "play-btn center",
150
+ onClick: function onClick() {
151
+ _this.playOrPause(group);
152
+ }
147
153
  }, /*#__PURE__*/_react["default"].createElement("img", {
148
154
  alt: "",
149
155
  src: _playCircle["default"]
@@ -153,6 +159,9 @@ function (_super) {
153
159
  align: data.customize.align,
154
160
  data: group,
155
161
  noShare: true,
162
+ onPlayClick: function onPlayClick() {
163
+ return _this.playOrPause(group);
164
+ },
156
165
  share: __assign({
157
166
  url: (0, _commonUtil.addUrlQuery)(window.location.href, {
158
167
  scroll: 'node-' + data.id
@@ -94,6 +94,26 @@ function (_super) {
94
94
  }, 3000);
95
95
  }
96
96
  };
97
+
98
+ _this.playOrPause = function (group) {
99
+ (0, _commonUtil.ensure)(function () {
100
+ if (_this.videoRefMap[group.id].playing) {
101
+ _this.videoRefMap[group.id].playing = false;
102
+
103
+ _this.videoRefMap[group.id].el.player.pause();
104
+ } else {
105
+ if (group.video.playPosition == 'Popup') {
106
+ _this.videoRefMap[group.id].el.fullPlay('h5');
107
+ } else {
108
+ _this.videoRefMap[group.id].playing = true;
109
+
110
+ _this.videoRefMap[group.id].el.player.play();
111
+ }
112
+ }
113
+
114
+ _this.setState({});
115
+ });
116
+ };
97
117
  /** 视频ref映射 */
98
118
 
99
119
 
@@ -124,7 +144,7 @@ function (_super) {
124
144
  transform: "translateX(-" + sliderIndex * 100 + "%)"
125
145
  }
126
146
  }, data.groupSource.map(function (group) {
127
- var _a;
147
+ var _a, _b;
128
148
  /** 当前是否在播放 */
129
149
 
130
150
 
@@ -132,25 +152,6 @@ function (_super) {
132
152
  return /*#__PURE__*/_react["default"].createElement("div", {
133
153
  key: group.id,
134
154
  className: "video-item-wrap",
135
- onClick: function onClick() {
136
- (0, _commonUtil.ensure)(function () {
137
- if (_this.videoRefMap[group.id].playing) {
138
- _this.videoRefMap[group.id].playing = false;
139
-
140
- _this.videoRefMap[group.id].el.player.pause();
141
- } else {
142
- if (group.video.playPosition == 'Popup') {
143
- _this.videoRefMap[group.id].el.fullPlay('h5');
144
- } else {
145
- _this.videoRefMap[group.id].playing = true;
146
-
147
- _this.videoRefMap[group.id].el.player.play();
148
- }
149
- }
150
-
151
- _this.setState({});
152
- });
153
- },
154
155
  style: {
155
156
  height: data.mobileHeight
156
157
  }
@@ -174,9 +175,13 @@ function (_super) {
174
175
  cover: (0, _coreUtil.getVideoCover)(group),
175
176
  source: group.video.sourceUrl
176
177
  }),
178
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
177
179
  videoId: group.id
178
180
  }), !isPlaying && group.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
179
- className: "play-btn center"
181
+ className: "play-btn center",
182
+ onClick: function onClick() {
183
+ _this.playOrPause(group);
184
+ }
180
185
  }, /*#__PURE__*/_react["default"].createElement("img", {
181
186
  alt: "",
182
187
  src: _playCircle["default"]
@@ -184,6 +189,9 @@ function (_super) {
184
189
  align: data.customize.align,
185
190
  data: group,
186
191
  noShare: true,
192
+ onPlayClick: function onPlayClick() {
193
+ return _this.playOrPause(group);
194
+ },
187
195
  share: __assign({
188
196
  url: (0, _commonUtil.addUrlQuery)(window.location.href, {
189
197
  scroll: 'node-' + data.id
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  position: relative;
5
- padding-bottom: 16px;
5
+ padding-bottom: 36px;
6
6
 
7
7
  .slider-wrap {
8
8
  width: 100%;
@@ -78,8 +78,29 @@ function (_super) {
78
78
  var _this = _super !== null && _super.apply(this, arguments) || this;
79
79
 
80
80
  _this.state = {};
81
+
82
+ _this.playOrPause = function (group) {
83
+ (0, _commonUtil.ensure)(function () {
84
+ if (_this.videoRefMap[group.id].playing) {
85
+ _this.videoRefMap[group.id].playing = false;
86
+
87
+ _this.videoRefMap[group.id].el.player.pause();
88
+ } else {
89
+ if (group.video.playPosition == 'Popup') {
90
+ _this.videoRefMap[group.id].el.fullPlay('h5');
91
+ } else {
92
+ _this.videoRefMap[group.id].playing = true;
93
+
94
+ _this.videoRefMap[group.id].el.player.play();
95
+ }
96
+ }
97
+
98
+ _this.setState({});
99
+ });
100
+ };
81
101
  /** 视频ref映射 */
82
102
 
103
+
83
104
  _this.videoRefMap = {};
84
105
  return _this;
85
106
  }
@@ -91,7 +112,7 @@ function (_super) {
91
112
  return /*#__PURE__*/_react["default"].createElement("div", {
92
113
  className: "video-layout3-wrap"
93
114
  }, data.groupSource.map(function (group) {
94
- var _a;
115
+ var _a, _b;
95
116
  /** 当前是否在播放 */
96
117
 
97
118
 
@@ -101,25 +122,6 @@ function (_super) {
101
122
  }, /*#__PURE__*/_react["default"].createElement("div", {
102
123
  key: group.id,
103
124
  className: "video-item-wrap",
104
- onClick: function onClick() {
105
- (0, _commonUtil.ensure)(function () {
106
- if (_this.videoRefMap[group.id].playing) {
107
- _this.videoRefMap[group.id].playing = false;
108
-
109
- _this.videoRefMap[group.id].el.player.pause();
110
- } else {
111
- if (group.video.playPosition == 'Popup') {
112
- _this.videoRefMap[group.id].el.fullPlay('h5');
113
- } else {
114
- _this.videoRefMap[group.id].playing = true;
115
-
116
- _this.videoRefMap[group.id].el.player.play();
117
- }
118
- }
119
-
120
- _this.setState({});
121
- });
122
- },
123
125
  style: {
124
126
  height: data.mobileHeight
125
127
  }
@@ -138,12 +140,16 @@ function (_super) {
138
140
  cover: (0, _coreUtil.getVideoCover)(group),
139
141
  source: group.video.sourceUrl
140
142
  }),
143
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
141
144
  videoId: group.id
142
145
  }), !isPlaying && /*#__PURE__*/_react["default"].createElement("div", {
143
146
  className: (0, _classnames["default"])('play-btn', {
144
147
  middle: group.video.playButton == 'Middle',
145
148
  bottomLeft: group.video.playButton == 'Bottom Left'
146
- })
149
+ }),
150
+ onClick: function onClick() {
151
+ _this.playOrPause(group);
152
+ }
147
153
  }, /*#__PURE__*/_react["default"].createElement("img", {
148
154
  alt: "",
149
155
  src: _playCircle["default"]
@@ -154,6 +160,9 @@ function (_super) {
154
160
  data: group,
155
161
  layout: 'h5-' + data.customize.layout.h5Layout,
156
162
  noShare: true,
163
+ onPlayClick: function onPlayClick() {
164
+ return _this.playOrPause(group);
165
+ },
157
166
  position: "relative",
158
167
  share: __assign({
159
168
  url: (0, _commonUtil.addUrlQuery)(window.location.href, {
@@ -37,8 +37,8 @@
37
37
  }
38
38
 
39
39
  &.bottomLeft {
40
- left: 16px;
41
- bottom: 16px;
40
+ left: 12px;
41
+ bottom: 10px;
42
42
  transform: unset;
43
43
  top: unset;
44
44
  }
@@ -77,6 +77,27 @@ function (_super) {
77
77
  /** 视频ref映射 */
78
78
 
79
79
  _this.videoRefMap = {};
80
+
81
+ _this.playOrPause = function (group) {
82
+ (0, _commonUtil.ensure)(function () {
83
+ if (_this.videoRefMap[group.id].playing) {
84
+ _this.videoRefMap[group.id].playing = false;
85
+
86
+ _this.videoRefMap[group.id].el.player.pause();
87
+ } else {
88
+ if (group.video.playPosition == 'Popup') {
89
+ _this.videoRefMap[group.id].el.fullPlay('pc');
90
+ } else {
91
+ _this.videoRefMap[group.id].playing = true;
92
+
93
+ _this.videoRefMap[group.id].el.player.play();
94
+ }
95
+ }
96
+
97
+ _this.setState({});
98
+ });
99
+ };
100
+
80
101
  return _this;
81
102
  }
82
103
 
@@ -90,7 +111,7 @@ function (_super) {
90
111
  return /*#__PURE__*/_react["default"].createElement("div", {
91
112
  className: "video-pc-layout1-wrap"
92
113
  }, /*#__PURE__*/_react["default"].createElement("div", null, data.groupSource.map(function (group) {
93
- var _a;
114
+ var _a, _b;
94
115
  /** 当前是否在播放 */
95
116
 
96
117
 
@@ -98,25 +119,6 @@ function (_super) {
98
119
  return /*#__PURE__*/_react["default"].createElement("div", {
99
120
  key: group.id,
100
121
  className: "video-item-wrap",
101
- onClick: function onClick() {
102
- (0, _commonUtil.ensure)(function () {
103
- if (_this.videoRefMap[group.id].playing) {
104
- _this.videoRefMap[group.id].playing = false;
105
-
106
- _this.videoRefMap[group.id].el.player.pause();
107
- } else {
108
- if (group.video.playPosition == 'Popup') {
109
- _this.videoRefMap[group.id].el.fullPlay('pc');
110
- } else {
111
- _this.videoRefMap[group.id].playing = true;
112
-
113
- _this.videoRefMap[group.id].el.player.play();
114
- }
115
- }
116
-
117
- _this.setState({});
118
- });
119
- },
120
122
  style: {
121
123
  height: data.pcHeight
122
124
  }
@@ -135,9 +137,13 @@ function (_super) {
135
137
  cover: (0, _coreUtil.getVideoCover)(group),
136
138
  source: group.video.sourceUrl
137
139
  }),
140
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
138
141
  videoId: group.id
139
142
  }), !isPlaying && group.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
140
- className: "play-btn center"
143
+ className: "play-btn center",
144
+ onClick: function onClick() {
145
+ _this.playOrPause(group);
146
+ }
141
147
  }, /*#__PURE__*/_react["default"].createElement("img", {
142
148
  alt: "",
143
149
  src: _playCircle["default"]
@@ -145,6 +151,9 @@ function (_super) {
145
151
  align: data.customize.align,
146
152
  data: group,
147
153
  noShare: true,
154
+ onPlayClick: function onPlayClick() {
155
+ return _this.playOrPause(group);
156
+ },
148
157
  padding: 48
149
158
  }), data.share.open && !hasPlaying && /*#__PURE__*/_react["default"].createElement(_ShareBtn["default"], {
150
159
  data: __assign({
@@ -79,6 +79,27 @@ function (_super) {
79
79
  /** 视频ref映射 */
80
80
 
81
81
  _this.videoRefMap = {};
82
+
83
+ _this.playOrPause = function (group) {
84
+ (0, _commonUtil.ensure)(function () {
85
+ if (_this.videoRefMap[group.id].playing) {
86
+ _this.videoRefMap[group.id].playing = false;
87
+
88
+ _this.videoRefMap[group.id].el.player.pause();
89
+ } else {
90
+ if (group.video.playPosition == 'Popup') {
91
+ _this.videoRefMap[group.id].el.fullPlay('pc');
92
+ } else {
93
+ _this.videoRefMap[group.id].playing = true;
94
+
95
+ _this.videoRefMap[group.id].el.player.play();
96
+ }
97
+ }
98
+
99
+ _this.setState({});
100
+ });
101
+ };
102
+
82
103
  return _this;
83
104
  }
84
105
 
@@ -102,22 +123,7 @@ function (_super) {
102
123
  }
103
124
  }, firstGroup && /*#__PURE__*/_react["default"].createElement("div", {
104
125
  key: firstGroup.id,
105
- className: "video-left-wrap",
106
- onClick: function onClick() {
107
- (0, _commonUtil.ensure)(function () {
108
- if (_this.videoRefMap[firstGroup.id].playing) {
109
- _this.videoRefMap[firstGroup.id].playing = false;
110
-
111
- _this.videoRefMap[firstGroup.id].el.player.pause();
112
- } else {
113
- _this.videoRefMap[firstGroup.id].playing = true;
114
-
115
- _this.videoRefMap[firstGroup.id].el.player.play();
116
- }
117
-
118
- _this.setState({});
119
- });
120
- }
126
+ className: "video-left-wrap"
121
127
  }, /*#__PURE__*/_react["default"].createElement(_common.Video, {
122
128
  ref: function ref(el) {
123
129
  if (!_this.videoRefMap[firstGroup.id]) {
@@ -133,9 +139,13 @@ function (_super) {
133
139
  cover: (0, _coreUtil.isPc)() ? firstGroup.overilay.content.pcImgSrc : firstGroup.overilay.content.h5ImgSrc,
134
140
  source: firstGroup.video.sourceUrl
135
141
  }),
142
+ play: isFirstGroupPlaying,
136
143
  videoId: firstGroup.id
137
144
  }), !isFirstGroupPlaying && firstGroup.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
138
- className: "play-btn center"
145
+ className: "play-btn center",
146
+ onClick: function onClick() {
147
+ _this.playOrPause(firstGroup);
148
+ }
139
149
  }, /*#__PURE__*/_react["default"].createElement("img", {
140
150
  alt: "",
141
151
  src: _playCircle["default"]
@@ -143,37 +153,21 @@ function (_super) {
143
153
  align: data.customize.align,
144
154
  data: firstGroup,
145
155
  noShare: true,
156
+ onPlayClick: function onPlayClick() {
157
+ return _this.playOrPause(firstGroup);
158
+ },
146
159
  padding: 32
147
160
  })), /*#__PURE__*/_react["default"].createElement("div", {
148
161
  className: "right-list-wrap"
149
162
  }, data.groupSource.slice(1).map(function (group) {
150
- var _a;
163
+ var _a, _b;
151
164
  /** 当前是否在播放 */
152
165
 
153
166
 
154
167
  var isPlaying = !!((_a = _this.videoRefMap[group.id]) === null || _a === void 0 ? void 0 : _a.playing);
155
168
  return /*#__PURE__*/_react["default"].createElement("div", {
156
169
  key: group.id,
157
- className: "video-item-wrap",
158
- onClick: function onClick() {
159
- (0, _commonUtil.ensure)(function () {
160
- if (_this.videoRefMap[group.id].playing) {
161
- _this.videoRefMap[group.id].playing = false;
162
-
163
- _this.videoRefMap[group.id].el.player.pause();
164
- } else {
165
- if (group.video.playPosition == 'Popup') {
166
- _this.videoRefMap[group.id].el.fullPlay('pc');
167
- } else {
168
- _this.videoRefMap[group.id].playing = true;
169
-
170
- _this.videoRefMap[group.id].el.player.play();
171
- }
172
- }
173
-
174
- _this.setState({});
175
- });
176
- }
170
+ className: "video-item-wrap"
177
171
  }, /*#__PURE__*/_react["default"].createElement(_common.Video, {
178
172
  ref: function ref(el) {
179
173
  if (!_this.videoRefMap[group.id]) {
@@ -189,16 +183,23 @@ function (_super) {
189
183
  cover: (0, _coreUtil.getVideoCover)(group),
190
184
  source: group.video.sourceUrl
191
185
  }),
186
+ play: (_b = _this.videoRefMap[group.id]) === null || _b === void 0 ? void 0 : _b.playing,
192
187
  videoId: group.id
193
188
  }), !isPlaying && group.video.playButton == 'Middle' && /*#__PURE__*/_react["default"].createElement("div", {
194
- className: "play-btn center"
189
+ className: "play-btn center",
190
+ onClick: function onClick() {
191
+ _this.playOrPause(group);
192
+ }
195
193
  }, /*#__PURE__*/_react["default"].createElement("img", {
196
194
  alt: "",
197
195
  src: _playCircle["default"]
198
- })), data.share.open && !isPlaying && /*#__PURE__*/_react["default"].createElement(_VideoTag["default"], {
196
+ })), !isPlaying && /*#__PURE__*/_react["default"].createElement(_VideoTag["default"], {
199
197
  align: data.customize.align,
200
198
  data: group,
201
199
  noShare: true,
200
+ onPlayClick: function onPlayClick() {
201
+ return _this.playOrPause(group);
202
+ },
202
203
  padding: 32
203
204
  }));
204
205
  })), data.share.open && !hasPlaying && /*#__PURE__*/_react["default"].createElement(_ShareBtn["default"], {