Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 6cca314

Browse files
committed
[Bug 16368] Make sure hiding an android player hides the controller, if any.
Similarly, showing the player should show the controller, if showController==true
1 parent d8f2395 commit 6cca314

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

engine/src/java/com/runrev/android/nativecontrol/ExtVideoView.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,17 @@ else if (mFdWithOffset)
308308
return;
309309
}
310310
}
311+
312+
// PM-2015-11-05: [[ Bug 16368 ]] Toggling the visibility of the android player should show/hide the controller (if any)
313+
public void setControllerVisible(boolean p_visible)
314+
{
315+
if (mMediaController != null ){
316+
if (p_visible)
317+
mMediaController.show(0);
318+
else
319+
mMediaController.hide();
320+
}
321+
}
311322

312323
public void setMediaController(MediaController controller) {
313324
if (mMediaController != null) {

engine/src/java/com/runrev/android/nativecontrol/VideoControl.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,15 @@ public void setShowController(boolean show)
163163
else
164164
m_video_view.setMediaController(null);
165165
}
166-
166+
167+
// PM-2015-11-05: [[ Bug 16368 ]] Toggling the visibility of the android player should show/hide the controller (if any)
168+
// Override setVisible() of NativeControl
169+
public void setVisible(boolean p_visible)
170+
{
171+
m_video_view.setControllerVisible(p_visible);
172+
super.setVisible(p_visible);
173+
}
174+
167175
public void setCurrentTime(int msec)
168176
{
169177
m_video_view.seekTo(msec);

0 commit comments

Comments
 (0)