shi11 / RemoteControls

cordova 3 plugin for interacting with ios7 remote controls and metadata
57 stars 41 forks source link

Ability clear media info #8

Closed bionik closed 8 years ago

bionik commented 9 years ago

Is there a way to clear media info on lockscreen?

Something like window.remoteControls.clearMetas()

shi11 commented 9 years ago

There's isn't a specific function like clearMetas() at the moment, Lauri. What may work as a temp fix, is to use updateMetas() and pass empty strings.

Feel free to add clearMetas() and do a pull request ;)

alisonmonteiro commented 8 years ago

@shi11 I'll try to add the clearMetas().

But now I'm trying to do something like this but nothing works. Any idea?

shi11 commented 8 years ago

@alisonmonteiro there isn't but what is it you're trying to do? toggle play/pause? I think this should happen automatically if you're using the Media plugin.

alisonmonteiro commented 8 years ago

@shi11 Thank you for the super quick response.

I'm using an iPhone 6 with iOS 9.2 and it's doesn't happen automatically. :/ Objective C is so hard but I've forked this repo and try a lot of thinks. :muscle:

Now I think this works great. Take a look at this file.

shi11 commented 8 years ago

Yeah honestly I'm not an Obj-C expert either. Glad you figured it out.