Commit 3b0ab072 authored by Tommy Steimel's avatar Tommy Steimel Committed by Commit Bot

[Media Intent Handler] Add video/3gpp to supported MIME types

This fixes an issue where Chrome will only download a video/3gpp file
instead of playing it when opened with Chrome.

Bug: 910658, 923081
Change-Id: I0fcdfe5952f0020c35fe09a0db85a4e83fe4d37a
Reviewed-on: https://chromium-review.googlesource.com/c/1437720Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626310}
parent 6b5d1308
...@@ -352,6 +352,10 @@ void MimeUtil::AddSupportedMediaFormats() { ...@@ -352,6 +352,10 @@ void MimeUtil::AddSupportedMediaFormats() {
AddContainerWithCodecs("audio/x-m4a", aac); AddContainerWithCodecs("audio/x-m4a", aac);
AddContainerWithCodecs("video/x-m4v", avc_and_aac); AddContainerWithCodecs("video/x-m4v", avc_and_aac);
CodecSet video_3gpp_codecs(aac);
video_3gpp_codecs.emplace(H264);
AddContainerWithCodecs("video/3gpp", video_3gpp_codecs);
#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
CodecSet mp2t_codecs{H264, MPEG2_AAC, MPEG4_AAC, MP3}; CodecSet mp2t_codecs{H264, MPEG2_AAC, MPEG4_AAC, MP3};
AddContainerWithCodecs("video/mp2t", mp2t_codecs); AddContainerWithCodecs("video/mp2t", mp2t_codecs);
......
...@@ -184,6 +184,7 @@ TEST(MimeUtilTest, CommonMediaMimeType) { ...@@ -184,6 +184,7 @@ TEST(MimeUtilTest, CommonMediaMimeType) {
EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a")); EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a"));
EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v")); EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v"));
EXPECT_TRUE(IsSupportedMediaMimeType("audio/aac")); EXPECT_TRUE(IsSupportedMediaMimeType("audio/aac"));
EXPECT_TRUE(IsSupportedMediaMimeType("video/3gpp"));
#if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
EXPECT_TRUE(IsSupportedMediaMimeType("video/mp2t")); EXPECT_TRUE(IsSupportedMediaMimeType("video/mp2t"));
...@@ -195,6 +196,7 @@ TEST(MimeUtilTest, CommonMediaMimeType) { ...@@ -195,6 +196,7 @@ TEST(MimeUtilTest, CommonMediaMimeType) {
EXPECT_FALSE(IsSupportedMediaMimeType("audio/x-m4a")); EXPECT_FALSE(IsSupportedMediaMimeType("audio/x-m4a"));
EXPECT_FALSE(IsSupportedMediaMimeType("video/x-m4v")); EXPECT_FALSE(IsSupportedMediaMimeType("video/x-m4v"));
EXPECT_FALSE(IsSupportedMediaMimeType("audio/aac")); EXPECT_FALSE(IsSupportedMediaMimeType("audio/aac"));
EXPECT_FALSE(IsSupportedMediaMimeType("video/3gpp"));
#endif // USE_PROPRIETARY_CODECS #endif // USE_PROPRIETARY_CODECS
EXPECT_FALSE(IsSupportedMediaMimeType("video/mp3")); EXPECT_FALSE(IsSupportedMediaMimeType("video/mp3"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment