d3ro-voice/apps/mobile-rn/__mocks__/react-native-nitro-sound.js
2026-08-29 18:33:45 +09:00

20 lines
552 B
JavaScript

'use strict';
const nativeOnly = async () => {
throw new Error('Nitro Sound is unavailable in the Jest runtime');
};
module.exports = {
AudioEncoderAndroidType: { AAC: 3 },
AudioSourceAndroidType: { MIC: 1 },
AVEncoderAudioQualityIOSType: { high: 96 },
OutputFormatAndroidType: { MPEG_4: 2 },
createSound: () => ({
addRecordBackListener: () => undefined,
pauseRecorder: nativeOnly,
resumeRecorder: nativeOnly,
setSubscriptionDuration: () => undefined,
startRecorder: nativeOnly,
stopRecorder: nativeOnly,
}),
};