@micromag/screen-audio 0.2.405 → 0.2.409
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 +6 -1
- package/lib/index.js +6 -1
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -29,6 +29,7 @@ var propTypes = {
|
|
|
29
29
|
background: PropTypes$1.backgroundElement,
|
|
30
30
|
callToAction: PropTypes$1.callToAction,
|
|
31
31
|
current: PropTypes.bool,
|
|
32
|
+
active: PropTypes.bool,
|
|
32
33
|
transitions: PropTypes$1.transitions,
|
|
33
34
|
getMediaRef: PropTypes.func,
|
|
34
35
|
className: PropTypes.string
|
|
@@ -40,6 +41,7 @@ var defaultProps = {
|
|
|
40
41
|
background: null,
|
|
41
42
|
callToAction: null,
|
|
42
43
|
current: true,
|
|
44
|
+
active: true,
|
|
43
45
|
transitions: null,
|
|
44
46
|
getMediaRef: null,
|
|
45
47
|
className: null
|
|
@@ -54,6 +56,7 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
54
56
|
background = _ref.background,
|
|
55
57
|
callToAction = _ref.callToAction,
|
|
56
58
|
current = _ref.current,
|
|
59
|
+
active = _ref.active,
|
|
57
60
|
transitions = _ref.transitions,
|
|
58
61
|
getMediaRef = _ref.getMediaRef,
|
|
59
62
|
className = _ref.className;
|
|
@@ -83,6 +86,7 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
83
86
|
setReady = _useState2[1];
|
|
84
87
|
|
|
85
88
|
var backgroundPlaying = current && (isView || isEdit);
|
|
89
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
86
90
|
var transitionPlaying = current && ready;
|
|
87
91
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
88
92
|
var hasAudio = audio !== null;
|
|
@@ -264,7 +268,8 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
264
268
|
background: background,
|
|
265
269
|
width: width,
|
|
266
270
|
height: height,
|
|
267
|
-
playing: backgroundPlaying
|
|
271
|
+
playing: backgroundPlaying,
|
|
272
|
+
shouldLoad: backgroundShouldLoad
|
|
268
273
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
269
274
|
width: width,
|
|
270
275
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -50,6 +50,7 @@ var propTypes = {
|
|
|
50
50
|
background: core.PropTypes.backgroundElement,
|
|
51
51
|
callToAction: core.PropTypes.callToAction,
|
|
52
52
|
current: PropTypes__default["default"].bool,
|
|
53
|
+
active: PropTypes__default["default"].bool,
|
|
53
54
|
transitions: core.PropTypes.transitions,
|
|
54
55
|
getMediaRef: PropTypes__default["default"].func,
|
|
55
56
|
className: PropTypes__default["default"].string
|
|
@@ -61,6 +62,7 @@ var defaultProps = {
|
|
|
61
62
|
background: null,
|
|
62
63
|
callToAction: null,
|
|
63
64
|
current: true,
|
|
65
|
+
active: true,
|
|
64
66
|
transitions: null,
|
|
65
67
|
getMediaRef: null,
|
|
66
68
|
className: null
|
|
@@ -75,6 +77,7 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
75
77
|
background = _ref.background,
|
|
76
78
|
callToAction = _ref.callToAction,
|
|
77
79
|
current = _ref.current,
|
|
80
|
+
active = _ref.active,
|
|
78
81
|
transitions = _ref.transitions,
|
|
79
82
|
getMediaRef = _ref.getMediaRef,
|
|
80
83
|
className = _ref.className;
|
|
@@ -104,6 +107,7 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
104
107
|
setReady = _useState2[1];
|
|
105
108
|
|
|
106
109
|
var backgroundPlaying = current && (isView || isEdit);
|
|
110
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
107
111
|
var transitionPlaying = current && ready;
|
|
108
112
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
109
113
|
var hasAudio = audio !== null;
|
|
@@ -285,7 +289,8 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
285
289
|
background: background,
|
|
286
290
|
width: width,
|
|
287
291
|
height: height,
|
|
288
|
-
playing: backgroundPlaying
|
|
292
|
+
playing: backgroundPlaying,
|
|
293
|
+
shouldLoad: backgroundShouldLoad
|
|
289
294
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
290
295
|
width: width,
|
|
291
296
|
height: height
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-audio",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.409",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.2.
|
|
53
|
-
"@micromag/element-audio": "^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-layout": "^0.2.
|
|
59
|
-
"@micromag/element-media-controls": "^0.2.
|
|
60
|
-
"@micromag/transforms": "^0.2.
|
|
52
|
+
"@micromag/core": "^0.2.409",
|
|
53
|
+
"@micromag/element-audio": "^0.2.409",
|
|
54
|
+
"@micromag/element-background": "^0.2.409",
|
|
55
|
+
"@micromag/element-call-to-action": "^0.2.409",
|
|
56
|
+
"@micromag/element-closed-captions": "^0.2.409",
|
|
57
|
+
"@micromag/element-container": "^0.2.409",
|
|
58
|
+
"@micromag/element-layout": "^0.2.409",
|
|
59
|
+
"@micromag/element-media-controls": "^0.2.409",
|
|
60
|
+
"@micromag/transforms": "^0.2.409",
|
|
61
61
|
"classnames": "^2.2.6",
|
|
62
62
|
"lodash": "^4.17.21",
|
|
63
63
|
"prop-types": "^15.7.2",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "4c16c3bb63644d1bd5b7d50086098337317ee3f6"
|
|
71
71
|
}
|