This plugin listens for MEDIA_BUTTON events and sends it to javascript
- cordova.plugins.MediaButtons.startActionMedia()
- cordova.plugins.MediaButtons.stopActionMedia()
Start the media session to listen to MEDIA_BUTTON events Every action sends to the action button event in the DOM document
cordova.plugins.MediaButtons.startActionMedia();
document.addEventListener('actionbutton', () => {
// code here
});
Stop listening to MEDIA_BUTTON events