| Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| index a1e7f115b9e08babd82193297c094665ff66223b..4a4650cf9a1fcaf5c78fe3cf7c456ee11c1504f2 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -2000,8 +2000,9 @@ void HTMLMediaElement::setPreload(const AtomicString& preload)
|
|
|
| WebMediaPlayer::Preload HTMLMediaElement::preloadType() const
|
| {
|
| - // Force preload to none for cellular connections.
|
| - if (networkStateNotifier().isCellularConnectionType()) {
|
| + // Force preload to none for cellular connections or when data saver is explicitly set.
|
| + if (networkStateNotifier().isCellularConnectionType()
|
| + || (document().settings() && document().settings()->dataSaverEnabled())) {
|
| UseCounter::count(document(), UseCounter::HTMLMediaElementPreloadForcedNone);
|
| return WebMediaPlayer::PreloadNone;
|
| }
|
| @@ -2040,7 +2041,7 @@ String HTMLMediaElement::effectivePreload() const
|
|
|
| WebMediaPlayer::Preload HTMLMediaElement::effectivePreloadType() const
|
| {
|
| - if (autoplay())
|
| + if (autoplay() && !isGestureNeededForPlayback())
|
| return WebMediaPlayer::PreloadAuto;
|
|
|
| WebMediaPlayer::Preload preload = preloadType();
|
|
|