Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
roytam1 2021-03-12 09:00:51 +08:00
commit e54fcd15f1
56 changed files with 23 additions and 1671 deletions

View file

@ -846,28 +846,7 @@ private:
bool CanOwnerPlayUnsupportedTypeMedia() const
{
#if defined(MOZ_WIDGET_ANDROID)
// On Fennec, we will user an external app to open unsupported media types.
if (!Preferences::GetBool("media.openUnsupportedTypeWithExternalApp")) {
return false;
}
if (!mError) {
return false;
}
uint16_t errorCode = mError->Code();
if (errorCode != MEDIA_ERR_SRC_NOT_SUPPORTED) {
return false;
}
// If media doesn't start playing, we don't need to open it.
if (mOwner->Paused()) {
return false;
}
return true;
#endif
// This was only something to check on Android. Stubbed now.
return false;
}
@ -6190,13 +6169,6 @@ HTMLMediaElement::IsAllowedToPlay()
if (!mHasUserInteraction &&
!IsAutoplayEnabled() &&
!EventStateManager::IsHandlingUserInput()) {
#if defined(MOZ_WIDGET_ANDROID)
nsContentUtils::DispatchTrustedEvent(OwnerDoc(),
static_cast<nsIContent*>(this),
NS_LITERAL_STRING("MozAutoplayMediaBlocked"),
false,
false);
#endif
return false;
}