@micromag/screen-video 0.2.403 → 0.2.407
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 +7 -4
- package/lib/index.js +7 -4
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var propTypes = {
|
|
|
28
28
|
background: PropTypes$1.backgroundElement,
|
|
29
29
|
callToAction: PropTypes$1.callToAction,
|
|
30
30
|
current: PropTypes.bool,
|
|
31
|
-
|
|
31
|
+
active: PropTypes.bool,
|
|
32
32
|
transitions: PropTypes$1.transitions,
|
|
33
33
|
spacing: PropTypes.number,
|
|
34
34
|
getMediaRef: PropTypes.func,
|
|
@@ -40,7 +40,7 @@ var defaultProps = {
|
|
|
40
40
|
background: null,
|
|
41
41
|
callToAction: null,
|
|
42
42
|
current: true,
|
|
43
|
-
|
|
43
|
+
active: true,
|
|
44
44
|
transitions: null,
|
|
45
45
|
spacing: 20,
|
|
46
46
|
getMediaRef: null,
|
|
@@ -55,6 +55,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
55
55
|
background = _ref.background,
|
|
56
56
|
callToAction = _ref.callToAction,
|
|
57
57
|
current = _ref.current,
|
|
58
|
+
active = _ref.active,
|
|
58
59
|
transitions = _ref.transitions,
|
|
59
60
|
spacing = _ref.spacing,
|
|
60
61
|
getMediaRef = _ref.getMediaRef,
|
|
@@ -276,7 +277,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
276
277
|
onDurationChanged: onDurationChanged,
|
|
277
278
|
onSeeked: onSeeked,
|
|
278
279
|
onVolumeChanged: onVolumeChanged,
|
|
279
|
-
focusable: current && isView
|
|
280
|
+
focusable: current && isView,
|
|
281
|
+
preload: current || active ? 'auto' : 'metadata' // onPosterLoaded={onPosterLoaded}
|
|
280
282
|
|
|
281
283
|
}))) : null), !isPlaceholder ? /*#__PURE__*/React.createElement("div", {
|
|
282
284
|
key: "bottom-content",
|
|
@@ -319,7 +321,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
319
321
|
background: background,
|
|
320
322
|
width: width,
|
|
321
323
|
height: height,
|
|
322
|
-
playing: backgroundPlaying
|
|
324
|
+
playing: backgroundPlaying,
|
|
325
|
+
shouldLoad: current || active
|
|
323
326
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
324
327
|
width: width,
|
|
325
328
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -49,7 +49,7 @@ var propTypes = {
|
|
|
49
49
|
background: core.PropTypes.backgroundElement,
|
|
50
50
|
callToAction: core.PropTypes.callToAction,
|
|
51
51
|
current: PropTypes__default["default"].bool,
|
|
52
|
-
|
|
52
|
+
active: PropTypes__default["default"].bool,
|
|
53
53
|
transitions: core.PropTypes.transitions,
|
|
54
54
|
spacing: PropTypes__default["default"].number,
|
|
55
55
|
getMediaRef: PropTypes__default["default"].func,
|
|
@@ -61,7 +61,7 @@ var defaultProps = {
|
|
|
61
61
|
background: null,
|
|
62
62
|
callToAction: null,
|
|
63
63
|
current: true,
|
|
64
|
-
|
|
64
|
+
active: true,
|
|
65
65
|
transitions: null,
|
|
66
66
|
spacing: 20,
|
|
67
67
|
getMediaRef: null,
|
|
@@ -76,6 +76,7 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
76
76
|
background = _ref.background,
|
|
77
77
|
callToAction = _ref.callToAction,
|
|
78
78
|
current = _ref.current,
|
|
79
|
+
active = _ref.active,
|
|
79
80
|
transitions = _ref.transitions,
|
|
80
81
|
spacing = _ref.spacing,
|
|
81
82
|
getMediaRef = _ref.getMediaRef,
|
|
@@ -297,7 +298,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
297
298
|
onDurationChanged: onDurationChanged,
|
|
298
299
|
onSeeked: onSeeked,
|
|
299
300
|
onVolumeChanged: onVolumeChanged,
|
|
300
|
-
focusable: current && isView
|
|
301
|
+
focusable: current && isView,
|
|
302
|
+
preload: current || active ? 'auto' : 'metadata' // onPosterLoaded={onPosterLoaded}
|
|
301
303
|
|
|
302
304
|
}))) : null), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
303
305
|
key: "bottom-content",
|
|
@@ -340,7 +342,8 @@ var VideoScreen = function VideoScreen(_ref) {
|
|
|
340
342
|
background: background,
|
|
341
343
|
width: width,
|
|
342
344
|
height: height,
|
|
343
|
-
playing: backgroundPlaying
|
|
345
|
+
playing: backgroundPlaying,
|
|
346
|
+
shouldLoad: current || active
|
|
344
347
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
345
348
|
width: width,
|
|
346
349
|
height: height
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-video",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.407",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
52
|
"@folklore/size": "^0.1.15",
|
|
53
|
-
"@micromag/core": "^0.2.
|
|
54
|
-
"@micromag/element-background": "^0.2.
|
|
55
|
-
"@micromag/element-call-to-action": "^0.2.
|
|
56
|
-
"@micromag/element-closed-captions": "^0.2.
|
|
57
|
-
"@micromag/element-container": "^0.2.
|
|
58
|
-
"@micromag/element-image": "^0.2.
|
|
59
|
-
"@micromag/element-media-controls": "^0.2.
|
|
60
|
-
"@micromag/element-video": "^0.2.
|
|
61
|
-
"@micromag/transforms": "^0.2.
|
|
53
|
+
"@micromag/core": "^0.2.405",
|
|
54
|
+
"@micromag/element-background": "^0.2.407",
|
|
55
|
+
"@micromag/element-call-to-action": "^0.2.405",
|
|
56
|
+
"@micromag/element-closed-captions": "^0.2.405",
|
|
57
|
+
"@micromag/element-container": "^0.2.405",
|
|
58
|
+
"@micromag/element-image": "^0.2.406",
|
|
59
|
+
"@micromag/element-media-controls": "^0.2.405",
|
|
60
|
+
"@micromag/element-video": "^0.2.407",
|
|
61
|
+
"@micromag/transforms": "^0.2.405",
|
|
62
62
|
"classnames": "^2.2.6",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"prop-types": "^15.7.2",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "6e9f2acd39ad4982b571b91c406d30c59f4be473"
|
|
72
72
|
}
|