Skip to content

Cordova plugin for switching between speaker and earpiece when playing audio

License

Notifications You must be signed in to change notification settings

er1cAk/cordova-plugin-audiotoggle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudioToggle

Cordova plugin for switching between speaker and earpiece when playing audio.

cordova plugin add https://github.com/neohelden/cordova-plugin-audiotoggle

Supported Platforms

  • Android
  • iOS

Usage

To set the current audio mode, use the setAudioMode method:

AudioToggle.setAudioMode(AudioToggle.SPEAKER);
// or
AudioToggle.setAudioMode(AudioToggle.EARPIECE);

Android has the following additional options:

AudioToggle.setAudioMode(AudioToggle.NORMAL);
// and
AudioToggle.setAudioMode(AudioToggle.RINGTONE);

About

Cordova plugin for switching between speaker and earpiece when playing audio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 55.0%
  • Objective-C 32.9%
  • JavaScript 12.1%