@exode-team/react-recorder 1.1.3 → 1.1.7
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/dist/components/AudioRecorder.d.ts +2 -3
- package/dist/components/AudioRecorder.d.ts.map +1 -1
- package/dist/components/VoiceRecorderInput/VoiceRecorderInput.d.ts +1 -2
- package/dist/components/VoiceRecorderInput/VoiceRecorderInput.d.ts.map +1 -1
- package/dist/components/VoiceRecorderInput/VoiceRecorderInput.styled.d.ts.map +1 -1
- package/dist/hooks/useRecordingSender.d.ts +1 -2
- package/dist/hooks/useRecordingSender.d.ts.map +1 -1
- package/dist/hooks/useVoiceRecorder.d.ts.map +1 -1
- package/dist/hooks/useVoiceRecorderInput.d.ts +1 -2
- package/dist/hooks/useVoiceRecorderInput.d.ts.map +1 -1
- package/dist/index.cjs +13 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -30
- package/dist/index.js.map +1 -1
- package/dist/platform/audio-blob-fetcher.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/recorder.d.ts +1 -2
- package/dist/types/recorder.d.ts.map +1 -1
- package/dist/types/upload.d.ts +0 -7
- package/dist/types/upload.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
6
6
|
import { type RecorderMessagesInput } from './AudioRecorder.messages';
|
|
7
|
-
import { type StorageFileEntity, type
|
|
8
|
-
type RecorderOptionOverrides = Omit<UseVoiceRecorderOptions<Partial<StorageFileEntity>>, '
|
|
7
|
+
import { type StorageFileEntity, type UploadStrategy, type UseVoiceRecorderOptions } from '../types';
|
|
8
|
+
type RecorderOptionOverrides = Omit<UseVoiceRecorderOptions<Partial<StorageFileEntity>>, 'uploadId' | 'onUploaded' | 'uploader'>;
|
|
9
9
|
interface Props extends Partial<RecorderOptionOverrides> {
|
|
10
10
|
uploader: UploadStrategy<Partial<StorageFileEntity>>;
|
|
11
11
|
messages?: RecorderMessagesInput;
|
|
12
12
|
uploadId?: string;
|
|
13
13
|
className?: string;
|
|
14
|
-
space?: StorageSpace;
|
|
15
14
|
onUploadError?: (error: unknown) => void;
|
|
16
15
|
onUploaded?: (file: Partial<StorageFileEntity>) => void | Promise<void>;
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioRecorder.d.ts","sourceRoot":"","sources":["../../src/components/AudioRecorder.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAiB,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAErF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,
|
|
1
|
+
{"version":3,"file":"AudioRecorder.d.ts","sourceRoot":"","sources":["../../src/components/AudioRecorder.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EAAiB,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAErF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC/B,MAAM,UAAU,CAAC;AAGlB,KAAK,uBAAuB,GAAG,IAAI,CAC/B,uBAAuB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,EACnD,UAAU,GAAG,YAAY,GAAG,UAAU,CACzC,CAAC;AAEF,UAAU,KAAM,SAAQ,OAAO,CAAC,uBAAuB,CAAC;IACpD,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3E;AAGD,QAAA,MAAM,aAAa,GAAI,OAAO,KAAK,QAsHlC,CAAC;AAGF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import type { UploadStrategy } from '../../types';
|
|
7
7
|
interface Props {
|
|
8
8
|
uploader?: UploadStrategy<unknown>;
|
|
9
9
|
onUploaded?: (file: unknown) => void | Promise<void>;
|
|
@@ -14,7 +14,6 @@ interface Props {
|
|
|
14
14
|
autoStart?: boolean;
|
|
15
15
|
mimeType?: string;
|
|
16
16
|
fileName?: string;
|
|
17
|
-
space?: StorageSpace;
|
|
18
17
|
className?: string;
|
|
19
18
|
}
|
|
20
19
|
declare const VoiceRecorderInput: (props: Props) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceRecorderInput.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceRecorderInput/VoiceRecorderInput.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,
|
|
1
|
+
{"version":3,"file":"VoiceRecorderInput.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceRecorderInput/VoiceRecorderInput.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAuBlD,UAAU,KAAK;IACX,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,QAAA,MAAM,kBAAkB,GAAI,OAAO,KAAK,QAmIvC,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VoiceRecorderInput.styled.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceRecorderInput/VoiceRecorderInput.styled.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,OAAO,KAOnB,CAAC;AAEF,eAAO,MAAM,YAAY,KAcxB,CAAC;AAEF,eAAO,MAAM,WAAW,KASvB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,UAAU,KAMtB,CAAC;AAEF,eAAO,MAAM,UAAU,KA0BtB,CAAC;AAEF,eAAO,MAAM,YAAY,KAUxB,CAAC;AAEF,eAAO,MAAM,KAAK,KAMjB,CAAC;AAEF,eAAO,MAAM,UAAU,KAuBtB,CAAC;AAEF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"VoiceRecorderInput.styled.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceRecorderInput/VoiceRecorderInput.styled.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,OAAO,KAOnB,CAAC;AAEF,eAAO,MAAM,YAAY,KAcxB,CAAC;AAEF,eAAO,MAAM,WAAW,KASvB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,UAAU,KAMtB,CAAC;AAEF,eAAO,MAAM,UAAU,KA0BtB,CAAC;AAEF,eAAO,MAAM,YAAY,KAUxB,CAAC;AAEF,eAAO,MAAM,KAAK,KAMjB,CAAC;AAEF,eAAO,MAAM,UAAU,KAuBtB,CAAC;AAEF,eAAO,MAAM,YAAY,KAiBxB,CAAC;AAEF,eAAO,MAAM,eAAe,KAqB3B,CAAC;AAEF,eAAO,MAAM,WAAW,KAcvB,CAAC"}
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { UploadStrategy } from '../types';
|
|
7
7
|
interface UseRecordingSenderOptions<TFile> {
|
|
8
8
|
fileName: string;
|
|
9
9
|
mimeType: string;
|
|
10
10
|
audioBlob: Blob | null;
|
|
11
|
-
space: StorageSpace;
|
|
12
11
|
uploadId: string;
|
|
13
12
|
uploader?: UploadStrategy<TFile>;
|
|
14
13
|
onUploaded: (file: TFile) => void | Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRecordingSender.d.ts","sourceRoot":"","sources":["../../src/hooks/useRecordingSender.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useRecordingSender.d.ts","sourceRoot":"","sources":["../../src/hooks/useRecordingSender.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,UAAU,yBAAyB,CAAC,KAAK;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IACjC,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAGD,QAAA,MAAM,kBAAkB,GAAI,KAAK,GAAG,OAAO,EAAE,SAAS,yBAAyB,CAAC,KAAK,CAAC;;CA0DrF,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGhF,iBAAS,gBAAgB,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGhF,iBAAS,gBAAgB,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,GAAG,sBAAsB,CAuMxG;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import type { UploadStrategy } from '../types';
|
|
7
7
|
interface UseVoiceRecorderInputOptions {
|
|
8
8
|
uploader?: UploadStrategy<unknown>;
|
|
9
9
|
onUploaded?: (file: unknown) => void | Promise<void>;
|
|
@@ -14,7 +14,6 @@ interface UseVoiceRecorderInputOptions {
|
|
|
14
14
|
autoStart?: boolean;
|
|
15
15
|
mimeType?: string;
|
|
16
16
|
fileName?: string;
|
|
17
|
-
space?: StorageSpace;
|
|
18
17
|
}
|
|
19
18
|
declare const useVoiceRecorderInput: (options: UseVoiceRecorderInputOptions) => {
|
|
20
19
|
recorder: import("../types").UseVoiceRecorderResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceRecorderInput.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceRecorderInput.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,
|
|
1
|
+
{"version":3,"file":"useVoiceRecorderInput.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceRecorderInput.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,UAAU,4BAA4B;IAClC,QAAQ,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,QAAA,MAAM,qBAAqB,GAAI,SAAS,4BAA4B;;;;;;;;;;CA6MnE,CAAC;AAGF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -180,7 +180,11 @@ const decodeAudioLevels = async (blob, barCount = AUDIO_LEVEL_BARS) => {
|
|
|
180
180
|
* @author: exode <hello@exode.ru>
|
|
181
181
|
*/
|
|
182
182
|
const fetchAudioBlob = async (url, signal) => {
|
|
183
|
-
const response = await fetch(url, {
|
|
183
|
+
const response = await fetch(url, {
|
|
184
|
+
signal,
|
|
185
|
+
mode: 'cors',
|
|
186
|
+
credentials: 'omit',
|
|
187
|
+
});
|
|
184
188
|
return response.blob();
|
|
185
189
|
};
|
|
186
190
|
|
|
@@ -587,7 +591,7 @@ const useRecorderVisualization = () => {
|
|
|
587
591
|
* @author: exode <hello@exode.ru>
|
|
588
592
|
*/
|
|
589
593
|
const useRecordingSender = (options) => {
|
|
590
|
-
const {
|
|
594
|
+
const { uploader, fileName, mimeType, uploadId, audioBlob, onUploaded, onRecordingError, deleteRecording, autoResetAfterUpload, } = options;
|
|
591
595
|
const sendRecording = React.useCallback(async () => {
|
|
592
596
|
if (!audioBlob) {
|
|
593
597
|
const error = new Error('Voice recording is not available');
|
|
@@ -603,7 +607,7 @@ const useRecordingSender = (options) => {
|
|
|
603
607
|
const file = new File([audioBlob], fileName, {
|
|
604
608
|
type: audioBlob.type || mimeType,
|
|
605
609
|
});
|
|
606
|
-
const uploaded = await uploader(file, {
|
|
610
|
+
const uploaded = await uploader(file, { uploadId });
|
|
607
611
|
await onUploaded(uploaded);
|
|
608
612
|
if (autoResetAfterUpload) {
|
|
609
613
|
deleteRecording();
|
|
@@ -614,7 +618,6 @@ const useRecordingSender = (options) => {
|
|
|
614
618
|
throw error;
|
|
615
619
|
}
|
|
616
620
|
}, [
|
|
617
|
-
space,
|
|
618
621
|
uploadId,
|
|
619
622
|
uploader,
|
|
620
623
|
fileName,
|
|
@@ -634,7 +637,7 @@ const useRecordingSender = (options) => {
|
|
|
634
637
|
* @author: exode <hello@exode.ru>
|
|
635
638
|
*/
|
|
636
639
|
function useVoiceRecorder(props) {
|
|
637
|
-
const {
|
|
640
|
+
const { uploadId, uploader, onUploaded, onRecordingStop, onRecordingStart, onRecordingError, onRecordingDelete, onPermissionDenied, fileName = 'record.webm', mimeType = 'audio/webm', autoResetAfterUpload = true, } = props;
|
|
638
641
|
const [audioBlob, setAudioBlob] = React.useState(null);
|
|
639
642
|
const { audioURL, isPlaying, mountBlob, playbackTime, stopPlayback, resetPlayback, togglePlayback: _togglePlayback, playbackDuration, } = useAudioPlayback();
|
|
640
643
|
const { audioLevels, previewLevels, resetAudioLevels, stopVisualization, resetPreviewLevels, resumeVisualization, cleanupVisualization, generatePreviewLevels, initializeVisualization, } = useRecorderVisualization();
|
|
@@ -664,7 +667,6 @@ function useVoiceRecorder(props) {
|
|
|
664
667
|
audioBlob,
|
|
665
668
|
fileName,
|
|
666
669
|
mimeType,
|
|
667
|
-
space,
|
|
668
670
|
uploadId,
|
|
669
671
|
uploader,
|
|
670
672
|
autoResetAfterUpload,
|
|
@@ -1321,7 +1323,7 @@ const CircleButton = styled.button `
|
|
|
1321
1323
|
cursor: pointer;
|
|
1322
1324
|
transition: transform 160ms ease, color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
|
|
1323
1325
|
flex-shrink: 0;
|
|
1324
|
-
background:
|
|
1326
|
+
background: var(--background_content, #ffffff);
|
|
1325
1327
|
|
|
1326
1328
|
color: ${({ $variant }) => {
|
|
1327
1329
|
if ($variant === 'record') {
|
|
@@ -1538,24 +1540,12 @@ const mergeMessages = (custom) => {
|
|
|
1538
1540
|
};
|
|
1539
1541
|
};
|
|
1540
1542
|
|
|
1541
|
-
/**
|
|
1542
|
-
* Upload types
|
|
1543
|
-
*
|
|
1544
|
-
* @author: exode <hello@exode.ru>
|
|
1545
|
-
*/
|
|
1546
|
-
const StorageSpaceEnum = {
|
|
1547
|
-
User: 'user',
|
|
1548
|
-
Shared: 'shared',
|
|
1549
|
-
System: 'system',
|
|
1550
|
-
};
|
|
1551
|
-
|
|
1552
1543
|
const AudioRecorder = (props) => {
|
|
1553
|
-
const {
|
|
1544
|
+
const { fileName, uploadId, mimeType, className, uploader, onUploaded, onUploadError, onRecordingStop, onRecordingError, onRecordingStart, onRecordingDelete, onPermissionDenied, autoResetAfterUpload, messages: customMessages, } = props;
|
|
1554
1545
|
const messages = React.useMemo(() => mergeMessages(customMessages), [customMessages]);
|
|
1555
1546
|
const [resolvedUploadId] = React.useState(() => uploadId !== null && uploadId !== void 0 ? uploadId : (typeof crypto !== 'undefined' && 'randomUUID' in crypto
|
|
1556
1547
|
? crypto.randomUUID()
|
|
1557
1548
|
: `upload-${Date.now()}`));
|
|
1558
|
-
const resolvedSpace = space !== null && space !== void 0 ? space : StorageSpaceEnum.User;
|
|
1559
1549
|
const handleRecorderError = React.useCallback((error) => {
|
|
1560
1550
|
onRecordingError === null || onRecordingError === void 0 ? void 0 : onRecordingError(error);
|
|
1561
1551
|
onUploadError === null || onUploadError === void 0 ? void 0 : onUploadError(error);
|
|
@@ -1573,7 +1563,6 @@ const AudioRecorder = (props) => {
|
|
|
1573
1563
|
onRecordingDelete,
|
|
1574
1564
|
onPermissionDenied,
|
|
1575
1565
|
autoResetAfterUpload,
|
|
1576
|
-
space: resolvedSpace,
|
|
1577
1566
|
uploader,
|
|
1578
1567
|
uploadId: resolvedUploadId,
|
|
1579
1568
|
onRecordingError: handleRecorderError,
|
|
@@ -1596,7 +1585,7 @@ const AudioRecorder = (props) => {
|
|
|
1596
1585
|
* @author: exode <hello@exode.ru>
|
|
1597
1586
|
*/
|
|
1598
1587
|
const useVoiceRecorderInput = (options) => {
|
|
1599
|
-
const { onSend, onError, onCancel, uploader, onUploaded, onPermissionDenied, autoStart = true,
|
|
1588
|
+
const { onSend, onError, onCancel, uploader, onUploaded, onPermissionDenied, autoStart = true, mimeType = 'audio/webm', fileName = 'voice-message.webm', } = options;
|
|
1600
1589
|
const [isSending, setIsSending] = React.useState(false);
|
|
1601
1590
|
const [timelineLevels, setTimelineLevels] = React.useState([]);
|
|
1602
1591
|
const audioBlobRef = React.useRef(null);
|
|
@@ -1617,7 +1606,6 @@ const useVoiceRecorderInput = (options) => {
|
|
|
1617
1606
|
}
|
|
1618
1607
|
}, []);
|
|
1619
1608
|
const recorder = useVoiceRecorder({
|
|
1620
|
-
space,
|
|
1621
1609
|
fileName,
|
|
1622
1610
|
mimeType,
|
|
1623
1611
|
uploadId,
|
|
@@ -1944,14 +1932,10 @@ const MicIndicator = styled.button `
|
|
|
1944
1932
|
border: 0;
|
|
1945
1933
|
flex-shrink: 0;
|
|
1946
1934
|
cursor: pointer;
|
|
1947
|
-
background:
|
|
1948
|
-
color: var(--
|
|
1935
|
+
background: var(--background_content, #ffffff);
|
|
1936
|
+
color: color-mix(in srgb, var(--accent, #3f8ae0) 86%, white 14%);
|
|
1949
1937
|
transition: background-color 140ms ease, transform 120ms ease;
|
|
1950
1938
|
|
|
1951
|
-
&:hover {
|
|
1952
|
-
background: color-mix(in srgb, var(--exode_red, #ed1c24) 22%, transparent);
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
1939
|
&:active {
|
|
1956
1940
|
transform: scale(0.94);
|
|
1957
1941
|
}
|
|
@@ -2316,7 +2300,6 @@ const VoiceBlobCache = new VoiceBlobCacheClass();
|
|
|
2316
2300
|
|
|
2317
2301
|
exports.AUDIO_LEVEL_BARS = AUDIO_LEVEL_BARS;
|
|
2318
2302
|
exports.AudioRecorder = AudioRecorder;
|
|
2319
|
-
exports.StorageSpaceEnum = StorageSpaceEnum;
|
|
2320
2303
|
exports.VoiceBlobCache = VoiceBlobCache;
|
|
2321
2304
|
exports.VoiceMessagePlayer = VoiceMessagePlayer;
|
|
2322
2305
|
exports.VoicePlaybackChain = VoicePlaybackChain;
|