You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-10 22:11:50 +02:00
This commit is contained in:
@@ -14,7 +14,7 @@ import { Text } from 'react-native-paper';
|
||||
import { AndroidAudioEncoder, AndroidOutputFormat, IOSAudioQuality, IOSOutputFormat, RecordingOptions } from 'expo-av/build/Audio';
|
||||
import time from '@joplin/lib/time';
|
||||
import { toFileExtension } from '@joplin/lib/mime-utils';
|
||||
import { formatMsToDurationCompat } from '@joplin/utils/time';
|
||||
import { formatMsToDurationCompat, msleep } from '@joplin/utils/time';
|
||||
|
||||
const logger = Logger.create('AudioRecording');
|
||||
|
||||
@@ -119,6 +119,11 @@ const useAudioRecorder = (onFileSaved: OnFileSavedCallback, onDismiss: ()=> void
|
||||
if (!response.granted) {
|
||||
throw new Error(_('Missing permission to record audio.'));
|
||||
}
|
||||
|
||||
// Work around "This experience is currently in the background, so the audio session could not be activated"
|
||||
// See https://github.com/expo/expo/issues/21782
|
||||
// May be resolved by migrating to expo-audio.
|
||||
await msleep(500);
|
||||
}
|
||||
|
||||
await Audio.setAudioModeAsync({
|
||||
|
Reference in New Issue
Block a user