Skip to content

Commit 9ac3204

Browse files
Teng-Hui ZhuAndroid (Google) Code Review
authored andcommitted
Merge "Keep the controller when video ended." into jb-dev
2 parents 6df5ca0 + 4dd9dc8 commit 9ac3204

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

core/java/android/webkit/HTML5VideoFullScreen.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public void onPrepared(MediaPlayer mp) {
198198
// after reading the MetaData
199199
if (mMediaController != null) {
200200
mMediaController.setEnabled(true);
201+
mMediaController.show();
201202
}
202203

203204
if (mProgressView != null) {
@@ -320,6 +321,11 @@ public int getBufferPercentage() {
320321
return 0;
321322
}
322323

324+
@Override
325+
public void showControllerInFullScreen() {
326+
mMediaController.show(0);
327+
}
328+
323329
// Other listeners functions:
324330
private MediaPlayer.OnBufferingUpdateListener mBufferingUpdateListener =
325331
new MediaPlayer.OnBufferingUpdateListener() {

core/java/android/webkit/HTML5VideoView.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,4 +357,7 @@ public boolean getStartWhenPrepared() {
357357
return mStartWhenPrepared;
358358
}
359359

360+
public void showControllerInFullScreen() {
361+
}
362+
360363
}

core/java/android/webkit/HTML5VideoViewProxy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ public static void onPrepared() {
279279
}
280280

281281
public static void end() {
282+
mHTML5VideoView.showControllerInFullScreen();
282283
if (mCurrentProxy != null) {
283284
if (isVideoSelfEnded)
284285
mCurrentProxy.dispatchOnEnded();

0 commit comments

Comments
 (0)