Index: media/base/media_switches.cc |
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc |
index 03b4c7685e31a19cc1f8df94f6e719030fa783ec..92f70f569fda63124d0cb0fc582cd310786bba5f 100644 |
--- a/media/base/media_switches.cc |
+++ b/media/base/media_switches.cc |
@@ -11,6 +11,9 @@ namespace switches { |
// Allow users to specify a custom buffer size for debugging purpose. |
const char kAudioBufferSize[] = "audio-buffer-size"; |
+// Command line flag name to set the autoplay policy. |
+const char kAutoplayPolicy[] = "autoplay-policy"; |
+ |
// Set number of threads to use for video decoding. |
const char kVideoThreads[] = "video-threads"; |
@@ -135,20 +138,24 @@ const char kForceVideoOverlays[] = "force-video-overlays"; |
const char kMSEAudioBufferSizeLimit[] = "mse-audio-buffer-size-limit"; |
const char kMSEVideoBufferSizeLimit[] = "mse-video-buffer-size-limit"; |
-} // namespace switches |
+namespace autoplay { |
-namespace media { |
+// Autoplay policy to require a user gesture in ordor to play for cross origin |
Alexei Svitkine (slow)
2017/04/24 18:45:07
order
|
+// iframes. |
+const char kCrossOriginUserGestureRequiredPolicy[] = |
+ "cross-origin-user-gesture-required"; |
-#if defined(OS_WIN) |
-// Enables video decode acceleration using the D3D11 video decoder api. |
-// This is completely insecure - DO NOT USE except for testing. |
-const base::Feature kD3D11VideoDecoding{"D3D11VideoDecoding", |
- base::FEATURE_DISABLED_BY_DEFAULT}; |
+// Autoplay policy to require a user gesture in order to play. |
+const char kUserGestureRequiredPolicy[] = "user-gesture-required"; |
-// Enables H264 HW encode acceleration using Media Foundation for Windows. |
-const base::Feature kMediaFoundationH264Encoding{ |
- "MediaFoundationH264Encoding", base::FEATURE_ENABLED_BY_DEFAULT}; |
-#endif // defined(OS_WIN) |
+// No autoplay policy. |
+const char kNoRestrictionsPolicy[] = "none"; |
+ |
+} // namespace autoplay |
+ |
+} // namespace switches |
+ |
+namespace media { |
// Use new audio rendering mixer. |
const base::Feature kNewAudioRenderingMixingStrategy{ |
@@ -214,4 +221,15 @@ const base::Feature kMediaDrmPersistentLicense{ |
#endif |
+#if defined(OS_WIN) |
+// Enables video decode acceleration using the D3D11 video decoder api. |
+// This is completely insecure - DO NOT USE except for testing. |
+const base::Feature kD3D11VideoDecoding{"D3D11VideoDecoding", |
+ base::FEATURE_DISABLED_BY_DEFAULT}; |
+ |
+// Enables H264 HW encode acceleration using Media Foundation for Windows. |
+const base::Feature kMediaFoundationH264Encoding{ |
+ "MediaFoundationH264Encoding", base::FEATURE_ENABLED_BY_DEFAULT}; |
+#endif // defined(OS_WIN) |
+ |
} // namespace media |