Update media_switches.cc

This commit is contained in:
Alexander David Frick 2022-07-23 04:27:40 -05:00 committed by GitHub
parent ea9f02ed2d
commit e3ea012ad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -527,9 +527,6 @@ const base::Feature kUseR16Texture{"use-r16-texture",
const base::Feature kUnifiedAutoplay{"UnifiedAutoplay", const base::Feature kUnifiedAutoplay{"UnifiedAutoplay",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kNoAutoplay{"NoAutoplay",
base::FEATURE_DISABLED_BY_DEFAULT};
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
// Enable vaapi video decoding on linux. This is already enabled by default on // Enable vaapi video decoding on linux. This is already enabled by default on
// chromeos, but needs an experiment on linux. // chromeos, but needs an experiment on linux.
@ -965,7 +962,7 @@ std::string GetEffectiveAutoplayPolicy(const base::CommandLine& command_line) {
if (base::FeatureList::IsEnabled(media::kUnifiedAutoplay)) if (base::FeatureList::IsEnabled(media::kUnifiedAutoplay))
return switches::autoplay::kDocumentUserActivationRequiredPolicy; return switches::autoplay::kDocumentUserActivationRequiredPolicy;
if (base::FeatureList::IsEnabled(media::kNoAutoplay)) if (base::CommandLine::ForCurrentProcess()->HasSwitch("no-autoplay"))
return switches::autoplay::kUserGestureRequiredPolicy; return switches::autoplay::kUserGestureRequiredPolicy;
// The default value is platform dependent. // The default value is platform dependent.