<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="mp3"') returns "maybe" instead of "probably" 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="mp3"') returns "maybe" instead of "probably" 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@gmail.com" title="Sajid Anwar <sajidanwar94@gmail.com>"> <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:@"%@; codecs=\"%@\"", (NSString *)parameters.type, (NSString *)parameters.codecs];
if ([typeString isEqualToString:@"audio/mpeg; codecs=\"mp3\""])
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>