1.0.1 • Published 4 years ago

cordova-plugin-play-default-sounds v1.0.1

Weekly downloads
38
License
MIT
Repository
github
Last release
4 years ago

PlayDefaultSounds

A Cordova plugin to play default system Sounds (Android and iOS)

Installation

    $ cordova plugin add cordova-plugin-play-default-sounds

Usage

The Plugin is accessible via a global window.PlayDefaultSounds Variable or the build in Ionic Wrapper:

import PlayDefaultSounds from 'cordova-plugin-play-default-sounds';

Api

play

Variables

  • code (optional, but needed for ios (See Overview here))

This function plays the default Notification Sound for Android. For iOS the Code is used.

// Android:
PlayDefaultSounds.play();

// iOS
PlayDefaultSounds.play(1003);

Troubles?

If you have any Problems or need help, feel free to open an Issue!