@@ -147,29 +147,34 @@ public static void enterFullScreenVideo(int layerId, String url,
147147 // Save the inline video info and inherit it in the full screen
148148 int savePosition = 0 ;
149149 boolean canSkipPrepare = false ;
150+ boolean forceStart = false ;
150151 if (mHTML5VideoView != null ) {
151152 // We don't allow enter full screen mode while the previous
152153 // full screen video hasn't finished yet.
153154 if (!mHTML5VideoView .fullScreenExited () && mHTML5VideoView .isFullScreenMode ()) {
154155 Log .w (LOGTAG , "Try to reenter the full screen mode" );
155156 return ;
156157 }
158+ int playerState = mHTML5VideoView .getCurrentState ();
157159 // If we are playing the same video, then it is better to
158160 // save the current position.
159161 if (layerId == mHTML5VideoView .getVideoLayerId ()) {
160162 savePosition = mHTML5VideoView .getCurrentPosition ();
161- int playerState = mHTML5VideoView .getCurrentState ();
162163 canSkipPrepare = (playerState == HTML5VideoView .STATE_PREPARING
163164 || playerState == HTML5VideoView .STATE_PREPARED
164165 || playerState == HTML5VideoView .STATE_PLAYING )
165166 && !mHTML5VideoView .isFullScreenMode ();
166167 }
167168 if (!canSkipPrepare ) {
168169 mHTML5VideoView .reset ();
170+ } else {
171+ forceStart = playerState == HTML5VideoView .STATE_PREPARING
172+ || playerState == HTML5VideoView .STATE_PLAYING ;
169173 }
170174 }
171175 mHTML5VideoView = new HTML5VideoFullScreen (proxy .getContext (),
172176 layerId , savePosition , canSkipPrepare );
177+ mHTML5VideoView .setStartWhenPrepared (forceStart );
173178 mCurrentProxy = proxy ;
174179 mHTML5VideoView .setVideoURI (url , mCurrentProxy );
175180 mHTML5VideoView .enterFullScreenVideoState (layerId , proxy , webView );
0 commit comments