@fonixtree/magic-design 0.0.114 → 0.0.115

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.
@@ -311,7 +311,7 @@ function (_super) {
311
311
  shadowWrap.onclick = function () {
312
312
  var _a;
313
313
 
314
- (_a = document.querySelector("[video-id=" + videoId + "]")) === null || _a === void 0 ? void 0 : _a.remove();
314
+ (_a = document.querySelector("[video-id=\"" + videoId + "\"]")) === null || _a === void 0 ? void 0 : _a.remove();
315
315
  };
316
316
 
317
317
  var contentWrap = document.createElement('div');
@@ -131,7 +131,7 @@ function (_super) {
131
131
  }
132
132
  },
133
133
  opts: __assign(__assign({}, group.video), {
134
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
134
+ cover: (0, _coreUtil.getVideoCover)(group),
135
135
  source: group.video.sourceUrl
136
136
  }),
137
137
  videoId: group.id
@@ -13,8 +13,6 @@ var _playCircle = _interopRequireDefault(require("../../imgs/play-circle.png"));
13
13
 
14
14
  var _commonUtil = require("../../../../../../utils/commonUtil");
15
15
 
16
- var _coreUtil = require("../../../../../../utils/coreUtil");
17
-
18
16
  require("./index.less");
19
17
 
20
18
  var _VideoTag = _interopRequireDefault(require("../../components/VideoTag"));
@@ -166,7 +164,7 @@ function (_super) {
166
164
  }
167
165
  },
168
166
  opts: __assign(__assign({}, group.video), {
169
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
167
+ cover: getVideoCover(group),
170
168
  source: group.video.sourceUrl
171
169
  }),
172
170
  videoId: group.id
@@ -133,7 +133,7 @@ function (_super) {
133
133
  }
134
134
  },
135
135
  opts: __assign(__assign({}, group.video), {
136
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
136
+ cover: (0, _coreUtil.getVideoCover)(group),
137
137
  source: group.video.sourceUrl
138
138
  }),
139
139
  videoId: group.id
@@ -135,7 +135,7 @@ function (_super) {
135
135
  }
136
136
  },
137
137
  opts: __assign(__assign({}, group.video), {
138
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
138
+ cover: (0, _coreUtil.getVideoCover)(group),
139
139
  source: group.video.sourceUrl
140
140
  }),
141
141
  videoId: group.id
@@ -160,9 +160,13 @@ function (_super) {
160
160
 
161
161
  _this.videoRefMap[group.id].el.player.pause();
162
162
  } else {
163
- _this.videoRefMap[group.id].playing = true;
163
+ if (group.video.playPosition == 'Popup') {
164
+ _this.videoRefMap[group.id].el.fullPlay('pc');
165
+ } else {
166
+ _this.videoRefMap[group.id].playing = true;
164
167
 
165
- _this.videoRefMap[group.id].el.player.play();
168
+ _this.videoRefMap[group.id].el.player.play();
169
+ }
166
170
  }
167
171
 
168
172
  _this.setState({});
@@ -180,7 +184,7 @@ function (_super) {
180
184
  }
181
185
  },
182
186
  opts: __assign(__assign({}, group.video), {
183
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
187
+ cover: (0, _coreUtil.getVideoCover)(group),
184
188
  source: group.video.sourceUrl
185
189
  }),
186
190
  videoId: group.id
@@ -117,9 +117,13 @@ function (_super) {
117
117
 
118
118
  _this.videoRefMap[group.id].el.player.pause();
119
119
  } else {
120
- _this.videoRefMap[group.id].playing = true;
120
+ if (group.video.playPosition == 'Popup') {
121
+ _this.videoRefMap[group.id].el.fullPlay('pc');
122
+ } else {
123
+ _this.videoRefMap[group.id].playing = true;
121
124
 
122
- _this.videoRefMap[group.id].el.player.play();
125
+ _this.videoRefMap[group.id].el.player.play();
126
+ }
123
127
  }
124
128
 
125
129
  _this.setState({});
@@ -137,7 +141,7 @@ function (_super) {
137
141
  }
138
142
  },
139
143
  opts: __assign(__assign({}, group.video), {
140
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
144
+ cover: (0, _coreUtil.getVideoCover)(group),
141
145
  source: group.video.sourceUrl
142
146
  }),
143
147
  videoId: group.id
@@ -106,9 +106,13 @@ function (_super) {
106
106
 
107
107
  _this.videoRefMap[group.id].el.player.pause();
108
108
  } else {
109
- _this.videoRefMap[group.id].playing = true;
109
+ if (group.video.playPosition == 'Popup') {
110
+ _this.videoRefMap[group.id].el.fullPlay('pc');
111
+ } else {
112
+ _this.videoRefMap[group.id].playing = true;
110
113
 
111
- _this.videoRefMap[group.id].el.player.play();
114
+ _this.videoRefMap[group.id].el.player.play();
115
+ }
112
116
  }
113
117
 
114
118
  _this.setState({});
@@ -129,7 +133,7 @@ function (_super) {
129
133
  }
130
134
  },
131
135
  opts: __assign(__assign({}, group.video), {
132
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
136
+ cover: (0, _coreUtil.getVideoCover)(group),
133
137
  source: group.video.sourceUrl
134
138
  }),
135
139
  videoId: group.id
@@ -106,9 +106,13 @@ function (_super) {
106
106
 
107
107
  _this.videoRefMap[group.id].el.player.pause();
108
108
  } else {
109
- _this.videoRefMap[group.id].playing = true;
109
+ if (group.video.playPosition == 'Popup') {
110
+ _this.videoRefMap[group.id].el.fullPlay('pc');
111
+ } else {
112
+ _this.videoRefMap[group.id].playing = true;
110
113
 
111
- _this.videoRefMap[group.id].el.player.play();
114
+ _this.videoRefMap[group.id].el.player.play();
115
+ }
112
116
  }
113
117
 
114
118
  _this.setState({});
@@ -129,7 +133,7 @@ function (_super) {
129
133
  }
130
134
  },
131
135
  opts: __assign(__assign({}, group.video), {
132
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
136
+ cover: (0, _coreUtil.getVideoCover)(group),
133
137
  source: group.video.sourceUrl
134
138
  }),
135
139
  videoId: group.id
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isActiveFloor = exports.copyNode = exports.clickUrl = void 0;
6
+ exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isActiveFloor = exports.getVideoCover = exports.copyNode = exports.clickUrl = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
@@ -206,10 +206,17 @@ exports.isPc = isPc;
206
206
  var setMagicDesign = function setMagicDesign(magicDesignObj) {
207
207
  window.magicDesign = __assign(__assign({}, window.magicDesign), magicDesignObj);
208
208
  };
209
+
210
+ exports.setMagicDesign = setMagicDesign;
211
+
212
+ var getVideoCover = function getVideoCover(group) {
213
+ if (group.overilay.open) return isPc() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc;
214
+ return '';
215
+ };
209
216
  /** 刷新预览区域 */
210
217
 
211
218
 
212
- exports.setMagicDesign = setMagicDesign;
219
+ exports.getVideoCover = getVideoCover;
213
220
 
214
221
  var renderPreview = function renderPreview(changeHistory) {
215
222
  if (changeHistory === void 0) {
@@ -311,7 +311,7 @@ function (_super) {
311
311
  shadowWrap.onclick = function () {
312
312
  var _a;
313
313
 
314
- (_a = document.querySelector("[video-id=" + videoId + "]")) === null || _a === void 0 ? void 0 : _a.remove();
314
+ (_a = document.querySelector("[video-id=\"" + videoId + "\"]")) === null || _a === void 0 ? void 0 : _a.remove();
315
315
  };
316
316
 
317
317
  var contentWrap = document.createElement('div');
@@ -131,7 +131,7 @@ function (_super) {
131
131
  }
132
132
  },
133
133
  opts: __assign(__assign({}, group.video), {
134
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
134
+ cover: (0, _coreUtil.getVideoCover)(group),
135
135
  source: group.video.sourceUrl
136
136
  }),
137
137
  videoId: group.id
@@ -13,8 +13,6 @@ var _playCircle = _interopRequireDefault(require("../../imgs/play-circle.png"));
13
13
 
14
14
  var _commonUtil = require("../../../../../../utils/commonUtil");
15
15
 
16
- var _coreUtil = require("../../../../../../utils/coreUtil");
17
-
18
16
  require("./index.less");
19
17
 
20
18
  var _VideoTag = _interopRequireDefault(require("../../components/VideoTag"));
@@ -166,7 +164,7 @@ function (_super) {
166
164
  }
167
165
  },
168
166
  opts: __assign(__assign({}, group.video), {
169
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
167
+ cover: getVideoCover(group),
170
168
  source: group.video.sourceUrl
171
169
  }),
172
170
  videoId: group.id
@@ -133,7 +133,7 @@ function (_super) {
133
133
  }
134
134
  },
135
135
  opts: __assign(__assign({}, group.video), {
136
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
136
+ cover: (0, _coreUtil.getVideoCover)(group),
137
137
  source: group.video.sourceUrl
138
138
  }),
139
139
  videoId: group.id
@@ -135,7 +135,7 @@ function (_super) {
135
135
  }
136
136
  },
137
137
  opts: __assign(__assign({}, group.video), {
138
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
138
+ cover: (0, _coreUtil.getVideoCover)(group),
139
139
  source: group.video.sourceUrl
140
140
  }),
141
141
  videoId: group.id
@@ -160,9 +160,13 @@ function (_super) {
160
160
 
161
161
  _this.videoRefMap[group.id].el.player.pause();
162
162
  } else {
163
- _this.videoRefMap[group.id].playing = true;
163
+ if (group.video.playPosition == 'Popup') {
164
+ _this.videoRefMap[group.id].el.fullPlay('pc');
165
+ } else {
166
+ _this.videoRefMap[group.id].playing = true;
164
167
 
165
- _this.videoRefMap[group.id].el.player.play();
168
+ _this.videoRefMap[group.id].el.player.play();
169
+ }
166
170
  }
167
171
 
168
172
  _this.setState({});
@@ -180,7 +184,7 @@ function (_super) {
180
184
  }
181
185
  },
182
186
  opts: __assign(__assign({}, group.video), {
183
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
187
+ cover: (0, _coreUtil.getVideoCover)(group),
184
188
  source: group.video.sourceUrl
185
189
  }),
186
190
  videoId: group.id
@@ -117,9 +117,13 @@ function (_super) {
117
117
 
118
118
  _this.videoRefMap[group.id].el.player.pause();
119
119
  } else {
120
- _this.videoRefMap[group.id].playing = true;
120
+ if (group.video.playPosition == 'Popup') {
121
+ _this.videoRefMap[group.id].el.fullPlay('pc');
122
+ } else {
123
+ _this.videoRefMap[group.id].playing = true;
121
124
 
122
- _this.videoRefMap[group.id].el.player.play();
125
+ _this.videoRefMap[group.id].el.player.play();
126
+ }
123
127
  }
124
128
 
125
129
  _this.setState({});
@@ -137,7 +141,7 @@ function (_super) {
137
141
  }
138
142
  },
139
143
  opts: __assign(__assign({}, group.video), {
140
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
144
+ cover: (0, _coreUtil.getVideoCover)(group),
141
145
  source: group.video.sourceUrl
142
146
  }),
143
147
  videoId: group.id
@@ -106,9 +106,13 @@ function (_super) {
106
106
 
107
107
  _this.videoRefMap[group.id].el.player.pause();
108
108
  } else {
109
- _this.videoRefMap[group.id].playing = true;
109
+ if (group.video.playPosition == 'Popup') {
110
+ _this.videoRefMap[group.id].el.fullPlay('pc');
111
+ } else {
112
+ _this.videoRefMap[group.id].playing = true;
110
113
 
111
- _this.videoRefMap[group.id].el.player.play();
114
+ _this.videoRefMap[group.id].el.player.play();
115
+ }
112
116
  }
113
117
 
114
118
  _this.setState({});
@@ -129,7 +133,7 @@ function (_super) {
129
133
  }
130
134
  },
131
135
  opts: __assign(__assign({}, group.video), {
132
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
136
+ cover: (0, _coreUtil.getVideoCover)(group),
133
137
  source: group.video.sourceUrl
134
138
  }),
135
139
  videoId: group.id
@@ -106,9 +106,13 @@ function (_super) {
106
106
 
107
107
  _this.videoRefMap[group.id].el.player.pause();
108
108
  } else {
109
- _this.videoRefMap[group.id].playing = true;
109
+ if (group.video.playPosition == 'Popup') {
110
+ _this.videoRefMap[group.id].el.fullPlay('pc');
111
+ } else {
112
+ _this.videoRefMap[group.id].playing = true;
110
113
 
111
- _this.videoRefMap[group.id].el.player.play();
114
+ _this.videoRefMap[group.id].el.player.play();
115
+ }
112
116
  }
113
117
 
114
118
  _this.setState({});
@@ -129,7 +133,7 @@ function (_super) {
129
133
  }
130
134
  },
131
135
  opts: __assign(__assign({}, group.video), {
132
- cover: (0, _coreUtil.isPc)() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc,
136
+ cover: (0, _coreUtil.getVideoCover)(group),
133
137
  source: group.video.sourceUrl
134
138
  }),
135
139
  videoId: group.id
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isActiveFloor = exports.copyNode = exports.clickUrl = void 0;
6
+ exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isActiveFloor = exports.getVideoCover = exports.copyNode = exports.clickUrl = void 0;
7
7
 
8
8
  var _uuid = require("uuid");
9
9
 
@@ -206,10 +206,17 @@ exports.isPc = isPc;
206
206
  var setMagicDesign = function setMagicDesign(magicDesignObj) {
207
207
  window.magicDesign = __assign(__assign({}, window.magicDesign), magicDesignObj);
208
208
  };
209
+
210
+ exports.setMagicDesign = setMagicDesign;
211
+
212
+ var getVideoCover = function getVideoCover(group) {
213
+ if (group.overilay.open) return isPc() ? group.overilay.content.pcImgSrc : group.overilay.content.h5ImgSrc;
214
+ return '';
215
+ };
209
216
  /** 刷新预览区域 */
210
217
 
211
218
 
212
- exports.setMagicDesign = setMagicDesign;
219
+ exports.getVideoCover = getVideoCover;
213
220
 
214
221
  var renderPreview = function renderPreview(changeHistory) {
215
222
  if (changeHistory === void 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.114",
4
+ "version": "0.0.115",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",