mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
Bug 1130920 - don't set preload to none when src is MSE. r=cpearce
This commit is contained in:
parent
580efcfbe4
commit
7237654e96
@ -864,6 +864,7 @@ void HTMLMediaElement::SelectResource()
|
||||
"Should think we're not loading from source children by default");
|
||||
|
||||
mLoadingSrc = uri;
|
||||
UpdatePreloadAction();
|
||||
if (mPreloadAction == HTMLMediaElement::PRELOAD_NONE) {
|
||||
// preload:none media, suspend the load here before we make any
|
||||
// network requests.
|
||||
@ -1078,9 +1079,12 @@ void HTMLMediaElement::UpdatePreloadAction()
|
||||
// Find the appropriate preload action by looking at the attribute.
|
||||
const nsAttrValue* val = mAttrsAndChildren.GetAttr(nsGkAtoms::preload,
|
||||
kNameSpaceID_None);
|
||||
uint32_t preloadDefault =
|
||||
Preferences::GetInt("media.preload.default",
|
||||
HTMLMediaElement::PRELOAD_ATTR_METADATA);
|
||||
// MSE doesn't work if preload is none, so it ignores the pref when src is
|
||||
// from MSE.
|
||||
uint32_t preloadDefault = (mLoadingSrc && IsMediaSourceURI(mLoadingSrc)) ?
|
||||
HTMLMediaElement::PRELOAD_ATTR_METADATA :
|
||||
Preferences::GetInt("media.preload.default",
|
||||
HTMLMediaElement::PRELOAD_ATTR_METADATA);
|
||||
uint32_t preloadAuto =
|
||||
Preferences::GetInt("media.preload.auto",
|
||||
HTMLMediaElement::PRELOAD_ENOUGH);
|
||||
|
Loading…
x
Reference in New Issue
Block a user