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

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