From 0f0c5a85956695c291aa4a3961636cfab81a02c2 Mon Sep 17 00:00:00 2001 From: Andreas Pehrson Date: Tue, 11 Jun 2019 11:48:21 +0000 Subject: [PATCH] Bug 1554699 - HTMLMediaElement.preload: Ignore setting and always get "none" when playing a MediaStream. r=jib Differential Revision: https://phabricator.services.mozilla.com/D33096 --HG-- extra : moz-landing-system : lando --- dom/html/HTMLMediaElement.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dom/html/HTMLMediaElement.h b/dom/html/HTMLMediaElement.h index d27d406e9630..22f2a3a88886 100644 --- a/dom/html/HTMLMediaElement.h +++ b/dom/html/HTMLMediaElement.h @@ -436,9 +436,16 @@ class HTMLMediaElement : public nsGenericHTMLElement, void NotifyAudioPlaybackChanged(AudibleChangedReasons aReason); void GetPreload(nsAString& aValue) { + if (mSrcAttrStream) { + nsGkAtoms::none->ToString(aValue); + return; + } GetEnumAttr(nsGkAtoms::preload, nullptr, aValue); } void SetPreload(const nsAString& aValue, ErrorResult& aRv) { + if (mSrcAttrStream) { + return; + } SetHTMLAttr(nsGkAtoms::preload, aValue, aRv); }