title: How can I get HE-AAC v2 to playback in Chrome's MediaSource API?
body: <p>I am trying to use the <a href="https://w3c.github.io/media-source/" rel="nofollow">MediaSource API</a> to play chunked HE-AAC v2 in Chrome.</p>
  
  <p>Chrome explicitly allows this codec (<code>mp4a.40.29</code>) and as far as I can see <a href="https://code.google.com/p/chromium/codesearch#chromium/src/media/base/mime_util.cc&amp;q=mp4a.40.29&amp;sq=package:chromium&amp;type=cs&amp;l=326" rel="nofollow">is capable</a> of decoding it. (For example, the <code>decodeAudioData</code> method from the Web Audio API does decode the same data).</p>
  
  <p>Unfortunately, trying to play chunks of HE-AAC v2 using the MediaSource API in Chrome results in the errors below, even though the exact same page works perfectly in Safari.</p>
  
  <p><a href="http://chrome-he-aac-v2-test.s3-eu-west-1.amazonaws.com/test.html" rel="nofollow">I've put together a test page</a> demonstrating the problem (in Chrome) and success (in Safari).</p>
  
  <p>How can I make Chrome play these chunks?</p>
  
  <p><strong>Errors:</strong></p>
  
  <blockquote>
    <p>pipeline: decode error</p>
    
    <p>kInitDemuxer</p>
    
    <p>Append: stream parsing failed. Data size=15634 append_window_start=0
    append_window_end=inf</p>
  </blockquote>