summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/HTML5VideoViewProxy.java
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-03-18 14:56:10 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2011-03-21 10:36:00 -0700
commit265db32f31a9db60d4a93d59befa07c825cbe4f2 (patch)
tree0490dde33eec68733a3a833f4e42ca57ac8ef2d4 /core/java/android/webkit/HTML5VideoViewProxy.java
parentdd76dc0297f4c39fefbbc1ac23d9b1add187d9e9 (diff)
Support loading image and paused image for inline video
bug:4142131 Change-Id: I28d82a8e30a2146a3380c63dcdcbd51228f23f56
Diffstat (limited to 'core/java/android/webkit/HTML5VideoViewProxy.java')
-rw-r--r--core/java/android/webkit/HTML5VideoViewProxy.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java
index d3fcfa510eef..d12b965f66f0 100644
--- a/core/java/android/webkit/HTML5VideoViewProxy.java
+++ b/core/java/android/webkit/HTML5VideoViewProxy.java
@@ -105,12 +105,12 @@ class HTML5VideoViewProxy extends Handler
int currentVideoLayerId = mHTML5VideoView.getVideoLayerId();
if (layer != 0 && surfTexture != null && currentVideoLayerId != -1) {
- boolean readyToUseSurfTex =
- mHTML5VideoView.getReadyToUseSurfTex();
+ int playerState = mHTML5VideoView.getCurrentState();
boolean foundInTree = nativeSendSurfaceTexture(surfTexture,
layer, currentVideoLayerId, textureName,
- readyToUseSurfTex);
- if (readyToUseSurfTex && !foundInTree) {
+ playerState);
+ if (playerState == HTML5VideoView.STATE_PREPARED
+ && !foundInTree) {
mHTML5VideoView.pauseAndDispatch(mCurrentProxy);
mHTML5VideoView.deleteSurfaceTexture();
}
@@ -228,6 +228,9 @@ class HTML5VideoViewProxy extends Handler
mHTML5VideoView.isFullScreenMode() &&
mHTML5VideoView.getAutostart() )
mHTML5VideoView.start();
+ if (mBaseLayer != 0) {
+ setBaseLayer(mBaseLayer);
+ }
}
public static void end() {
@@ -668,5 +671,5 @@ class HTML5VideoViewProxy extends Handler
private native void nativeOnTimeupdate(int position, int nativePointer);
private native static boolean nativeSendSurfaceTexture(SurfaceTexture texture,
int baseLayer, int videoLayerId, int textureName,
- boolean updateTexture);
+ int playerState);
}