@micromag/screen-audio 0.3.487 → 0.3.491

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 CHANGED
@@ -101,6 +101,8 @@ var AudioScreen = function AudioScreen(_ref) {
101
101
  autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
102
102
  _ref2$closedCaptions = _ref2.closedCaptions,
103
103
  closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
104
+ _ref2$captions = _ref2.captions,
105
+ captions = _ref2$captions === void 0 ? null : _ref2$captions,
104
106
  _ref2$withWave = _ref2.withWave,
105
107
  withWave = _ref2$withWave === void 0 ? false : _ref2$withWave,
106
108
  _ref2$withControls = _ref2.withControls,
@@ -118,7 +120,7 @@ var AudioScreen = function AudioScreen(_ref) {
118
120
  var finalAudio = hasAudio ? _objectSpread(_objectSpread({}, audio), {}, {
119
121
  autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
120
122
  }) : null;
121
- var hasClosedCaptions = closedCaptions !== null;
123
+ var hasClosedCaptions = closedCaptions !== null || captions !== null;
122
124
  var _usePlaybackContext = usePlaybackContext(),
123
125
  playing = _usePlaybackContext.playing,
124
126
  muted = _usePlaybackContext.muted,
@@ -271,11 +273,12 @@ var AudioScreen = function AudioScreen(_ref) {
271
273
  paddingBottom: spacing / 2,
272
274
  paddingTop: 0
273
275
  }
274
- }, hasClosedCaptions && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React.createElement(ClosedCaptions, {
276
+ }, hasClosedCaptions && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React.createElement(ClosedCaptions, Object.assign({
275
277
  className: styles.closedCaptions,
276
- media: closedCaptions,
278
+ media: closedCaptions
279
+ }, captions, {
277
280
  currentTime: currentTime
278
- }) : null, hasFooter ? /*#__PURE__*/React.createElement(Footer, Object.assign({}, footerProps, {
281
+ })) : null, hasFooter ? /*#__PURE__*/React.createElement(Footer, Object.assign({}, footerProps, {
279
282
  className: styles.callToAction
280
283
  })) : null) : null)), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
281
284
  background: background,
package/lib/index.js CHANGED
@@ -105,6 +105,8 @@ var AudioScreen = function AudioScreen(_ref) {
105
105
  autoPlay = _ref2$autoPlay === void 0 ? true : _ref2$autoPlay,
106
106
  _ref2$closedCaptions = _ref2.closedCaptions,
107
107
  closedCaptions = _ref2$closedCaptions === void 0 ? null : _ref2$closedCaptions,
108
+ _ref2$captions = _ref2.captions,
109
+ captions = _ref2$captions === void 0 ? null : _ref2$captions,
108
110
  _ref2$withWave = _ref2.withWave,
109
111
  withWave = _ref2$withWave === void 0 ? false : _ref2$withWave,
110
112
  _ref2$withControls = _ref2.withControls,
@@ -122,7 +124,7 @@ var AudioScreen = function AudioScreen(_ref) {
122
124
  var finalAudio = hasAudio ? _objectSpread(_objectSpread({}, audio), {}, {
123
125
  autoPlay: !isPreview && !isStatic && !isCapture && autoPlay && current
124
126
  }) : null;
125
- var hasClosedCaptions = closedCaptions !== null;
127
+ var hasClosedCaptions = closedCaptions !== null || captions !== null;
126
128
  var _usePlaybackContext = contexts.usePlaybackContext(),
127
129
  playing = _usePlaybackContext.playing,
128
130
  muted = _usePlaybackContext.muted,
@@ -275,11 +277,12 @@ var AudioScreen = function AudioScreen(_ref) {
275
277
  paddingBottom: spacing / 2,
276
278
  paddingTop: 0
277
279
  }
278
- }, hasClosedCaptions && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React.createElement(ClosedCaptions, {
280
+ }, hasClosedCaptions && !isPreview && !isCapture && !isStatic ? /*#__PURE__*/React.createElement(ClosedCaptions, Object.assign({
279
281
  className: styles.closedCaptions,
280
- media: closedCaptions,
282
+ media: closedCaptions
283
+ }, captions, {
281
284
  currentTime: currentTime
282
- }) : null, hasFooter ? /*#__PURE__*/React.createElement(Footer, Object.assign({}, footerProps, {
285
+ })) : null, hasFooter ? /*#__PURE__*/React.createElement(Footer, Object.assign({}, footerProps, {
283
286
  className: styles.callToAction
284
287
  })) : null) : null)), !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
285
288
  background: background,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-audio",
3
- "version": "0.3.487",
3
+ "version": "0.3.491",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -61,15 +61,15 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@babel/runtime": "^7.13.10",
64
- "@micromag/core": "^0.3.487",
65
- "@micromag/element-audio": "^0.3.487",
66
- "@micromag/element-background": "^0.3.487",
67
- "@micromag/element-closed-captions": "^0.3.487",
68
- "@micromag/element-container": "^0.3.487",
69
- "@micromag/element-footer": "^0.3.487",
70
- "@micromag/element-header": "^0.3.487",
71
- "@micromag/element-layout": "^0.3.487",
72
- "@micromag/transforms": "^0.3.487",
64
+ "@micromag/core": "^0.3.491",
65
+ "@micromag/element-audio": "^0.3.491",
66
+ "@micromag/element-background": "^0.3.491",
67
+ "@micromag/element-closed-captions": "^0.3.491",
68
+ "@micromag/element-container": "^0.3.491",
69
+ "@micromag/element-footer": "^0.3.491",
70
+ "@micromag/element-header": "^0.3.491",
71
+ "@micromag/element-layout": "^0.3.491",
72
+ "@micromag/transforms": "^0.3.491",
73
73
  "classnames": "^2.2.6",
74
74
  "lodash": "^4.17.21",
75
75
  "prop-types": "^15.7.2",
@@ -80,5 +80,5 @@
80
80
  "access": "public",
81
81
  "registry": "https://registry.npmjs.org/"
82
82
  },
83
- "gitHead": "aaa0df7566c8291eca5aab8ab6c8b103152c110c"
83
+ "gitHead": "d4af8a992fad6d8d50e41e347a4b92e6e025b984"
84
84
  }