修正重播 修正播放页缓冲速度遮挡问题 修正分类筛选过多时显示不全 其他细节调整

pull/43/head^2
于俊 4 years ago
parent 1f1e2e6bff
commit 6c920762d6
  1. 2
      .idea/misc.xml
  2. 2
      app/src/main/java/com/github/tvbox/osc/api/ApiConfig.java
  3. 8
      app/src/main/java/com/github/tvbox/osc/player/controller/VodController.java
  4. 3
      app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java
  5. 9
      app/src/main/java/com/github/tvbox/osc/ui/activity/PlayActivity.java
  6. 2
      app/src/main/java/com/github/tvbox/osc/ui/dialog/ApiDialog.java
  7. 9
      app/src/main/java/com/github/tvbox/osc/ui/fragment/PlayFragment.java
  8. 4
      app/src/main/java/com/github/tvbox/osc/util/PlayerHelper.java
  9. 2
      app/src/main/res/layout/dialog_grid_filter.xml
  10. 52
      app/src/main/res/layout/fragment_model.xml

@ -12,12 +12,14 @@
<entry key="..\:/tvbox/TVBoxOS/app/src/main/layout/activity_live_play.xml" value="0.1" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/drawable/box_controller_top_bg.xml" value="0.2455" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_detail.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_history.xml" value="0.2859375" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_home.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_live_play.xml" value="0.3369894099848714" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_play.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_search.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_setting.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/box_vod_control_view.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/dialog_api.xml" value="0.3385416666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/dialog_api_history.xml" value="0.19708029197080293" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/dialog_grid_filter.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/dialog_quick_search.xml" value="0.18449694717281656" />

@ -264,7 +264,7 @@ public class ApiConfig {
// 需要使用vip解析的flag
vipParseFlags = DefaultConfig.safeJsonStringList(infoJson, "flags");
// 解析地址
parseBeanList = new ArrayList<>();
parseBeanList.clear();
for (JsonElement opt : infoJson.get("parses").getAsJsonArray()) {
JsonObject obj = (JsonObject) opt;
ParseBean pb = new ParseBean();

@ -124,11 +124,11 @@ public class VodController extends BaseController {
@Override
public void run() {
Date date = new Date();
SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
mPlayPauseTime.setText(timeFormat.format(date));
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
String speed = PlayerHelper.getDisplaySpeed(mControlWrapper.getTcpSpeed());
mPlayPauseTime.setText(speed + " " + timeFormat.format(date));
mPlayLoadNetSpeed.setText(PlayerHelper.getDisplaySpeed(mControlWrapper.getTcpSpeed()));
String width = Integer.toString(mControlWrapper.getVideoSize()[0]);
String height = Integer.toString(mControlWrapper.getVideoSize()[1]);
mVideoSize.setText("[ " + width + " X " + height +" ]");
@ -657,7 +657,7 @@ public class VodController extends BaseController {
break;
case VideoView.STATE_PREPARING:
case VideoView.STATE_BUFFERING:
mPlayLoadNetSpeed.setVisibility(VISIBLE);
if(mProgressRoot.getVisibility()==GONE)mPlayLoadNetSpeed.setVisibility(VISIBLE);
break;
case VideoView.STATE_PLAYBACK_COMPLETED:
listener.playNext(true);

@ -172,6 +172,7 @@ public class DetailActivity extends BaseActivity {
mGridViewFlag.setAdapter(seriesFlagAdapter);
isReverse = false;
firstReverse = false;
preFlag = "";
if (showPreview) {
playFragment = new PlayFragment();
getSupportFragmentManager().beginTransaction().add(R.id.previewPlayer, playFragment).commit();
@ -343,7 +344,7 @@ public class DetailActivity extends BaseActivity {
reload = true;
}
//解决当前集不刷新的BUG
if (!vodInfo.playFlag.equals(preFlag)) {
if (!preFlag.isEmpty() && !vodInfo.playFlag.equals(preFlag)) {
reload = true;
}

@ -317,11 +317,11 @@ public class PlayActivity extends BaseActivity {
}
} catch (Throwable th) {
// errorWithRetry("获取播放信息错误", true);
Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show();
// Toast.makeText(mContext, "获取播放信息错误1", Toast.LENGTH_SHORT).show();
}
} else {
// errorWithRetry("获取播放信息错误", true);
Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show();
errorWithRetry("获取播放信息错误", true);
// Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show();
}
}
});
@ -474,7 +474,8 @@ public class PlayActivity extends BaseActivity {
String playTitleInfo = mVodInfo.name + " " + vs.name;
mController.setTitle(playTitleInfo);
// playUrl(null, null);
stopParse();
if(mVideoView!=null) mVideoView.release();
String progressKey = mVodInfo.sourceKey + mVodInfo.id + mVodInfo.playFlag + mVodInfo.playIndex;
//存储播放进度
Object bodyKey=CacheManager.getCache(MD5.string2MD5(progressKey));

@ -61,7 +61,7 @@ public class ApiDialog extends BaseDialog {
@Override
public void onClick(View v) {
String newApi = inputApi.getText().toString().trim();
if (!newApi.isEmpty() && (newApi.startsWith("http") || newApi.startsWith("clan"))) {
if (!newApi.isEmpty()) {
ArrayList<String> history = Hawk.get(HawkConfig.API_HISTORY, new ArrayList<String>());
if (!history.contains(newApi))
history.add(0, newApi);

@ -315,11 +315,11 @@ public class PlayFragment extends BaseLazyFragment {
}
} catch (Throwable th) {
// errorWithRetry("获取播放信息错误", true);
Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show();
// Toast.makeText(mContext, "获取播放信息错误1", Toast.LENGTH_SHORT).show();
}
} else {
// errorWithRetry("获取播放信息错误", true);
Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show();
errorWithRetry("获取播放信息错误", true);
// Toast.makeText(mContext, "获取播放信息错误", Toast.LENGTH_SHORT).show();
}
}
});
@ -486,7 +486,8 @@ public class PlayFragment extends BaseLazyFragment {
String playTitleInfo = mVodInfo.name + " " + vs.name;
mController.setTitle(playTitleInfo);
// playUrl(null, null);
stopParse();
if(mVideoView!=null) mVideoView.release();
String progressKey = mVodInfo.sourceKey + mVodInfo.id + mVodInfo.playFlag + mVodInfo.playIndex;
//存储播放进度
Object bodyKey=CacheManager.getCache(MD5.string2MD5(progressKey));

@ -187,9 +187,9 @@ public class PlayerHelper {
public static String getDisplaySpeed(long speed) {
if(speed > 1048576)
return (speed / 1048576) + "MB/s";
return (speed / 1048576) + "Mb/s";
else if(speed > 1024)
return (speed / 1024) + "KB/s";
return (speed / 1024) + "Kb/s";
else
return speed > 0?speed + "B/s":"";
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:minHeight="200dp"
android:minHeight="260dp"
android:layout_height="match_parent">
<LinearLayout

@ -604,11 +604,11 @@
android:orientation="horizontal">
<LinearLayout
android:id="@+id/llScale"
android:id="@+id/llWp"
android:layout_width="@dimen/vs_0"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/vs_5"
android:layout_marginLeft="@dimen/vs_5"
android:layout_marginEnd="@dimen/vs_5"
android:layout_marginRight="@dimen/vs_5"
android:layout_weight="1"
android:background="@drawable/shape_setting_model_focus"
android:focusable="true"
@ -620,7 +620,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="画面缩放"
android:text="换张壁纸"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
@ -629,13 +629,6 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/tvScaleType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -647,7 +640,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/showPreview"
android:id="@+id/llWpRecovery"
android:layout_width="@dimen/vs_0"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/vs_5"
@ -663,7 +656,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="窗口预览"
android:text="重置壁纸"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
@ -672,13 +665,6 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/showPreviewText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -693,14 +679,14 @@
<LinearLayout
android:layout_width="@dimen/vs_0"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/vs_5"
android:layout_marginRight="@dimen/vs_5"
android:layout_marginStart="@dimen/vs_5"
android:layout_marginLeft="@dimen/vs_5"
android:layout_weight="1"
android:focusable="false"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/llWp"
android:id="@+id/llScale"
android:layout_width="@dimen/vs_0"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/vs_5"
@ -716,7 +702,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="换张壁纸"
android:text="画面缩放"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
@ -725,6 +711,13 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/tvScaleType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -736,7 +729,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/llWpRecovery"
android:id="@+id/showPreview"
android:layout_width="@dimen/vs_0"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/vs_5"
@ -752,7 +745,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="重置壁纸"
android:text="窗口预览"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
@ -761,6 +754,13 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/showPreviewText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

Loading…
Cancel
Save