title: Overriding MPNowPlayingInfoCenter while using WKWebView
body: <p>I am trying to create a multi-source music player with tracks coming from YouTube and Soundcloud, and I would like to override the content of MPNowPlayingInfoCenter to provide informations about the artists/releases instead of the name of the YouTube video.</p>
  
  <p>Everything worked well when I used UIWebview, but for performance reasons, I had to switch to the new WKWebview and now the method I used before to set the nowPlayingInfos has no effect</p>
  
  <p>Is there a way to disable the automatic mapping of the <code>&lt;audio&gt;</code> and <code>&lt;video&gt;</code> tags inside the HTML and/or to override the infos it provides with my infos?</p>
  
  <p>Here's the code that I use which works on iOS 7 and worked on iOS 8 when I used UIWebview: </p>
  
  <pre><code>let newInfos = [
              MPMediaItemPropertyTitle: (currentPlaylist[currentPlaylistIndex] as! Track).trackName,
              MPMediaItemPropertyArtist: (currentPlaylist[currentPlaylistIndex] as! Track).trackArtist,
              MPMediaItemPropertyPlaybackDuration: NSNumber(integer: self.getDuration()),
              MPNowPlayingInfoPropertyElapsedPlaybackTime: NSNumber(integer: self.getCurrentTime()),
              MPNowPlayingInfoPropertyPlaybackRate: NSNumber(double: self.playing ? 1.0 : 0.0),
              MPMediaItemPropertyArtwork: MPMediaItemArtwork(image: image)
          ]
  
  MPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo = newInfos
  </code></pre>
  
  <p>I checked that none of the variables I use are nil, and I activated my AudioSession in the AppDelegate</p>
  
  <pre><code>var audioSession = AVAudioSession.sharedInstance()
  var error : NSError?
  audioSession.setCategory(AVAudioSessionCategoryPlayback, error: &amp;error)
  audioSession.setActive(true, error: &amp;error)
  UIApplication.sharedApplication().beginReceivingRemoteControlEvents()
  </code></pre>
  
  <p>Any ideas?</p>