73 lines
3.1 KiB
Diff
73 lines
3.1 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Thu, 25 Oct 2018 23:13:34 +0200
|
|
Subject: Add flag to control video playback resume feature
|
|
|
|
Disable it by default on Android as it is everywhere else
|
|
---
|
|
chrome/browser/about_flags.cc | 4 ++++
|
|
chrome/browser/flag_descriptions.cc | 5 +++++
|
|
chrome/browser/flag_descriptions.h | 3 +++
|
|
media/base/media_switches.cc | 6 +-----
|
|
4 files changed, 13 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
|
--- a/chrome/browser/about_flags.cc
|
|
+++ b/chrome/browser/about_flags.cc
|
|
@@ -2635,6 +2635,10 @@ const FeatureEntry kFeatureEntries[] = {
|
|
kOsAura,
|
|
FEATURE_VALUE_TYPE(features::kOverlayScrollbarFlashAfterAnyScrollUpdate)},
|
|
#endif // USE_AURA
|
|
+ {"resume-background-video",
|
|
+ flag_descriptions::kResumeBackgroundVideoName,
|
|
+ flag_descriptions::kResumeBackgroundVideoDescription, kOsAll,
|
|
+ FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)},
|
|
{"enable-quic", flag_descriptions::kQuicName,
|
|
flag_descriptions::kQuicDescription, kOsAll,
|
|
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic, switches::kDisableQuic)},
|
|
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
|
--- a/chrome/browser/flag_descriptions.cc
|
|
+++ b/chrome/browser/flag_descriptions.cc
|
|
@@ -955,6 +955,11 @@ const char kEnableLoginDetectionName[] = "Enable login detection";
|
|
const char kEnableLoginDetectionDescription[] =
|
|
"Allow user sign-in to be detected based on heuristics.";
|
|
|
|
+const char kResumeBackgroundVideoName[] = "Resume background video.";
|
|
+const char kResumeBackgroundVideoDescription[] =
|
|
+ "Resume background video playback when tab re-gains focus; additionally, "
|
|
+ "it will pause video playback every single time you switch tabs.";
|
|
+
|
|
const char kEnablePixelCanvasRecordingName[] = "Enable pixel canvas recording";
|
|
const char kEnablePixelCanvasRecordingDescription[] =
|
|
"Pixel canvas recording allows the compositor to raster contents aligned "
|
|
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
|
--- a/chrome/browser/flag_descriptions.h
|
|
+++ b/chrome/browser/flag_descriptions.h
|
|
@@ -547,6 +547,9 @@ extern const char kEnablePortalsDescription[];
|
|
extern const char kEnablePortalsCrossOriginName[];
|
|
extern const char kEnablePortalsCrossOriginDescription[];
|
|
|
|
+extern const char kResumeBackgroundVideoName[];
|
|
+extern const char kResumeBackgroundVideoDescription[];
|
|
+
|
|
extern const char kEnablePixelCanvasRecordingName[];
|
|
extern const char kEnablePixelCanvasRecordingDescription[];
|
|
|
|
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
|
--- a/media/base/media_switches.cc
|
|
+++ b/media/base/media_switches.cc
|
|
@@ -237,11 +237,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
|
|
// when in background.
|
|
const base::Feature kResumeBackgroundVideo {
|
|
"resume-background-video",
|
|
-#if defined(OS_ANDROID)
|
|
- base::FEATURE_ENABLED_BY_DEFAULT
|
|
-#else
|
|
- base::FEATURE_DISABLED_BY_DEFAULT
|
|
-#endif
|
|
+ base::FEATURE_DISABLED_BY_DEFAULT
|
|
};
|
|
|
|
// When enabled, MediaCapabilities will check with GPU Video Accelerator
|
|
--
|
|
2.17.1
|
|
|