Update IjkVideoView.java

pull/137/head
FongMi 3 years ago
parent b49dba0943
commit dd63a740a2
  1. 3
      ijkplayer/src/main/java/tv/danmaku/ijk/media/player/ui/IjkVideoView.java

@ -360,7 +360,6 @@ public class IjkVideoView extends FrameLayout implements MediaController.MediaPl
public void selectTrack(int type, int track) {
int selected = getSelectedTrack(type);
long position = getCurrentPosition();
boolean text = type == ITrackInfo.MEDIA_TRACK_TYPE_TEXT;
List<ITrackInfo> trackInfos = getTrackInfo();
for (int index = 0; index < trackInfos.size(); index++) {
ITrackInfo trackInfo = trackInfos.get(index);
@ -369,7 +368,7 @@ public class IjkVideoView extends FrameLayout implements MediaController.MediaPl
mSubtitleView.setCues(null);
mPlayer.selectTrack(index);
updateForCurrentTrackSelections();
if (text && position > 0) seekTo(position);
if (position > 0) seekTo(position);
}
}
}

Loading…
Cancel
Save