Commit f32afe5e authored by Edward Wang's avatar Edward Wang
Browse files

VideoPlayerActivity: hack to fix lost overlay controls

DVDs are not the only type of media that can contain titles and chapters.

But most other media only have one title (e.g. MKVs) unlike DVDs, so don't hide the overlay for normal files.

A better solution is a button to simply select the title/chapter desired and would work with both DVD and normal media.
parent ade47496
......@@ -2229,9 +2229,16 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
private void updateNavStatus() {
mHasChapters = mLibVLC.getChapterCountForTitle(0) > 1;
mIsNavMenu = mHasChapters && mLibVLC.getTitle() == 0;
mIsNavMenu = mHasChapters && mLibVLC.getTitle() == 0 && mLibVLC.getTitleCount() > 1;
/***
* HACK ALERT: assume that any media with >1 titles = DVD with menus
* Should be replaced with a more robust title/chapter selection popup
*/
Log.e(TAG, "UpdateNavStatus: " + mHasChapters + " " + mIsNavMenu);
Log.d(TAG,
"updateNavStatus: getChapterCountForTitle(0) = "
+ mLibVLC.getChapterCountForTitle(0)
+ ", getTitleCount() = " + mLibVLC.getTitleCount());
if (mIsNavMenu) {
/*
* Keep the overlay hidden in order to have touch events directly
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment