Skip to content

EternallLight/cordova-plugin-system-sound-services

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova System Sound Plugin

This is a simple plugin to play sound for iOS. The main motivation for creating this plugin is to play DTMF feedback sound while using https://github.com/BasqueVoIPMafia/cordova-plugin-iosrtc. The dtmfSender interface in cordova-plugin-iosrtc does not give the users audio feedback. Other plugins out there does not take consideration of a voip call in session and end up taking over the audio.

Installation

In your root Cordova project

$ cordova plugin add cordova-plugin-system-sound-services

Make sure you have your-sound-file.wav imported to the ios target as a part of your build process so it exists when you run build ios command.

Usage

Somewhere after/before running your DTMF function

window.SystemSound.playSound('your-sound-file.wav');

If you sound is not located in the root of the xcode project

window.SystemSound.playSound('your-sound-file.wav', 'path/to/folder/with/sounds');

About

Play sounds through system sound services

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 85.1%
  • JavaScript 14.9%