summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/HTML5VideoFullScreen.java
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-06-15 11:22:23 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-06-15 11:27:34 -0700
commit6a9586bc57b162a2d68dd3e417f0fd43d8932fd0 (patch)
tree2c07b65044bd5e021dd4df0902f16baf0a2c5c4a /core/java/android/webkit/HTML5VideoFullScreen.java
parenta7e3a1e0e7d308e7e78a1992038a34485d04ab29 (diff)
Notify Java side to start when transition into full screen mode without a reload.
When video start in inline mode, and then transition into full screen mode, the video is still playing, so we need to notify the player, such that the controller can get the state correctly. bug:6675847 Change-Id: Ib5f712ca91fe1c374dcc20de996dac6ff7b9e983
Diffstat (limited to 'core/java/android/webkit/HTML5VideoFullScreen.java')
-rw-r--r--core/java/android/webkit/HTML5VideoFullScreen.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/core/java/android/webkit/HTML5VideoFullScreen.java b/core/java/android/webkit/HTML5VideoFullScreen.java
index 62bc502b79e2..33eaad6bde45 100644
--- a/core/java/android/webkit/HTML5VideoFullScreen.java
+++ b/core/java/android/webkit/HTML5VideoFullScreen.java
@@ -194,13 +194,6 @@ public class HTML5VideoFullScreen extends HTML5VideoView
mCanPause = mCanSeekBack = mCanSeekForward = true;
}
- // mMediaController status depends on the Metadata result, so put it
- // after reading the MetaData
- if (mMediaController != null) {
- mMediaController.setEnabled(true);
- mMediaController.show();
- }
-
if (mProgressView != null) {
mProgressView.setVisibility(View.GONE);
}
@@ -215,6 +208,16 @@ public class HTML5VideoFullScreen extends HTML5VideoView
if (getStartWhenPrepared()) {
mPlayer.start();
+ // Clear the flag.
+ setStartWhenPrepared(false);
+ }
+
+ // mMediaController status depends on the Metadata result, so put it
+ // after reading the MetaData.
+ // And make sure mPlayer state is updated before showing the controller.
+ if (mMediaController != null) {
+ mMediaController.setEnabled(true);
+ mMediaController.show();
}
}