@micromag/screen-audio 0.4.69 → 0.4.71
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.d.ts +2 -1
- package/es/index.js +2 -7
- package/package.json +11 -11
package/es/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
2
3
|
import { AudioElement, BackgroundElement, Header, Footer } from '@micromag/core';
|
|
3
4
|
|
|
4
5
|
interface AudioScreenProps {
|
|
@@ -10,7 +11,7 @@ interface AudioScreenProps {
|
|
|
10
11
|
footer?: Footer | null;
|
|
11
12
|
current?: boolean;
|
|
12
13
|
preload?: boolean;
|
|
13
|
-
mediaRef?:
|
|
14
|
+
mediaRef?: ForwardedRef<HTMLMediaElement> | null;
|
|
14
15
|
showWave?: boolean;
|
|
15
16
|
className?: string | null;
|
|
16
17
|
}
|
package/es/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useState, useEffect, useCallback, useMemo } from 'react';
|
|
|
7
7
|
import { ScreenElement } from '@micromag/core/components';
|
|
8
8
|
import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
|
|
9
9
|
import { useTrackScreenMedia } from '@micromag/core/hooks';
|
|
10
|
-
import { isHeaderFilled, isFooterFilled, getFooterProps, isIos } from '@micromag/core/utils';
|
|
10
|
+
import { isHeaderFilled, isFooterFilled, getFooterProps, isIos, mergeRefs } from '@micromag/core/utils';
|
|
11
11
|
import Audio from '@micromag/element-audio';
|
|
12
12
|
import Background from '@micromag/element-background';
|
|
13
13
|
import ClosedCaptions from '@micromag/element-closed-captions';
|
|
@@ -136,11 +136,6 @@ function AudioScreen(_ref) {
|
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
}, [current, withControls, withSeekBar, setControls, color, progressColor]);
|
|
139
|
-
useEffect(function () {
|
|
140
|
-
if (customMediaRef !== null) {
|
|
141
|
-
customMediaRef(mediaRef.current);
|
|
142
|
-
}
|
|
143
|
-
}, [mediaRef.current]);
|
|
144
139
|
var onAudioReady = useCallback(function () {
|
|
145
140
|
setReady(true);
|
|
146
141
|
}, [setReady]);
|
|
@@ -222,7 +217,7 @@ function AudioScreen(_ref) {
|
|
|
222
217
|
emptyClassName: styles.empty,
|
|
223
218
|
isEmpty: !hasAudioUrl,
|
|
224
219
|
children: /*#__PURE__*/jsx(Audio, _objectSpread(_objectSpread({}, finalAudio), {}, {
|
|
225
|
-
mediaRef: mediaRef,
|
|
220
|
+
mediaRef: mergeRefs(mediaRef, customMediaRef),
|
|
226
221
|
waveFake: isIOS || isPreview,
|
|
227
222
|
waveProps: isPreview ? {
|
|
228
223
|
sampleWidth: 10,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-audio",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.71",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@babel/runtime": "^7.28.6",
|
|
64
|
-
"@micromag/core": "^0.4.
|
|
65
|
-
"@micromag/element-audio": "^0.4.
|
|
66
|
-
"@micromag/element-background": "^0.4.
|
|
67
|
-
"@micromag/element-closed-captions": "^0.4.
|
|
68
|
-
"@micromag/element-container": "^0.4.
|
|
69
|
-
"@micromag/element-footer": "^0.4.
|
|
70
|
-
"@micromag/element-header": "^0.4.
|
|
71
|
-
"@micromag/element-layout": "^0.4.
|
|
72
|
-
"@micromag/transforms": "^0.4.
|
|
64
|
+
"@micromag/core": "^0.4.71",
|
|
65
|
+
"@micromag/element-audio": "^0.4.71",
|
|
66
|
+
"@micromag/element-background": "^0.4.71",
|
|
67
|
+
"@micromag/element-closed-captions": "^0.4.71",
|
|
68
|
+
"@micromag/element-container": "^0.4.71",
|
|
69
|
+
"@micromag/element-footer": "^0.4.71",
|
|
70
|
+
"@micromag/element-header": "^0.4.71",
|
|
71
|
+
"@micromag/element-layout": "^0.4.71",
|
|
72
|
+
"@micromag/transforms": "^0.4.71",
|
|
73
73
|
"classnames": "^2.2.6",
|
|
74
74
|
"lodash": "^4.17.23",
|
|
75
75
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
"access": "public",
|
|
80
80
|
"registry": "https://registry.npmjs.org/"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "9101554bc5761e32b4a002a10d26800608c69773",
|
|
83
83
|
"types": "es/index.d.ts"
|
|
84
84
|
}
|