Bug 1477011 - Report vp9 in mp4 as supported. r=dminor

Since we switched to the mp4 rust demuxer, VP9 in mp4 is always supported.

Differential Revision: https://phabricator.services.mozilla.com/D2261
This commit is contained in:
Jean-Yves Avenard
2018-07-20 11:36:57 +00:00
parent c7aee82538
commit 1793c0bdd8
2 changed files with 2 additions and 27 deletions

View File

@@ -4778,16 +4778,6 @@ HTMLMediaElement::UnbindFromTree(bool aDeep, bool aNullParent)
RunInStableState(task);
}
static bool
IsVP9InMP4(const MediaContainerType& aContainerType)
{
const MediaContainerType mimeType(aContainerType.Type());
return DecoderTraits::IsMP4SupportedType(
mimeType,
/* DecoderDoctorDiagnostics* */ nullptr) &&
IsVP9CodecString(aContainerType.ExtendedType().Codecs().AsString());
}
/* static */
CanPlayStatus
HTMLMediaElement::GetCanPlay(const nsAString& aType,
@@ -4799,14 +4789,6 @@ HTMLMediaElement::GetCanPlay(const nsAString& aType,
}
CanPlayStatus status =
DecoderTraits::CanHandleContainerType(*containerType, aDiagnostics);
if (status == CANPLAY_YES && IsVP9InMP4(*containerType)) {
// We don't have a demuxer that can handle VP9 in non-fragmented MP4.
// So special-case VP9 in MP4 here, as we assume canPlayType() implies
// non-fragmented MP4 anyway. Note we report that we can play VP9
// in MP4 in MediaSource.isTypeSupported(), as the fragmented MP4
// demuxer can handle VP9 in fragmented MP4.
return CANPLAY_NO;
}
if (status == CANPLAY_YES &&
(*containerType).ExtendedType().Codecs().IsEmpty()) {
// Per spec: 'Generally, a user agent should never return "probably" for a