Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 545 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 545 Bytes

cordova-plugin-audiofocus

AudioFocus is a Cordova plugin for Android platform that allows requesting of audio focus.

Android uses audio focus to moderate audio playback—only apps that hold the audio focus should play audio.

Installation

Using Cordova/Ionic

$ cordova plugin add https://github.com/Bustanity/cordova-plugin-audiofocus.git

Usage

window.audioFocus.requestFocus(function() {
    // succeeded to gain focus
}, function() {
    // failed to gain focus
});

License

Apache License, Version 2.0