[Webkit-unassigned] [Bug 147309] [Mac] canPlayType('audio/mpeg; codecs="mp3"') returns "maybe" instead of "probably" on AVFoundation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 27 15:43:35 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=147309

--- Comment #2 from Sajid Anwar <sajidanwar94 at gmail.com> ---
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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150727/ba70164c/attachment.html>


More information about the webkit-unassigned mailing list