@micromag/screen-urbania-article 0.3.267 → 0.3.268
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.
- package/es/index.js +8 -5
- package/lib/index.js +8 -5
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -228,7 +228,9 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
228
228
|
|
|
229
229
|
var _ref5 = image || {},
|
|
230
230
|
_ref5$url = _ref5.url,
|
|
231
|
-
url = _ref5$url === void 0 ? null : _ref5$url
|
|
231
|
+
url = _ref5$url === void 0 ? null : _ref5$url,
|
|
232
|
+
_ref5$type = _ref5.type,
|
|
233
|
+
imageType = _ref5$type === void 0 ? null : _ref5$type;
|
|
232
234
|
|
|
233
235
|
var hasImage = url !== null;
|
|
234
236
|
var hasCallToAction = callToAction !== null && callToAction.active === true;
|
|
@@ -239,6 +241,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
239
241
|
|
|
240
242
|
var hasVideoBackground = backgroundVideo !== null;
|
|
241
243
|
var mediaShouldLoad = current || active;
|
|
244
|
+
var finalPlaying = playing && current;
|
|
242
245
|
var backgroundPlaying = current && !openedWebView && (isView || isEdit);
|
|
243
246
|
var items = [/*#__PURE__*/React.createElement(ScreenElement, {
|
|
244
247
|
key: "overTitle",
|
|
@@ -359,7 +362,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
359
362
|
playing: backgroundPlaying,
|
|
360
363
|
muted: muted,
|
|
361
364
|
shouldLoad: mediaShouldLoad,
|
|
362
|
-
mediaRef: mediaRef,
|
|
365
|
+
mediaRef: imageType !== 'video' && hasVideoBackground ? mediaRef : null,
|
|
363
366
|
withoutVideo: isPreview
|
|
364
367
|
}), /*#__PURE__*/React.createElement(Container, {
|
|
365
368
|
className: styles.content,
|
|
@@ -412,10 +415,10 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
412
415
|
fit: 'cover'
|
|
413
416
|
},
|
|
414
417
|
shouldLoad: mediaShouldLoad,
|
|
415
|
-
playing:
|
|
418
|
+
playing: finalPlaying,
|
|
416
419
|
muted: muted,
|
|
417
|
-
withoutVideo: isPreview
|
|
418
|
-
,
|
|
420
|
+
withoutVideo: isPreview,
|
|
421
|
+
mediaRef: mediaRef,
|
|
419
422
|
autoPlay: true
|
|
420
423
|
}) : null)), /*#__PURE__*/React.createElement("div", {
|
|
421
424
|
className: styles.callToActionContainer
|
package/lib/index.js
CHANGED
|
@@ -249,7 +249,9 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
249
249
|
|
|
250
250
|
var _ref5 = image || {},
|
|
251
251
|
_ref5$url = _ref5.url,
|
|
252
|
-
url = _ref5$url === void 0 ? null : _ref5$url
|
|
252
|
+
url = _ref5$url === void 0 ? null : _ref5$url,
|
|
253
|
+
_ref5$type = _ref5.type,
|
|
254
|
+
imageType = _ref5$type === void 0 ? null : _ref5$type;
|
|
253
255
|
|
|
254
256
|
var hasImage = url !== null;
|
|
255
257
|
var hasCallToAction = callToAction !== null && callToAction.active === true;
|
|
@@ -260,6 +262,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
260
262
|
|
|
261
263
|
var hasVideoBackground = backgroundVideo !== null;
|
|
262
264
|
var mediaShouldLoad = current || active;
|
|
265
|
+
var finalPlaying = playing && current;
|
|
263
266
|
var backgroundPlaying = current && !openedWebView && (isView || isEdit);
|
|
264
267
|
var items = [/*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
|
|
265
268
|
key: "overTitle",
|
|
@@ -380,7 +383,7 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
380
383
|
playing: backgroundPlaying,
|
|
381
384
|
muted: muted,
|
|
382
385
|
shouldLoad: mediaShouldLoad,
|
|
383
|
-
mediaRef: mediaRef,
|
|
386
|
+
mediaRef: imageType !== 'video' && hasVideoBackground ? mediaRef : null,
|
|
384
387
|
withoutVideo: isPreview
|
|
385
388
|
}), /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
386
389
|
className: styles.content,
|
|
@@ -433,10 +436,10 @@ var UrbaniaArticle = function UrbaniaArticle(_ref) {
|
|
|
433
436
|
fit: 'cover'
|
|
434
437
|
},
|
|
435
438
|
shouldLoad: mediaShouldLoad,
|
|
436
|
-
playing:
|
|
439
|
+
playing: finalPlaying,
|
|
437
440
|
muted: muted,
|
|
438
|
-
withoutVideo: isPreview
|
|
439
|
-
,
|
|
441
|
+
withoutVideo: isPreview,
|
|
442
|
+
mediaRef: mediaRef,
|
|
440
443
|
autoPlay: true
|
|
441
444
|
}) : null)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
442
445
|
className: styles.callToActionContainer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-urbania-article",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.268",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "f38211c7257d61f6c59828cfd22f9d0d28dabeee"
|
|
77
77
|
}
|