@gemedico/react-native-sounds

1.0.2 • Public • Published

React-Native Sounds

An very lite module to play system sounds and beep for react-native apps (no sound files)

NPM Version NPM Downloads

Installation

This is a Node.js module available through the npm registry.

$ npm install @gemedico/react-native-sounds

Mostly automatic installation

$ react-native link @gemedico/react-native-sounds

IOS

$ cd ios
$ pod install

Usage

import RNSounds from '@gemedico/react-native-sounds';

Examples:

<Button onPress={ () => {RNSounds.beep()} } title="Beep Success"></Button>
<Button onPress={ () => {RNSounds.beep(false)} } title="Beep Fail"></Button>
<Button onPress={ () => {RNSounds.PlaySysSound(RNSounds.AndroidSoundIDs.TONE_CDMA_ABBR_ALERT)} } title="Beep Android Custom"></Button>
<Button onPress={ () => {RNSounds.PlaySysSound(41)} } title="Beep Something"></Button>
<Button onPress={ () => {RNSounds.PlaySysSound(RNSounds.iOSSoundIDs.AudioToneBusy)} } title="Beep iOS Custom"></Button>

License

MIT

/@gemedico/react-native-sounds/

    Package Sidebar

    Install

    npm i @gemedico/react-native-sounds

    Weekly Downloads

    5

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    24.7 kB

    Total Files

    14

    Last publish

    Collaborators

    • nimpla