diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-04-06 18:09:27 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-04-06 18:20:19 -0700 |
commit | 0504967cb05f7bbd0c17962360a5d88ace8d173f (patch) | |
tree | ab88cf413f9288cc0b51997fdf9411667d553e1f | |
parent | 3f39f653a90f9727d13be1e9908f0afb8fe66d6e (diff) | |
download | frameworks_base-0504967cb05f7bbd0c17962360a5d88ace8d173f.zip frameworks_base-0504967cb05f7bbd0c17962360a5d88ace8d173f.tar.gz frameworks_base-0504967cb05f7bbd0c17962360a5d88ace8d173f.tar.bz2 |
Fix the issue the video can't start to play
In full screen mode, we shall not always rely on the auto start info.
If the auto start is false, it will prevent the video from playing.
The auto start should always happen inline mode when prepared.
If we switch into full screen mode while playing, we will also do auto start.
bug:4260063
Change-Id: I4b13c30b1f2c219951dc8edd659e221a21c86c2b
-rw-r--r-- | core/java/android/webkit/HTML5VideoFullScreen.java | 7 | ||||
-rw-r--r-- | core/java/android/webkit/HTML5VideoViewProxy.java | 5 |
2 files changed, 3 insertions, 9 deletions
diff --git a/core/java/android/webkit/HTML5VideoFullScreen.java b/core/java/android/webkit/HTML5VideoFullScreen.java index 9636513..0726266 100644 --- a/core/java/android/webkit/HTML5VideoFullScreen.java +++ b/core/java/android/webkit/HTML5VideoFullScreen.java @@ -114,13 +114,6 @@ public class HTML5VideoFullScreen extends HTML5VideoView return mVideoSurfaceView; } - @Override - public void start() { - if (getAutostart()) { - super.start(); - } - } - HTML5VideoFullScreen(Context context, int videoLayerId, int position, boolean autoStart) { mVideoSurfaceView = new VideoSurfaceView(context); diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java index acd7eab..c727029 100644 --- a/core/java/android/webkit/HTML5VideoViewProxy.java +++ b/core/java/android/webkit/HTML5VideoViewProxy.java @@ -224,8 +224,9 @@ class HTML5VideoViewProxy extends Handler } public static void onPrepared() { - // The VideoView will decide whether to really kick off to play. - mHTML5VideoView.start(); + if (!mHTML5VideoView.isFullScreenMode() || mHTML5VideoView.getAutostart()) { + mHTML5VideoView.start(); + } if (mBaseLayer != 0) { setBaseLayer(mBaseLayer); } |