react-native icon indicating copy to clipboard operation
react-native copied to clipboard

accessing system sound API

Open missingtrailingcomma opened this issue 10 years ago • 3 comments

I am working on an alarm clock app. I want the device to vibrate and play sound when the time is up. The Vibration/VibrationIOS API is officially available. However I could not find an API for accessing system sound, for example, the ringtone when a call comes in, or the default alarm sound. I do find a few package that can play sound file, but what I want is just a few system default sound clips that I can specify the names, maybe just like the sound property in aps in PushNotificationIOS (I apologize if I misuse this API as an example, I haven't used it yet, just scan through the docs)?

If there isn't a way right now, will this be part of official APIs in the future, or it's not on the plan?

missingtrailingcomma avatar Aug 04 '16 14:08 missingtrailingcomma

https://react.parts/native?search=sound

jacobp100 avatar Aug 04 '16 15:08 jacobp100

You should write your own sound module or look for an existing one e.g. where jacobp100 suggested.

ide avatar Aug 04 '16 18:08 ide

Useless comments ever.

MaximSysoev avatar Feb 14 '18 04:02 MaximSysoev