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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user