@micromag/screen-audio 0.3.348 → 0.3.356
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 +80 -72
- package/lib/index.js +81 -72
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -9,12 +9,13 @@ import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
|
9
9
|
import { ScreenElement, Transitions } from '@micromag/core/components';
|
|
10
10
|
import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
|
|
11
11
|
import { useTrackScreenMedia } from '@micromag/core/hooks';
|
|
12
|
-
import { isIos } from '@micromag/core/utils';
|
|
12
|
+
import { isHeaderFilled, isFooterFilled, getFooterProps, isIos } from '@micromag/core/utils';
|
|
13
13
|
import Audio from '@micromag/element-audio';
|
|
14
14
|
import Background from '@micromag/element-background';
|
|
15
|
-
import CallToAction from '@micromag/element-call-to-action';
|
|
16
15
|
import ClosedCaptions from '@micromag/element-closed-captions';
|
|
17
16
|
import Container from '@micromag/element-container';
|
|
17
|
+
import Footer from '@micromag/element-footer';
|
|
18
|
+
import Header from '@micromag/element-header';
|
|
18
19
|
import Layout, { Spacer } from '@micromag/element-layout';
|
|
19
20
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
20
21
|
import { Audio as Audio$1, Container as Container$1 } from '@micromag/transforms/apple-news';
|
|
@@ -26,7 +27,8 @@ var propTypes = {
|
|
|
26
27
|
audio: PropTypes$1.audioElement,
|
|
27
28
|
spacing: PropTypes.number,
|
|
28
29
|
background: PropTypes$1.backgroundElement,
|
|
29
|
-
|
|
30
|
+
header: PropTypes$1.header,
|
|
31
|
+
footer: PropTypes$1.footer,
|
|
30
32
|
current: PropTypes.bool,
|
|
31
33
|
active: PropTypes.bool,
|
|
32
34
|
transitions: PropTypes$1.transitions,
|
|
@@ -39,7 +41,8 @@ var defaultProps = {
|
|
|
39
41
|
audio: null,
|
|
40
42
|
spacing: 20,
|
|
41
43
|
background: null,
|
|
42
|
-
|
|
44
|
+
header: null,
|
|
45
|
+
footer: null,
|
|
43
46
|
current: true,
|
|
44
47
|
active: true,
|
|
45
48
|
transitions: null,
|
|
@@ -48,12 +51,13 @@ var defaultProps = {
|
|
|
48
51
|
className: null
|
|
49
52
|
};
|
|
50
53
|
var AudioScreen = function AudioScreen(_ref) {
|
|
51
|
-
var
|
|
54
|
+
var _ref7;
|
|
52
55
|
_ref.layout;
|
|
53
56
|
var audio = _ref.audio,
|
|
54
57
|
spacing = _ref.spacing,
|
|
55
58
|
background = _ref.background,
|
|
56
|
-
|
|
59
|
+
header = _ref.header,
|
|
60
|
+
footer = _ref.footer,
|
|
57
61
|
current = _ref.current,
|
|
58
62
|
active = _ref.active,
|
|
59
63
|
transitions = _ref.transitions,
|
|
@@ -86,30 +90,35 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
86
90
|
var mediaShouldLoad = current || active;
|
|
87
91
|
var transitionPlaying = current && ready;
|
|
88
92
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
var showHeader = isHeaderFilled(header);
|
|
94
|
+
var showFooter = isFooterFilled(footer);
|
|
95
|
+
var footerProps = getFooterProps(footer, {
|
|
96
|
+
isView: isView,
|
|
97
|
+
current: current,
|
|
98
|
+
openWebView: openWebView,
|
|
99
|
+
isPreview: isPreview
|
|
100
|
+
});
|
|
92
101
|
var hasAudio = audio !== null;
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
audioMedia =
|
|
96
|
-
|
|
97
|
-
autoPlay =
|
|
98
|
-
|
|
99
|
-
closedCaptions =
|
|
100
|
-
|
|
101
|
-
withWave =
|
|
102
|
-
|
|
103
|
-
withControls =
|
|
104
|
-
|
|
105
|
-
withSeekBar =
|
|
106
|
-
|
|
107
|
-
color =
|
|
108
|
-
|
|
109
|
-
progressColor =
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
audioUrl =
|
|
102
|
+
var _ref2 = audio || {},
|
|
103
|
+
_ref2$media = _ref2.media,
|
|
104
|
+
audioMedia = _ref2$media === void 0 ? null : _ref2$media,
|
|
105
|
+
_ref2$autoPlay = _ref2.autoPlay,
|
|
106
|
+
autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
|
|
107
|
+
_ref2$closedCaptions = _ref2.closedCaptions,
|
|
108
|
+
closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
|
|
109
|
+
_ref2$withWave = _ref2.withWave,
|
|
110
|
+
withWave = _ref2$withWave === void 0 ? false : _ref2$withWave,
|
|
111
|
+
_ref2$withControls = _ref2.withControls,
|
|
112
|
+
withControls = _ref2$withControls === void 0 ? false : _ref2$withControls,
|
|
113
|
+
_ref2$withSeekBar = _ref2.withSeekBar,
|
|
114
|
+
withSeekBar = _ref2$withSeekBar === void 0 ? false : _ref2$withSeekBar,
|
|
115
|
+
_ref2$color = _ref2.color,
|
|
116
|
+
color = _ref2$color === void 0 ? null : _ref2$color,
|
|
117
|
+
_ref2$progressColor = _ref2.progressColor,
|
|
118
|
+
progressColor = _ref2$progressColor === void 0 ? null : _ref2$progressColor;
|
|
119
|
+
var _ref3 = audioMedia || {},
|
|
120
|
+
_ref3$url = _ref3.url,
|
|
121
|
+
audioUrl = _ref3$url === void 0 ? null : _ref3$url;
|
|
113
122
|
var hasAudioUrl = audioUrl !== null;
|
|
114
123
|
var finalAudio = hasAudio ? _objectSpread(_objectSpread({}, audio), {}, {
|
|
115
124
|
autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
|
|
@@ -167,9 +176,9 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
167
176
|
setPlaying(true);
|
|
168
177
|
}
|
|
169
178
|
}, [current, autoPlay]);
|
|
170
|
-
var onTimeUpdate = useCallback(function (
|
|
171
|
-
var
|
|
172
|
-
timeStamp =
|
|
179
|
+
var onTimeUpdate = useCallback(function (_ref4) {
|
|
180
|
+
var _ref4$timeStamp = _ref4.timeStamp,
|
|
181
|
+
timeStamp = _ref4$timeStamp === void 0 ? 0 : _ref4$timeStamp;
|
|
173
182
|
setCurrentTime(timeStamp);
|
|
174
183
|
}, [setCurrentTime, setDuration, duration]);
|
|
175
184
|
var onProgressStep = useCallback(function (step) {
|
|
@@ -178,12 +187,12 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
178
187
|
var onDurationChange = useCallback(function (dur) {
|
|
179
188
|
setDuration(dur);
|
|
180
189
|
}, [setDuration]);
|
|
181
|
-
var onPlay = useCallback(function (
|
|
182
|
-
var initial =
|
|
190
|
+
var onPlay = useCallback(function (_ref5) {
|
|
191
|
+
var initial = _ref5.initial;
|
|
183
192
|
trackScreenMedia(audio, initial ? 'play' : 'resume');
|
|
184
193
|
}, [trackScreenMedia, audio]);
|
|
185
|
-
var onPause = useCallback(function (
|
|
186
|
-
var midway =
|
|
194
|
+
var onPause = useCallback(function (_ref6) {
|
|
195
|
+
var midway = _ref6.midway;
|
|
187
196
|
trackScreenMedia(audio, midway ? 'pause' : 'ended');
|
|
188
197
|
}, [trackScreenMedia, audio]);
|
|
189
198
|
var onEnded = useCallback(function () {
|
|
@@ -196,7 +205,20 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
196
205
|
trackScreenMedia(audio, 'seek');
|
|
197
206
|
}
|
|
198
207
|
}, [trackScreenMedia, audio]);
|
|
199
|
-
|
|
208
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
209
|
+
className: classNames([styles.container, (_ref7 = {}, _defineProperty(_ref7, className, className !== null), _defineProperty(_ref7, styles.placeholder, isPlaceholder), _defineProperty(_ref7, styles.isPreview, isPreview), _ref7)]),
|
|
210
|
+
"data-screen-ready": ready
|
|
211
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
212
|
+
width: width,
|
|
213
|
+
height: height,
|
|
214
|
+
className: styles.content
|
|
215
|
+
}, /*#__PURE__*/React.createElement(Layout, {
|
|
216
|
+
fullscreen: true,
|
|
217
|
+
style: !isPlaceholder ? {
|
|
218
|
+
padding: spacing,
|
|
219
|
+
paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing
|
|
220
|
+
} : null
|
|
221
|
+
}, showHeader ? /*#__PURE__*/React.createElement(Header, header) : /*#__PURE__*/React.createElement(Spacer, {
|
|
200
222
|
key: "spacer-top"
|
|
201
223
|
}), /*#__PURE__*/React.createElement(ScreenElement, {
|
|
202
224
|
key: "audio",
|
|
@@ -255,31 +277,9 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
255
277
|
className: styles.closedCaptions,
|
|
256
278
|
media: closedCaptions,
|
|
257
279
|
currentTime: currentTime
|
|
258
|
-
}) : null,
|
|
259
|
-
className: styles.callToAction
|
|
260
|
-
|
|
261
|
-
focusable: current && isView,
|
|
262
|
-
openWebView: openWebView
|
|
263
|
-
})) : null) : null].filter(function (el) {
|
|
264
|
-
return el !== null;
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
// console.log('finalAudio', finalAudio);
|
|
268
|
-
|
|
269
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
270
|
-
className: classNames([styles.container, (_ref8 = {}, _defineProperty(_ref8, className, className !== null), _defineProperty(_ref8, styles.placeholder, isPlaceholder), _defineProperty(_ref8, styles.isPreview, isPreview), _ref8)]),
|
|
271
|
-
"data-screen-ready": ready
|
|
272
|
-
}, /*#__PURE__*/React.createElement(Container, {
|
|
273
|
-
width: width,
|
|
274
|
-
height: height,
|
|
275
|
-
className: styles.content
|
|
276
|
-
}, /*#__PURE__*/React.createElement(Layout, {
|
|
277
|
-
fullscreen: true,
|
|
278
|
-
style: !isPlaceholder ? {
|
|
279
|
-
padding: spacing,
|
|
280
|
-
paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing
|
|
281
|
-
} : null
|
|
282
|
-
}, elements)), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
|
|
280
|
+
}) : null, showFooter ? /*#__PURE__*/React.createElement(Footer, Object.assign({}, footerProps, {
|
|
281
|
+
className: styles.callToAction
|
|
282
|
+
})) : null) : null)), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
|
|
283
283
|
background: background,
|
|
284
284
|
width: width,
|
|
285
285
|
height: height,
|
|
@@ -368,17 +368,25 @@ var definition = {
|
|
|
368
368
|
}]
|
|
369
369
|
})
|
|
370
370
|
}, {
|
|
371
|
-
name: '
|
|
372
|
-
type: '
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
371
|
+
name: 'header',
|
|
372
|
+
type: 'header',
|
|
373
|
+
label: defineMessage({
|
|
374
|
+
id: "rhuDxI",
|
|
375
|
+
defaultMessage: [{
|
|
376
|
+
"type": 0,
|
|
377
|
+
"value": "Header"
|
|
378
|
+
}]
|
|
379
|
+
})
|
|
379
380
|
}, {
|
|
380
|
-
name: '
|
|
381
|
-
type: '
|
|
381
|
+
name: 'footer',
|
|
382
|
+
type: 'footer',
|
|
383
|
+
label: defineMessage({
|
|
384
|
+
id: "g4nybp",
|
|
385
|
+
defaultMessage: [{
|
|
386
|
+
"type": 0,
|
|
387
|
+
"value": "Footer"
|
|
388
|
+
}]
|
|
389
|
+
})
|
|
382
390
|
}]
|
|
383
391
|
};
|
|
384
392
|
|
package/lib/index.js
CHANGED
|
@@ -16,9 +16,10 @@ var hooks = require('@micromag/core/hooks');
|
|
|
16
16
|
var utils = require('@micromag/core/utils');
|
|
17
17
|
var Audio = require('@micromag/element-audio');
|
|
18
18
|
var Background = require('@micromag/element-background');
|
|
19
|
-
var CallToAction = require('@micromag/element-call-to-action');
|
|
20
19
|
var ClosedCaptions = require('@micromag/element-closed-captions');
|
|
21
20
|
var Container = require('@micromag/element-container');
|
|
21
|
+
var Footer = require('@micromag/element-footer');
|
|
22
|
+
var Header = require('@micromag/element-header');
|
|
22
23
|
var Layout = require('@micromag/element-layout');
|
|
23
24
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
24
25
|
var appleNews = require('@micromag/transforms/apple-news');
|
|
@@ -33,9 +34,10 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
33
34
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
34
35
|
var Audio__default = /*#__PURE__*/_interopDefaultLegacy(Audio);
|
|
35
36
|
var Background__default = /*#__PURE__*/_interopDefaultLegacy(Background);
|
|
36
|
-
var CallToAction__default = /*#__PURE__*/_interopDefaultLegacy(CallToAction);
|
|
37
37
|
var ClosedCaptions__default = /*#__PURE__*/_interopDefaultLegacy(ClosedCaptions);
|
|
38
38
|
var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container);
|
|
39
|
+
var Footer__default = /*#__PURE__*/_interopDefaultLegacy(Footer);
|
|
40
|
+
var Header__default = /*#__PURE__*/_interopDefaultLegacy(Header);
|
|
39
41
|
var Layout__default = /*#__PURE__*/_interopDefaultLegacy(Layout);
|
|
40
42
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
41
43
|
|
|
@@ -46,7 +48,8 @@ var propTypes = {
|
|
|
46
48
|
audio: core.PropTypes.audioElement,
|
|
47
49
|
spacing: PropTypes__default["default"].number,
|
|
48
50
|
background: core.PropTypes.backgroundElement,
|
|
49
|
-
|
|
51
|
+
header: core.PropTypes.header,
|
|
52
|
+
footer: core.PropTypes.footer,
|
|
50
53
|
current: PropTypes__default["default"].bool,
|
|
51
54
|
active: PropTypes__default["default"].bool,
|
|
52
55
|
transitions: core.PropTypes.transitions,
|
|
@@ -59,7 +62,8 @@ var defaultProps = {
|
|
|
59
62
|
audio: null,
|
|
60
63
|
spacing: 20,
|
|
61
64
|
background: null,
|
|
62
|
-
|
|
65
|
+
header: null,
|
|
66
|
+
footer: null,
|
|
63
67
|
current: true,
|
|
64
68
|
active: true,
|
|
65
69
|
transitions: null,
|
|
@@ -68,12 +72,13 @@ var defaultProps = {
|
|
|
68
72
|
className: null
|
|
69
73
|
};
|
|
70
74
|
var AudioScreen = function AudioScreen(_ref) {
|
|
71
|
-
var
|
|
75
|
+
var _ref7;
|
|
72
76
|
_ref.layout;
|
|
73
77
|
var audio = _ref.audio,
|
|
74
78
|
spacing = _ref.spacing,
|
|
75
79
|
background = _ref.background,
|
|
76
|
-
|
|
80
|
+
header = _ref.header,
|
|
81
|
+
footer = _ref.footer,
|
|
77
82
|
current = _ref.current,
|
|
78
83
|
active = _ref.active,
|
|
79
84
|
transitions = _ref.transitions,
|
|
@@ -106,30 +111,35 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
106
111
|
var mediaShouldLoad = current || active;
|
|
107
112
|
var transitionPlaying = current && ready;
|
|
108
113
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
109
|
-
var
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
var showHeader = utils.isHeaderFilled(header);
|
|
115
|
+
var showFooter = utils.isFooterFilled(footer);
|
|
116
|
+
var footerProps = utils.getFooterProps(footer, {
|
|
117
|
+
isView: isView,
|
|
118
|
+
current: current,
|
|
119
|
+
openWebView: openWebView,
|
|
120
|
+
isPreview: isPreview
|
|
121
|
+
});
|
|
112
122
|
var hasAudio = audio !== null;
|
|
113
|
-
var
|
|
114
|
-
|
|
115
|
-
audioMedia =
|
|
116
|
-
|
|
117
|
-
autoPlay =
|
|
118
|
-
|
|
119
|
-
closedCaptions =
|
|
120
|
-
|
|
121
|
-
withWave =
|
|
122
|
-
|
|
123
|
-
withControls =
|
|
124
|
-
|
|
125
|
-
withSeekBar =
|
|
126
|
-
|
|
127
|
-
color =
|
|
128
|
-
|
|
129
|
-
progressColor =
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
audioUrl =
|
|
123
|
+
var _ref2 = audio || {},
|
|
124
|
+
_ref2$media = _ref2.media,
|
|
125
|
+
audioMedia = _ref2$media === void 0 ? null : _ref2$media,
|
|
126
|
+
_ref2$autoPlay = _ref2.autoPlay,
|
|
127
|
+
autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
|
|
128
|
+
_ref2$closedCaptions = _ref2.closedCaptions,
|
|
129
|
+
closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
|
|
130
|
+
_ref2$withWave = _ref2.withWave,
|
|
131
|
+
withWave = _ref2$withWave === void 0 ? false : _ref2$withWave,
|
|
132
|
+
_ref2$withControls = _ref2.withControls,
|
|
133
|
+
withControls = _ref2$withControls === void 0 ? false : _ref2$withControls,
|
|
134
|
+
_ref2$withSeekBar = _ref2.withSeekBar,
|
|
135
|
+
withSeekBar = _ref2$withSeekBar === void 0 ? false : _ref2$withSeekBar,
|
|
136
|
+
_ref2$color = _ref2.color,
|
|
137
|
+
color = _ref2$color === void 0 ? null : _ref2$color,
|
|
138
|
+
_ref2$progressColor = _ref2.progressColor,
|
|
139
|
+
progressColor = _ref2$progressColor === void 0 ? null : _ref2$progressColor;
|
|
140
|
+
var _ref3 = audioMedia || {},
|
|
141
|
+
_ref3$url = _ref3.url,
|
|
142
|
+
audioUrl = _ref3$url === void 0 ? null : _ref3$url;
|
|
133
143
|
var hasAudioUrl = audioUrl !== null;
|
|
134
144
|
var finalAudio = hasAudio ? _objectSpread__default["default"](_objectSpread__default["default"]({}, audio), {}, {
|
|
135
145
|
autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
|
|
@@ -187,9 +197,9 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
187
197
|
setPlaying(true);
|
|
188
198
|
}
|
|
189
199
|
}, [current, autoPlay]);
|
|
190
|
-
var onTimeUpdate = React.useCallback(function (
|
|
191
|
-
var
|
|
192
|
-
timeStamp =
|
|
200
|
+
var onTimeUpdate = React.useCallback(function (_ref4) {
|
|
201
|
+
var _ref4$timeStamp = _ref4.timeStamp,
|
|
202
|
+
timeStamp = _ref4$timeStamp === void 0 ? 0 : _ref4$timeStamp;
|
|
193
203
|
setCurrentTime(timeStamp);
|
|
194
204
|
}, [setCurrentTime, setDuration, duration]);
|
|
195
205
|
var onProgressStep = React.useCallback(function (step) {
|
|
@@ -198,12 +208,12 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
198
208
|
var onDurationChange = React.useCallback(function (dur) {
|
|
199
209
|
setDuration(dur);
|
|
200
210
|
}, [setDuration]);
|
|
201
|
-
var onPlay = React.useCallback(function (
|
|
202
|
-
var initial =
|
|
211
|
+
var onPlay = React.useCallback(function (_ref5) {
|
|
212
|
+
var initial = _ref5.initial;
|
|
203
213
|
trackScreenMedia(audio, initial ? 'play' : 'resume');
|
|
204
214
|
}, [trackScreenMedia, audio]);
|
|
205
|
-
var onPause = React.useCallback(function (
|
|
206
|
-
var midway =
|
|
215
|
+
var onPause = React.useCallback(function (_ref6) {
|
|
216
|
+
var midway = _ref6.midway;
|
|
207
217
|
trackScreenMedia(audio, midway ? 'pause' : 'ended');
|
|
208
218
|
}, [trackScreenMedia, audio]);
|
|
209
219
|
var onEnded = React.useCallback(function () {
|
|
@@ -216,7 +226,20 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
216
226
|
trackScreenMedia(audio, 'seek');
|
|
217
227
|
}
|
|
218
228
|
}, [trackScreenMedia, audio]);
|
|
219
|
-
|
|
229
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
230
|
+
className: classNames__default["default"]([styles.container, (_ref7 = {}, _defineProperty__default["default"](_ref7, className, className !== null), _defineProperty__default["default"](_ref7, styles.placeholder, isPlaceholder), _defineProperty__default["default"](_ref7, styles.isPreview, isPreview), _ref7)]),
|
|
231
|
+
"data-screen-ready": ready
|
|
232
|
+
}, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
233
|
+
width: width,
|
|
234
|
+
height: height,
|
|
235
|
+
className: styles.content
|
|
236
|
+
}, /*#__PURE__*/React__default["default"].createElement(Layout__default["default"], {
|
|
237
|
+
fullscreen: true,
|
|
238
|
+
style: !isPlaceholder ? {
|
|
239
|
+
padding: spacing,
|
|
240
|
+
paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing
|
|
241
|
+
} : null
|
|
242
|
+
}, showHeader ? /*#__PURE__*/React__default["default"].createElement(Header__default["default"], header) : /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
|
|
220
243
|
key: "spacer-top"
|
|
221
244
|
}), /*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
|
|
222
245
|
key: "audio",
|
|
@@ -275,31 +298,9 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
275
298
|
className: styles.closedCaptions,
|
|
276
299
|
media: closedCaptions,
|
|
277
300
|
currentTime: currentTime
|
|
278
|
-
}) : null,
|
|
279
|
-
className: styles.callToAction
|
|
280
|
-
|
|
281
|
-
focusable: current && isView,
|
|
282
|
-
openWebView: openWebView
|
|
283
|
-
})) : null) : null].filter(function (el) {
|
|
284
|
-
return el !== null;
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
// console.log('finalAudio', finalAudio);
|
|
288
|
-
|
|
289
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
290
|
-
className: classNames__default["default"]([styles.container, (_ref8 = {}, _defineProperty__default["default"](_ref8, className, className !== null), _defineProperty__default["default"](_ref8, styles.placeholder, isPlaceholder), _defineProperty__default["default"](_ref8, styles.isPreview, isPreview), _ref8)]),
|
|
291
|
-
"data-screen-ready": ready
|
|
292
|
-
}, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
293
|
-
width: width,
|
|
294
|
-
height: height,
|
|
295
|
-
className: styles.content
|
|
296
|
-
}, /*#__PURE__*/React__default["default"].createElement(Layout__default["default"], {
|
|
297
|
-
fullscreen: true,
|
|
298
|
-
style: !isPlaceholder ? {
|
|
299
|
-
padding: spacing,
|
|
300
|
-
paddingTop: (!isPreview ? viewerTopHeight : 0) + spacing
|
|
301
|
-
} : null
|
|
302
|
-
}, elements)), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
|
|
301
|
+
}) : null, showFooter ? /*#__PURE__*/React__default["default"].createElement(Footer__default["default"], Object.assign({}, footerProps, {
|
|
302
|
+
className: styles.callToAction
|
|
303
|
+
})) : null) : null)), !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
|
|
303
304
|
background: background,
|
|
304
305
|
width: width,
|
|
305
306
|
height: height,
|
|
@@ -388,17 +389,25 @@ var definition = {
|
|
|
388
389
|
}]
|
|
389
390
|
})
|
|
390
391
|
}, {
|
|
391
|
-
name: '
|
|
392
|
-
type: '
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
392
|
+
name: 'header',
|
|
393
|
+
type: 'header',
|
|
394
|
+
label: reactIntl.defineMessage({
|
|
395
|
+
id: "rhuDxI",
|
|
396
|
+
defaultMessage: [{
|
|
397
|
+
"type": 0,
|
|
398
|
+
"value": "Header"
|
|
399
|
+
}]
|
|
400
|
+
})
|
|
399
401
|
}, {
|
|
400
|
-
name: '
|
|
401
|
-
type: '
|
|
402
|
+
name: 'footer',
|
|
403
|
+
type: 'footer',
|
|
404
|
+
label: reactIntl.defineMessage({
|
|
405
|
+
id: "g4nybp",
|
|
406
|
+
defaultMessage: [{
|
|
407
|
+
"type": 0,
|
|
408
|
+
"value": "Footer"
|
|
409
|
+
}]
|
|
410
|
+
})
|
|
402
411
|
}]
|
|
403
412
|
};
|
|
404
413
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-audio",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.356",
|
|
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.3.
|
|
53
|
-
"@micromag/element-audio": "^0.3.
|
|
54
|
-
"@micromag/element-background": "^0.3.
|
|
55
|
-
"@micromag/element-
|
|
56
|
-
"@micromag/element-
|
|
57
|
-
"@micromag/element-
|
|
58
|
-
"@micromag/element-
|
|
59
|
-
"@micromag/element-
|
|
60
|
-
"@micromag/transforms": "^0.3.
|
|
52
|
+
"@micromag/core": "^0.3.354",
|
|
53
|
+
"@micromag/element-audio": "^0.3.354",
|
|
54
|
+
"@micromag/element-background": "^0.3.354",
|
|
55
|
+
"@micromag/element-closed-captions": "^0.3.354",
|
|
56
|
+
"@micromag/element-container": "^0.3.354",
|
|
57
|
+
"@micromag/element-footer": "^0.3.354",
|
|
58
|
+
"@micromag/element-header": "^0.3.356",
|
|
59
|
+
"@micromag/element-layout": "^0.3.354",
|
|
60
|
+
"@micromag/transforms": "^0.3.354",
|
|
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": "683c410d9fc568658e5907fb0a8fa470cb04f6eb"
|
|
71
71
|
}
|