<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Mac] canPlayType('audio/mpeg; codecs=&quot;mp3&quot;') returns &quot;maybe&quot; instead of &quot;probably&quot; on AVFoundation"
   href="https://bugs.webkit.org/show_bug.cgi?id=147309#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Mac] canPlayType('audio/mpeg; codecs=&quot;mp3&quot;') returns &quot;maybe&quot; instead of &quot;probably&quot; on AVFoundation"
   href="https://bugs.webkit.org/show_bug.cgi?id=147309">bug 147309</a>
              from <span class="vcard"><a class="email" href="mailto:sajidanwar94&#64;gmail.com" title="Sajid Anwar &lt;sajidanwar94&#64;gmail.com&gt;"> <span class="fn">Sajid Anwar</span></a>
</span></b>
        <pre>Good point with the earlier versions of WebKit. What would the approach be? Replacing the ends of both MediaPlayerPrivateAVFoundationObjC::supportsType and MediaPlayerPrivateMediaSourceAVFObjC::supportsType with something like this?

    NSString *typeString = [NSString stringWithFormat:&#64;&quot;%&#64;; codecs=\&quot;%&#64;\&quot;&quot;, (NSString *)parameters.type, (NSString *)parameters.codecs];

    if ([typeString isEqualToString:&#64;&quot;audio/mpeg; codecs=\&quot;mp3\&quot;&quot;])
        return MediaPlayer::IsSupported;

    return [AVURLAsset isPlayableExtendedMIMEType:typeString] ? MediaPlayer::IsSupported : MediaPlayer::MayBeSupported;

The assumption here is that this kind of special-casing is harmless if AV Foundation has always supported the MP3 codec (likely).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>