react-native-audio-api
Version:
react-native-audio-api provides system for controlling audio in React Native environment compatible with Web Audio API specification
38 lines • 1.48 kB
TypeScript
export type IOSCategory = 'record' | 'ambient' | 'playback' | 'multiRoute' | 'soloAmbient' | 'playAndRecord';
export type IOSMode = 'default' | 'gameChat' | 'videoChat' | 'voiceChat' | 'measurement' | 'voicePrompt' | 'spokenAudio' | 'moviePlayback' | 'videoRecording';
export type IOSOption = 'duckOthers' | 'allowAirPlay' | 'mixWithOthers' | 'allowBluetooth' | 'defaultToSpeaker' | 'allowBluetoothA2DP' | 'overrideMutedMicrophoneInterruption' | 'interruptSpokenAudioAndMixWithOthers';
export interface SessionOptions {
iosMode?: IOSMode;
iosOptions?: IOSOption[];
iosCategory?: IOSCategory;
iosAllowHaptics?: boolean;
}
export type MediaState = 'state_playing' | 'state_paused';
interface BaseLockScreenInfo {
[key: string]: string | boolean | number | undefined;
}
export interface LockScreenInfo extends BaseLockScreenInfo {
title?: string;
artwork?: string;
artist?: string;
album?: string;
duration?: number;
description?: string;
state?: MediaState;
speed?: number;
elapsedTime?: number;
}
export type PermissionStatus = 'Undetermined' | 'Denied' | 'Granted';
export interface AudioDeviceInfo {
name: string;
category: string;
}
export type AudioDeviceList = AudioDeviceInfo[];
export interface AudioDevicesInfo {
availableInputs: AudioDeviceList;
availableOutputs: AudioDeviceList;
currentInputs: AudioDeviceList;
currentOutputs: AudioDeviceList;
}
export {};
//# sourceMappingURL=types.d.ts.map