mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

MIME types are case-insensitive, but none of the many existing comparisons across our code base take this into account. The code can be made more robust by normalizing all MIME types at the moment they are first set into a class/builder and adding toLowerCase as part of the normalization. Most concretely, this fixes an issue with playing HLS streams via the IMA SDK where the stream MIME type is indicated with all lower case "application/x-mpegurl", which failed the MIME type comparison in DefaultMediaSourceFactory. PiperOrigin-RevId: 582317261