Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(887)

Unified Diff: media/base/mime_util_internal.cc

Issue 2640373002: Add support for audio/{x-}mpegurl mime type for HLS. (Closed)
Patch Set: Fix test expectations. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/media/media_canplaytype_browsertest.cc ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mime_util_internal.cc
diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
index 031d548c7ced5e5e9b85f3f1d36481a2d751d4e7..a3b51d07caca14d944307ef4aebddf08206e7a77 100644
--- a/media/base/mime_util_internal.cc
+++ b/media/base/mime_util_internal.cc
@@ -360,6 +360,11 @@ void MimeUtil::AddSupportedMediaFormats() {
hls_codecs.insert(MP3);
AddContainerWithCodecs("application/x-mpegurl", hls_codecs, true);
AddContainerWithCodecs("application/vnd.apple.mpegurl", hls_codecs, true);
+ AddContainerWithCodecs("audio/mpegurl", hls_codecs, true);
+ // Not documented by Apple, but unfortunately used extensively by Apple and
+ // others for both audio-only and audio+video playlists. See
+ // https://crbug.com/675552 for details and examples.
+ AddContainerWithCodecs("audio/x-mpegurl", hls_codecs, true);
#endif // defined(OS_ANDROID)
#endif // defined(USE_PROPRIETARY_CODECS)
}
@@ -502,9 +507,9 @@ bool MimeUtil::IsCodecSupportedOnPlatform(
case MPEG2_AAC:
// MPEG-2 variants of AAC are not supported on Android unless the unified
// media pipeline can be used and the container is not HLS. These codecs
- // will be decoded in software. See https:crbug.com/544268 for details.
- if (mime_type_lower_case == "application/x-mpegurl" ||
- mime_type_lower_case == "application/vnd.apple.mpegurl") {
+ // will be decoded in software. See https://crbug.com/544268 for details.
+ if (base::EndsWith(mime_type_lower_case, "mpegurl",
+ base::CompareCase::SENSITIVE)) {
return false;
}
return !is_encrypted && platform_info.is_unified_media_pipeline_enabled;
« no previous file with comments | « content/browser/media/media_canplaytype_browsertest.cc ('k') | media/base/mime_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698