Bug 1248570: Allow WAV into media element. r?lchristie
MozReview-Commit-ID: AKIQq9EyCC6
--- a/dom/media/DecoderTraits.cpp
+++ b/dom/media/DecoderTraits.cpp
@@ -339,24 +339,16 @@ IsWAVSupportedType(const nsACString& aTy
const nsAString& aCodecs = EmptyString())
{
return WaveDecoder::CanHandleMediaType(aType, aCodecs);
}
/* static */
bool DecoderTraits::ShouldHandleMediaType(const char* aMIMEType)
{
- if (IsWaveType(nsDependentCString(aMIMEType))) {
- // We should not return true for Wave types, since there are some
- // Wave codecs actually in use in the wild that we don't support, and
- // we should allow those to be handled by plugins or helper apps.
- // Furthermore people can play Wave files on most platforms by other
- // means.
- return false;
- }
return CanHandleMediaType(aMIMEType, false, EmptyString()) != CANPLAY_NO;
}
/* static */
CanPlayStatus
DecoderTraits::CanHandleCodecsType(const char* aMIMEType,
const nsAString& aRequestedCodecs)
{
@@ -689,16 +681,17 @@ bool DecoderTraits::IsSupportedInVideoDo
#ifdef MOZ_ANDROID_OMX
(MediaDecoder::IsAndroidMediaEnabled() && IsAndroidMediaType(aType)) ||
#endif
#ifdef MOZ_FMP4
IsMP4SupportedType(aType) ||
#endif
IsMP3SupportedType(aType) ||
IsAACSupportedType(aType) ||
+ IsWAVSupportedType(aType) ||
#ifdef MOZ_DIRECTSHOW
IsDirectShowSupportedType(aType) ||
#endif
#ifdef NECKO_PROTOCOL_rtsp
IsRtspSupportedType(aType) ||
#endif
false;
}