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

49 lines (44 loc) 1.48 kB
"use strict"; import { AudioEventEmitter } from "../../events/index.js"; class RecordingNotificationManager { constructor() { this.audioEventEmitter = new AudioEventEmitter(globalThis.AudioEventEmitter); } /** * Show the notification with metadata or update if already visible. * * @param info - The info to be displayed. * @returns Promise that resolves after creating notification. */ // eslint-disable-next-line @typescript-eslint/require-await async show(_info) { console.warn('RecordingNotificationManager is not implemented on iOS. Any calls to it will be no-ops.'); } /** * Hide the notification. * * @returns Promise that resolves after hiding notification. */ async hide() {} /** * Check if the notification is currently active. * * @returns Promise that resolves to whether notification is active. */ // eslint-disable-next-line @typescript-eslint/require-await async isActive() { return false; } /** * Add an event listener for notification actions. * * @param eventName - The event name to listen for. * @param callback - The callback to invoke on event. * @returns Promise that resolves to whether notification is active. */ addEventListener(eventName, callback) { return this.audioEventEmitter.addAudioEventListener(eventName, callback); } } export default new RecordingNotificationManager(); //# sourceMappingURL=RecordingNotificationManager.ios.js.map