Loading core/java/android/webkit/HTML5VideoFullScreen.java +7 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,13 @@ 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); Loading core/java/android/webkit/HTML5VideoInline.java +3 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,10 @@ public class HTML5VideoInline extends HTML5VideoView{ // Video control FUNCTIONS: @Override public void start() { if (!getPauseDuringPreparing()) { super.start(); } } HTML5VideoInline(int videoLayerId, int position, boolean autoStart) { Loading core/java/android/webkit/HTML5VideoView.java +15 −6 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ // The spec says the timer should fire every 250 ms or less. private static final int TIMEUPDATE_PERIOD = 250; // ms protected boolean mPauseDuringPreparing; // common Video control FUNCTIONS: public void start() { if (mCurrentState == STATE_PREPARED) { Loading @@ -83,8 +84,9 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ public void pause() { if (mCurrentState == STATE_PREPARED && mPlayer.isPlaying()) { mPlayer.pause(); } else if (mCurrentState == STATE_NOTPREPARED) { mPauseDuringPreparing = true; } // Delete the Timer to stop it since there is no stop call. if (mTimer != null) { mTimer.purge(); Loading Loading @@ -133,6 +135,10 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ return mAutostart; } public boolean getPauseDuringPreparing() { return mPauseDuringPreparing; } // Every time we start a new Video, we create a VideoView and a MediaPlayer public void init(int videoLayerId, int position, boolean autoStart) { mPlayer = new MediaPlayer(); Loading @@ -142,6 +148,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ mSaveSeekTime = position; mAutostart = autoStart; mTimer = null; mPauseDuringPreparing = false; } protected HTML5VideoView() { Loading Loading @@ -242,17 +249,19 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ if (mProxy != null) { mProxy.onPrepared(mp); } if (mPauseDuringPreparing) { pauseAndDispatch(mProxy); mPauseDuringPreparing = false; } } // Pause the play and update the play/pause button public void pauseAndDispatch(HTML5VideoViewProxy proxy) { if (isPlaying()) { pause(); if (proxy != null) { proxy.dispatchOnPaused(); } } } // Below are functions that are different implementation on inline and full- // screen mode. Some are specific to one type, but currently are called Loading core/java/android/webkit/HTML5VideoViewProxy.java +2 −4 Original line number Diff line number Diff line Loading @@ -224,9 +224,7 @@ class HTML5VideoViewProxy extends Handler } public static void onPrepared() { if (!mHTML5VideoView.isFullScreenMode() || mHTML5VideoView.isFullScreenMode() && mHTML5VideoView.getAutostart() ) // The VideoView will decide whether to really kick off to play. mHTML5VideoView.start(); if (mBaseLayer != 0) { setBaseLayer(mBaseLayer); Loading Loading
core/java/android/webkit/HTML5VideoFullScreen.java +7 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,13 @@ 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); Loading
core/java/android/webkit/HTML5VideoInline.java +3 −1 Original line number Diff line number Diff line Loading @@ -20,8 +20,10 @@ public class HTML5VideoInline extends HTML5VideoView{ // Video control FUNCTIONS: @Override public void start() { if (!getPauseDuringPreparing()) { super.start(); } } HTML5VideoInline(int videoLayerId, int position, boolean autoStart) { Loading
core/java/android/webkit/HTML5VideoView.java +15 −6 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ // The spec says the timer should fire every 250 ms or less. private static final int TIMEUPDATE_PERIOD = 250; // ms protected boolean mPauseDuringPreparing; // common Video control FUNCTIONS: public void start() { if (mCurrentState == STATE_PREPARED) { Loading @@ -83,8 +84,9 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ public void pause() { if (mCurrentState == STATE_PREPARED && mPlayer.isPlaying()) { mPlayer.pause(); } else if (mCurrentState == STATE_NOTPREPARED) { mPauseDuringPreparing = true; } // Delete the Timer to stop it since there is no stop call. if (mTimer != null) { mTimer.purge(); Loading Loading @@ -133,6 +135,10 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ return mAutostart; } public boolean getPauseDuringPreparing() { return mPauseDuringPreparing; } // Every time we start a new Video, we create a VideoView and a MediaPlayer public void init(int videoLayerId, int position, boolean autoStart) { mPlayer = new MediaPlayer(); Loading @@ -142,6 +148,7 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ mSaveSeekTime = position; mAutostart = autoStart; mTimer = null; mPauseDuringPreparing = false; } protected HTML5VideoView() { Loading Loading @@ -242,17 +249,19 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener{ if (mProxy != null) { mProxy.onPrepared(mp); } if (mPauseDuringPreparing) { pauseAndDispatch(mProxy); mPauseDuringPreparing = false; } } // Pause the play and update the play/pause button public void pauseAndDispatch(HTML5VideoViewProxy proxy) { if (isPlaying()) { pause(); if (proxy != null) { proxy.dispatchOnPaused(); } } } // Below are functions that are different implementation on inline and full- // screen mode. Some are specific to one type, but currently are called Loading
core/java/android/webkit/HTML5VideoViewProxy.java +2 −4 Original line number Diff line number Diff line Loading @@ -224,9 +224,7 @@ class HTML5VideoViewProxy extends Handler } public static void onPrepared() { if (!mHTML5VideoView.isFullScreenMode() || mHTML5VideoView.isFullScreenMode() && mHTML5VideoView.getAutostart() ) // The VideoView will decide whether to really kick off to play. mHTML5VideoView.start(); if (mBaseLayer != 0) { setBaseLayer(mBaseLayer); Loading