3

I am creating a multimedia iOS/Android app using Cordova and would like have control over the application (previous, next, play/pause controls) when screen is locked.

Does someone know if there is a Cordova plugin allowing to do this or will I have to implement a plugin for each targeted platform ?

Thanks !

user3832053
  • 426
  • 4
  • 4

1 Answers1

2

This plugin looks like what you're looking for: https://github.com/shi11/RemoteControls

Installing via CLI: $ cordova plugin add https://github.com/shi11/RemoteControls.git

function onDeviceReady() {
  var RemoteControls = window.plugins.RemoteControls;
  artist = "Daft Punk";
  title = "One More Time";
  album = "Discovery";
  RemoteControls.updateMetas(artist,title,station);
}
CharliePrynn
  • 3,034
  • 5
  • 40
  • 68