react-native-volume-manager
Version:
React Native module which adds the ability to change the system volume on iOS and Android, listen to volume changes and supress the native volume UI to build your own volume slider or UX.
103 lines (89 loc) • 2.36 kB
JavaScript
"use strict";
/**
* Represents the mute switch status of the ring.
* @export
* @interface RingMuteSwitchStatus
* @property {boolean} isMuted - Indicates if the ring is muted.
* @property {boolean} initialQuery - Represents the initial query status.
*/
/**
* Called when there is a ring mute switch event.
* @export
* @callback
* @param {RingMuteSwitchStatus} status - The current mute switch status.
*/
/**
* Used to set the interval check.
* @export
* @callback
* @param {number} newInterval - The new interval to be set.
*/
/**
* Categories of AV Audio sessions.
* @export
*/
/**
* Modes of AV Audio sessions.
* @export
*/
/**
* Types of volume on Android.
* @export
*/
/**
* The configuration settings for setting the volume.
* @export
* @interface VolumeManagerSetVolumeConfig
* @property {boolean} playSound - Indicates whether to play a sound on volume change. Default is false.
* @property {AndroidVolumeTypes} type - Defines the type of volume to change. Only applicable to Android. Default is 'music'.
* @property {boolean} showUI - Indicates whether to show the native volume UI. Default is false.
*/
/**
* Represents the volume result.
* @export
* @interface VolumeResult
* @property {number} volume - The volume level. Both for iOS and Android. Defaults to music.
* @property {AndroidVolumeTypes} type - The type of volume. Android only.
*/
// Accepted Ringer Mode values
export const RINGER_MODE = {
silent: 0,
vibrate: 1,
normal: 2
};
/**
* Represents the ringer mode.
* @export
* @typedef {0 | 1 | 2} RingerModeType
*/
/**
* Modes for the device.
* @export
* @enum {string}
*/
export let Mode = /*#__PURE__*/function (Mode) {
Mode["SILENT"] = "SILENT";
Mode["VIBRATE"] = "VIBRATE";
Mode["NORMAL"] = "NORMAL";
Mode["MUTED"] = "MUTED";
return Mode;
}({});
/**
* Represents the silent status of the ringer.
* @export
* @interface RingerSilentStatus
* @property {boolean} status - Indicates if the ringer is silent.
* @property {Mode} mode - The current mode of the device.
*/
/**
* Called when there is a ringer event.
* @export
* @callback
* @param {RingerSilentStatus} event - The ringer event.
*/
/**
* Represents a subscription to an event that has a method to remove it.
* @export
* @interface EmitterSubscriptionNoop
*/
//# sourceMappingURL=types.js.map