summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorYuncheol Heo <ycheo@google.com>2014-05-07 17:29:35 +0900
committerYuncheol Heo <ycheo@google.com>2014-05-23 10:34:59 +0900
commit4d07c48e4882bfc4223ed6f818d2f8cc1d06f328 (patch)
tree9502e87f3494928532f86d6322274c50b36d7e61 /core/java/android
parentaa90295d200e29d2861be0c6d05829ca7f6c7592 (diff)
downloadframeworks_base-4d07c48e4882bfc4223ed6f818d2f8cc1d06f328.zip
frameworks_base-4d07c48e4882bfc4223ed6f818d2f8cc1d06f328.tar.gz
frameworks_base-4d07c48e4882bfc4223ed6f818d2f8cc1d06f328.tar.bz2
Add API definition for WebSettings.setVideoOverlayForEmbeddedEncryptedVideoEnabled.
Introduces an API to control the hole-punching for the embedded encrypted media. Bug: 14598993 Change-Id: I6b473e5b38b0bcc243f43dfeba0c2037fcd37af5
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/webkit/WebSettings.java32
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 &lt;video&gt;
+ * 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 &lt;video&gt; 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();
}