title: How to get rid of "media playing" notification shown by Chrome on Android?
body: <p>My HTML5 game has some background music that uses Howler.js in "html5" mode, which apparently triggers Chrome for Android's <a href="https://developers.google.com/web/updates/2015/07/media-notifications" rel="noreferrer">media playback notifications</a>. This means a notification appears while the user has my game open in any tab:</p>
  
  <p><a href="https://i.stack.imgur.com/jL5tC.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/jL5tC.gif" height="320"></a></p>
  
  <p>The game is a good citizen and pauses the music while the tab is not in focus, so there is no need for this notification. It's even actively confusing, because the user can pause and resume the game's background music without being in the game. But I can't find a way to get rid of the notification.</p>
  
  <p>I tried calling <code>stop()</code> instead of <code>pause()</code> or <code>mute()</code> on the music object, but this doesn't remove the notification.</p>
  
  <p>Looking a bit deeper, I discovered the experimental <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaSession" rel="noreferrer"><code>MediaSession</code> API</a> (<a href="https://wicg.github.io/mediasession/" rel="noreferrer">W3C draft</a>) which supposedly can be used to control the notification. But, if I understand correctly, it offers no way to disable it outright!</p>
  
  <p>I tried this at the start of my application:</p>
  
  <pre><code>if (typeof navigator.mediaSession == 'object') {
    navigator.mediaSession.playbackState = 'none'
  }
  </code></pre>
  
  <p>However, this only sets the <em>declared playback state</em> (in spec terminology). And setting that to <code>'none'</code> has no effect:</p>
  
  <blockquote>
    <p>The <em>actual playback state</em> is computed in the following way:</p>
    
    <ul>
    <li>If the <em>declared playback state</em> is "playing", return "playing".</li>
    <li>Otherwise, return the <em>guessed playback state</em>.</li>
    </ul>
  </blockquote>
  
  <p>And the <em>guessed playback state</em> is something I have no control over; it's derived by the browser based on the state of <code>&lt;audio&gt;</code> elements on the page.</p>
  
  <p>Is there a possibility that I'm overlooking, or is this just an oversight in the current MediaSession specification?</p>