ChoiZ / NowPlaying

PhoneGap / Cordova iOS plugin that allows you to add metadatas in NowPlayingInfoCenter (MPNowPlayingInfoCenter) to your app [Discontinued]
10 stars 5 forks source link

Example code doesn't work on iOS 7 #3

Closed gauthierm closed 10 years ago

gauthierm commented 10 years ago

In iOS 7 (and possibly older versions) setting the now playing data doesn't work unless audio is playing. In my app, I used the HTML5 'playing' event to know when to set the meta data.

audio.addEventListener('playing', function() {
    NowPlaying.updateMetas('artist', 'title', 'album');
}, false);