diff options
author | Yuncheol Heo <ycheo@google.com> | 2014-06-04 05:12:54 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-06-04 05:12:55 +0000 |
commit | 41eca132b24f2371be4fa26828803395df533beb (patch) | |
tree | 3054067c3f4ff45a1510aa74a0d2f0d610dc95f6 /core/java/android | |
parent | 16ce2933e05fcb3786d528e9ba3052fee6bddcb8 (diff) | |
parent | 4d07c48e4882bfc4223ed6f818d2f8cc1d06f328 (diff) | |
download | frameworks_base-41eca132b24f2371be4fa26828803395df533beb.zip frameworks_base-41eca132b24f2371be4fa26828803395df533beb.tar.gz frameworks_base-41eca132b24f2371be4fa26828803395df533beb.tar.bz2 |
Merge "Add API definition for WebSettings.setVideoOverlayForEmbeddedEncryptedVideoEnabled."
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/webkit/WebSettings.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 7c32c5b..d14c19b 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -1460,4 +1460,36 @@ public abstract class WebSettings { * {@link #MIXED_CONTENT_NEVER_ALLOW} or {@link #MIXED_CONTENT_COMPATIBILITY_MODE}. */ public abstract int getMixedContentMode(); + + /** + * Sets whether to use a video overlay for embedded encrypted video. + * In API levels prior to {@link android.os.Build.VERSION_CODES#L}, encrypted video can + * only be rendered directly on a secure video surface, so it had been a hard problem to play + * encrypted video in HTML. When this flag is on, WebView can play encrypted video (MSE/EME) + * by using a video overlay (aka hole-punching) for videos embedded using HTML <video> + * tag.<br> + * Caution: This setting is intended for use only in a narrow set of circumstances and apps + * should only enable it if they require playback of encrypted video content. It will impose + * the following limitations on the WebView: + * <ul> + * <li> Only one video overlay can be played at a time. + * <li> Changes made to position or dimensions of a video element may be propagated to the + * corresponding video overlay with a noticeable delay. + * <li> The video overlay is not visible to web APIs and as such may not interact with + * script or styling. For example, CSS styles applied to the <video> tag may be ignored. + * </ul> + * This is not an exhaustive set of constraints and it may vary with new versions of the + * WebView. + * @hide + */ + public abstract void setVideoOverlayForEmbeddedEncryptedVideoEnabled(boolean flag); + + /** + * Gets whether a video overlay will be used for embedded encrypted video. + * + * @return true if WebView uses a video overlay for embedded encrypted video. + * @see #setVideoOverlayForEmbeddedEncryptedVideoEnabled + * @hide + */ + public abstract boolean getVideoOverlayForEmbeddedEncryptedVideoEnabled(); } |