@@ -1883,22 +1883,10 @@ index 76a36536f92ca5cc361e35cb8e27de1bbcc88327..004e678da6e383cfb97fbd7022d9faca
1883
1883
if (GetWebMediaPlayer())
1884
1884
GetWebMediaPlayer()->SetVolume(EffectiveMediaVolume());
1885
1885
diff --git a/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp b/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp
1886
- index 8adf2d1030ccb91f438d936e94175b20b389f858..2f3b3fdb109cc9bc447d554acdce1a7f0b27cdd8 100644
1886
+ index 8adf2d1030ccb91f438d936e94175b20b389f858..c37964ce6cf903a8507e41df017c0932198a5934 100644
1887
1887
--- a/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp
1888
1888
+++ b/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp
1889
- @@ -264,6 +264,11 @@ void AutoplayPolicy::UnlockUserGesture() {
1890
- }
1891
-
1892
- bool AutoplayPolicy::IsGestureNeededForPlayback() const {
1893
- + // MUON(darkdh): check autoplay setting
1894
- + if (!IsAutoplayAllowedPerSettings()) {
1895
- + return true;
1896
- + }
1897
- +
1898
- if (!IsLockedPendingUserGesture())
1899
- return false;
1900
-
1901
- @@ -280,14 +285,16 @@ bool AutoplayPolicy::IsGestureNeededForPlaybackIfPendingUserGestureIsLocked()
1889
+ @@ -280,15 +280,20 @@ bool AutoplayPolicy::IsGestureNeededForPlaybackIfPendingUserGestureIsLocked()
1902
1890
// - Data Saver is not enabled;
1903
1891
// - Preload was not disabled (low end devices);
1904
1892
// - Autoplay is enabled in settings;
@@ -1910,6 +1898,7 @@ index 8adf2d1030ccb91f438d936e94175b20b389f858..2f3b3fdb109cc9bc447d554acdce1a7f
1910
1898
- element_->GetDocument()
1911
1899
- .GetSettings()
1912
1900
- ->GetForcePreloadNoneForMediaElements()) &&
1901
+ - IsAutoplayAllowedPerSettings()) {
1913
1902
+ // if (element_->IsHTMLVideoElement() && element_->muted() &&
1914
1903
+ // RuntimeEnabledFeatures::AutoplayMutedVideosEnabled() &&
1915
1904
+ // !(element_->GetDocument().GetSettings() &&
@@ -1918,11 +1907,15 @@ index 8adf2d1030ccb91f438d936e94175b20b389f858..2f3b3fdb109cc9bc447d554acdce1a7f
1918
1907
+ // element_->GetDocument()
1919
1908
+ // .GetSettings()
1920
1909
+ // ->GetForcePreloadNoneForMediaElements()) &&
1921
- + // MUON(darkdh): only check autoplay setting
1922
- + if (element_->IsHTMLVideoElement() &&
1923
- IsAutoplayAllowedPerSettings()) {
1910
+ + // MUON(darkdh): default allow muted media and local files
1911
+ + // only check autoplay setting for non-muted and non-local one
1912
+ + if ((element_->IsHTMLVideoElement() || element_->IsAudioElement()) &&
1913
+ + (element_->muted() ||
1914
+ + element_->GetDocument().origin() == String("null") ||
1915
+ + IsAutoplayAllowedPerSettings())) {
1924
1916
return false;
1925
1917
}
1918
+
1926
1919
diff --git a/third_party/boringssl/BUILD.generated.gni b/third_party/boringssl/BUILD.generated.gni
1927
1920
index 0e96ff54ff898080fef9f132f37b3a1f75b4d8fe..8362d3d55394372b54a4c0234d562bc698155347 100644
1928
1921
--- a/third_party/boringssl/BUILD.generated.gni
0 commit comments