Loading core/java/android/webkit/HTML5VideoFullScreen.java +5 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView // After we return from this we can't use the surface any more. // The current Video View will be destroy when we play a new video. pauseAndDispatch(mProxy); mPlayer.release(); mSurfaceHolder = null; if (mMediaController != null) { mMediaController.hide(); Loading Loading @@ -226,6 +227,10 @@ public class HTML5VideoFullScreen extends HTML5VideoView mProxy.getWebView().getViewManager().showAll(); mProxy = null; // Don't show the controller after exiting the full screen. mMediaController = null; mCurrentState = STATE_RELEASED; } }; Loading core/java/android/webkit/HTML5VideoView.java +12 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { static final int STATE_NOTPREPARED = 1; static final int STATE_PREPARED = 2; static final int STATE_PLAYING = 3; static final int STATE_RELEASED = 4; protected int mCurrentState; protected HTML5VideoViewProxy mProxy; Loading Loading @@ -84,7 +85,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { } public void pause() { if (mCurrentState == STATE_PREPARED && mPlayer.isPlaying()) { if (isPlaying()) { mPlayer.pause(); } else if (mCurrentState == STATE_NOTPREPARED) { mPauseDuringPreparing = true; Loading Loading @@ -120,12 +121,19 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { } public boolean isPlaying() { if (mCurrentState == STATE_PREPARED) { return mPlayer.isPlaying(); } else { return false; } } public void release() { if (mCurrentState != STATE_RELEASED) { mPlayer.release(); } mCurrentState = STATE_RELEASED; } public void stopPlayback() { if (mCurrentState == STATE_PREPARED) { Loading Loading @@ -228,7 +236,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { public int getCurrentState() { if (mPlayer.isPlaying()) { if (isPlaying()) { return STATE_PLAYING; } else { return mCurrentState; Loading Loading
core/java/android/webkit/HTML5VideoFullScreen.java +5 −0 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView // After we return from this we can't use the surface any more. // The current Video View will be destroy when we play a new video. pauseAndDispatch(mProxy); mPlayer.release(); mSurfaceHolder = null; if (mMediaController != null) { mMediaController.hide(); Loading Loading @@ -226,6 +227,10 @@ public class HTML5VideoFullScreen extends HTML5VideoView mProxy.getWebView().getViewManager().showAll(); mProxy = null; // Don't show the controller after exiting the full screen. mMediaController = null; mCurrentState = STATE_RELEASED; } }; Loading
core/java/android/webkit/HTML5VideoView.java +12 −4 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { static final int STATE_NOTPREPARED = 1; static final int STATE_PREPARED = 2; static final int STATE_PLAYING = 3; static final int STATE_RELEASED = 4; protected int mCurrentState; protected HTML5VideoViewProxy mProxy; Loading Loading @@ -84,7 +85,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { } public void pause() { if (mCurrentState == STATE_PREPARED && mPlayer.isPlaying()) { if (isPlaying()) { mPlayer.pause(); } else if (mCurrentState == STATE_NOTPREPARED) { mPauseDuringPreparing = true; Loading Loading @@ -120,12 +121,19 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { } public boolean isPlaying() { if (mCurrentState == STATE_PREPARED) { return mPlayer.isPlaying(); } else { return false; } } public void release() { if (mCurrentState != STATE_RELEASED) { mPlayer.release(); } mCurrentState = STATE_RELEASED; } public void stopPlayback() { if (mCurrentState == STATE_PREPARED) { Loading Loading @@ -228,7 +236,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener { public int getCurrentState() { if (mPlayer.isPlaying()) { if (isPlaying()) { return STATE_PLAYING; } else { return mCurrentState; Loading