UNPKG

react-native-audio-api

Version:

react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification

31 lines (30 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; const mockAsync = value => () => Promise.resolve(value); const mockSync = value => () => value; class AudioManager { getDevicePreferredSampleRate = mockSync(44100); setAudioSessionActivity = mockAsync(undefined); setAudioSessionOptions = mockSync({}); disableSessionManagement = mockSync({}); observeAudioInterruptions = mockSync(true); activelyReclaimSession = mockSync({}); observeVolumeChanges = mockSync({}); addSystemEventListener = mockSync(undefined); requestRecordingPermissions = mockAsync('Granted'); checkRecordingPermissions = mockAsync('Granted'); requestNotificationPermissions = mockAsync('Granted'); checkNotificationPermissions = mockAsync('Granted'); setInputDevice = mockAsync(undefined); getDevicesInfo = mockAsync({ availableInputs: [], availableOutputs: [], currentInputs: [], currentOutputs: [] }); } var _default = exports.default = new AudioManager(); //# sourceMappingURL=AudioManager.js.map