@fonixtree/magic-design 1.0.187 → 1.0.188
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.
|
@@ -91,9 +91,17 @@ function (_super) {
|
|
|
91
91
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
92
92
|
|
|
93
93
|
_this.state = {};
|
|
94
|
+
_this.videoRef = /*#__PURE__*/_react["default"].createRef();
|
|
94
95
|
return _this;
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
ProductItem.prototype.componentDidMount = function () {
|
|
99
|
+
if (this.videoRef.current) {
|
|
100
|
+
this.videoRef.current.setAttribute('playsinline', '');
|
|
101
|
+
this.videoRef.current.setAttribute('webkit-playsinline', '');
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
97
105
|
ProductItem.prototype.render = function () {
|
|
98
106
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
99
107
|
|
|
@@ -165,29 +173,16 @@ function (_super) {
|
|
|
165
173
|
}, data.url && !data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("img", {
|
|
166
174
|
alt: "welcome advertise",
|
|
167
175
|
src: data.url
|
|
168
|
-
}), data.url && data.url.includes('.mp4') &&
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
// </video>
|
|
179
|
-
_react["default"].createElement("div", {
|
|
180
|
-
className: "video-wrap"
|
|
181
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Video, {
|
|
182
|
-
key: data.id + "-" + data.url + "}",
|
|
183
|
-
opts: {
|
|
184
|
-
source: data.url,
|
|
185
|
-
controlBarHide: true,
|
|
186
|
-
autoplay: true,
|
|
187
|
-
loop: true,
|
|
188
|
-
speed: 1
|
|
189
|
-
},
|
|
190
|
-
videoId: data.id
|
|
176
|
+
}), data.url && data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("video", {
|
|
177
|
+
ref: this.videoRef,
|
|
178
|
+
autoPlay: true,
|
|
179
|
+
loop: true,
|
|
180
|
+
muted: true,
|
|
181
|
+
playsinline: true,
|
|
182
|
+
"webkit-playsinline": true
|
|
183
|
+
}, /*#__PURE__*/_react["default"].createElement("source", {
|
|
184
|
+
src: data.url,
|
|
185
|
+
type: "video/mp4"
|
|
191
186
|
})));
|
|
192
187
|
}
|
|
193
188
|
|
|
@@ -91,9 +91,17 @@ function (_super) {
|
|
|
91
91
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
92
92
|
|
|
93
93
|
_this.state = {};
|
|
94
|
+
_this.videoRef = /*#__PURE__*/_react["default"].createRef();
|
|
94
95
|
return _this;
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
ProductItem.prototype.componentDidMount = function () {
|
|
99
|
+
if (this.videoRef.current) {
|
|
100
|
+
this.videoRef.current.setAttribute('playsinline', '');
|
|
101
|
+
this.videoRef.current.setAttribute('webkit-playsinline', '');
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
97
105
|
ProductItem.prototype.render = function () {
|
|
98
106
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
99
107
|
|
|
@@ -165,29 +173,16 @@ function (_super) {
|
|
|
165
173
|
}, data.url && !data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("img", {
|
|
166
174
|
alt: "welcome advertise",
|
|
167
175
|
src: data.url
|
|
168
|
-
}), data.url && data.url.includes('.mp4') &&
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
// </video>
|
|
179
|
-
_react["default"].createElement("div", {
|
|
180
|
-
className: "video-wrap"
|
|
181
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Video, {
|
|
182
|
-
key: data.id + "-" + data.url + "}",
|
|
183
|
-
opts: {
|
|
184
|
-
source: data.url,
|
|
185
|
-
controlBarHide: true,
|
|
186
|
-
autoplay: true,
|
|
187
|
-
loop: true,
|
|
188
|
-
speed: 1
|
|
189
|
-
},
|
|
190
|
-
videoId: data.id
|
|
176
|
+
}), data.url && data.url.includes('.mp4') && /*#__PURE__*/_react["default"].createElement("video", {
|
|
177
|
+
ref: this.videoRef,
|
|
178
|
+
autoPlay: true,
|
|
179
|
+
loop: true,
|
|
180
|
+
muted: true,
|
|
181
|
+
playsinline: true,
|
|
182
|
+
"webkit-playsinline": true
|
|
183
|
+
}, /*#__PURE__*/_react["default"].createElement("source", {
|
|
184
|
+
src: data.url,
|
|
185
|
+
type: "video/mp4"
|
|
191
186
|
})));
|
|
192
187
|
}
|
|
193
188
|
|