Skip to content

Commit

Permalink
修复片尾时间设置的问题
Browse files Browse the repository at this point in the history
不同集数时间不同按正片设置片尾时间,会导致跳过片尾不正确
  • Loading branch information
sayxiaoyan authored Sep 14, 2024
1 parent 06bfe75 commit 2820da6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ public void onClick(View view) {
int current = (int) mControlWrapper.getCurrentPosition();
int duration = (int) mControlWrapper.getDuration();
if (current < duration / 2) return;
mPlayerConfig.put("et", current / 1000);
mPlayerConfig.put("et", (duration - current) / 1000);

updatePlayerCfgView();
listener.updatePlayerCfg();
Expand Down Expand Up @@ -1133,7 +1133,7 @@ protected void setProgress(int duration, int position) {
} catch (JSONException e) {
e.printStackTrace();
}
if (et > 0 && (position / 1000) >= et) {
if (et > 0 && position + (et * 1000) >= duration) {
skipEnd = false;
listener.playNext(true);
}
Expand Down

0 comments on commit 2820da6

Please sign in to comment.