@fonixtree/magic-design 1.0.184 → 1.0.186

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.
@@ -156,6 +156,7 @@ function (_super) {
156
156
  })) || []; // ad 卡片
157
157
 
158
158
  if (data.type === 'ad') {
159
+ console.log('data', data);
159
160
  return /*#__PURE__*/_react["default"].createElement("div", {
160
161
  className: "m-product-item-advertise",
161
162
  onClick: function onClick() {
@@ -164,15 +165,28 @@ function (_super) {
164
165
  }, data.url && !data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("img", {
165
166
  alt: "welcome advertise",
166
167
  src: data.url
167
- }), data.url && data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("video", {
168
- autoPlay: true,
169
- loop: true,
170
- muted: true,
171
- playsinline: true,
172
- "webkit-playsinline": true
173
- }, /*#__PURE__*/_react["default"].createElement("source", {
174
- src: data.url,
175
- type: "video/mp4"
168
+ }), data.url && data.url.includes('.mp4') &&
169
+ /*#__PURE__*/
170
+ // <video
171
+ // autoPlay
172
+ // loop
173
+ // muted
174
+ // playsinline
175
+ // webkit-playsinline
176
+ // >
177
+ // <source src={data.url} type="video/mp4" />
178
+ // </video>
179
+ _react["default"].createElement("div", {
180
+ className: "video-wrap"
181
+ }, /*#__PURE__*/_react["default"].createElement(_common.Video, {
182
+ opts: {
183
+ source: data.url,
184
+ controlBarHide: true,
185
+ autoplay: true,
186
+ loop: true,
187
+ speed: 1
188
+ },
189
+ videoId: data.id
176
190
  })));
177
191
  }
178
192
 
@@ -1,9 +1,19 @@
1
1
  .m-product-item-advertise {
2
2
 
3
3
  img,
4
- video {
4
+ video,
5
+ .video-wrap {
5
6
  width: 100%;
6
7
  border-radius: 8px;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .video-container {
12
+ background: unset;
13
+
14
+ .prism-player {
15
+ background-color: unset;
16
+ }
7
17
  }
8
18
  }
9
19
 
@@ -416,6 +416,7 @@ function (_super) {
416
416
  return {
417
417
  type: 'ad',
418
418
  url: it === null || it === void 0 ? void 0 : it.url,
419
+ id: it === null || it === void 0 ? void 0 : it.contentId,
419
420
  adObj: it
420
421
  };
421
422
  })];
@@ -156,6 +156,7 @@ function (_super) {
156
156
  })) || []; // ad 卡片
157
157
 
158
158
  if (data.type === 'ad') {
159
+ console.log('data', data);
159
160
  return /*#__PURE__*/_react["default"].createElement("div", {
160
161
  className: "m-product-item-advertise",
161
162
  onClick: function onClick() {
@@ -164,15 +165,28 @@ function (_super) {
164
165
  }, data.url && !data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("img", {
165
166
  alt: "welcome advertise",
166
167
  src: data.url
167
- }), data.url && data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("video", {
168
- autoPlay: true,
169
- loop: true,
170
- muted: true,
171
- playsinline: true,
172
- "webkit-playsinline": true
173
- }, /*#__PURE__*/_react["default"].createElement("source", {
174
- src: data.url,
175
- type: "video/mp4"
168
+ }), data.url && data.url.includes('.mp4') &&
169
+ /*#__PURE__*/
170
+ // <video
171
+ // autoPlay
172
+ // loop
173
+ // muted
174
+ // playsinline
175
+ // webkit-playsinline
176
+ // >
177
+ // <source src={data.url} type="video/mp4" />
178
+ // </video>
179
+ _react["default"].createElement("div", {
180
+ className: "video-wrap"
181
+ }, /*#__PURE__*/_react["default"].createElement(_common.Video, {
182
+ opts: {
183
+ source: data.url,
184
+ controlBarHide: true,
185
+ autoplay: true,
186
+ loop: true,
187
+ speed: 1
188
+ },
189
+ videoId: data.id
176
190
  })));
177
191
  }
178
192
 
@@ -1,9 +1,19 @@
1
1
  .m-product-item-advertise {
2
2
 
3
3
  img,
4
- video {
4
+ video,
5
+ .video-wrap {
5
6
  width: 100%;
6
7
  border-radius: 8px;
8
+ overflow: hidden;
9
+ }
10
+
11
+ .video-container {
12
+ background: unset;
13
+
14
+ .prism-player {
15
+ background-color: unset;
16
+ }
7
17
  }
8
18
  }
9
19
 
@@ -416,6 +416,7 @@ function (_super) {
416
416
  return {
417
417
  type: 'ad',
418
418
  url: it === null || it === void 0 ? void 0 : it.url,
419
+ id: it === null || it === void 0 ? void 0 : it.contentId,
419
420
  adObj: it
420
421
  };
421
422
  })];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.184",
4
+ "version": "1.0.186",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",