Skip to content

Commit d49ea7f

Browse files
Teng-Hui ZhuAndroid (Google) Code Review
authored andcommitted
Merge "Don't allow enter full screen while still in full screen mode."
2 parents 5f3b32c + 2b64c5a commit d49ea7f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/java/android/webkit/HTML5VideoViewProxy.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ public static void enterFullScreenVideo(int layerId, String url,
146146
// Save the inline video info and inherit it in the full screen
147147
int savePosition = 0;
148148
if (mHTML5VideoView != null) {
149+
// We don't allow enter full screen mode while the previous
150+
// full screen video hasn't finished yet.
151+
if (!mHTML5VideoView.fullScreenExited() && mHTML5VideoView.isFullScreenMode()) {
152+
Log.w(LOGTAG, "Try to reenter the full screen mode");
153+
return;
154+
}
149155
// If we are playing the same video, then it is better to
150156
// save the current position.
151157
if (layerId == mHTML5VideoView.getVideoLayerId()) {

0 commit comments

Comments
 (0)