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
This commit is contained in:
Teng-Hui Zhu
2011-04-06 18:09:27 -07:00
parent 3f39f653a9
commit 0504967cb0
2 changed files with 3 additions and 9 deletions

View File

@@ -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);

View File

@@ -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);
}