|
|
|
|
@ -359,6 +359,7 @@ public class LivePlayActivity extends BaseActivity { |
|
|
|
|
}); |
|
|
|
|
initEpgDateView(); |
|
|
|
|
initEpgListView(); |
|
|
|
|
initDayList(); |
|
|
|
|
initVideoView(); |
|
|
|
|
initChannelGroupView(); |
|
|
|
|
initLiveChannelView(); |
|
|
|
|
@ -366,7 +367,6 @@ public class LivePlayActivity extends BaseActivity { |
|
|
|
|
initSettingItemView(); |
|
|
|
|
initLiveChannelList(); |
|
|
|
|
initLiveSettingGroupList(); |
|
|
|
|
initDayList(); |
|
|
|
|
} |
|
|
|
|
//获取EPG并存储 // 百川epg DIYP epg 51zmt epg ------- 自建EPG格式输出格式请参考 51zmt
|
|
|
|
|
private List<Epginfo> epgdata = new ArrayList<>(); |
|
|
|
|
@ -925,7 +925,7 @@ public class LivePlayActivity extends BaseActivity { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onItemClick(TvRecyclerView parent, View itemView, int position) { |
|
|
|
|
epgListAdapter.setSelectedEpgIndex(position); |
|
|
|
|
|
|
|
|
|
Date date = liveEpgDateAdapter.getSelectedIndex() < 0 ? new Date() : |
|
|
|
|
liveEpgDateAdapter.getData().get(liveEpgDateAdapter.getSelectedIndex()).getDateParamVal(); |
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); |
|
|
|
|
@ -935,6 +935,10 @@ public class LivePlayActivity extends BaseActivity { |
|
|
|
|
String shiyiStartdate = targetDate + selectedData.originStart.replace(":", "") + "30"; |
|
|
|
|
String shiyiEnddate = targetDate + selectedData.originEnd.replace(":", "") + "30"; |
|
|
|
|
Date now = new Date(); |
|
|
|
|
if(new Date().compareTo(selectedData.startdateTime) < 0){ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
epgListAdapter.setSelectedEpgIndex(position); |
|
|
|
|
if (now.compareTo(selectedData.startdateTime) >= 0 && now.compareTo(selectedData.enddateTime) <= 0) { |
|
|
|
|
mVideoView.release(); |
|
|
|
|
isSHIYI = false; |
|
|
|
|
@ -998,7 +1002,6 @@ public class LivePlayActivity extends BaseActivity { |
|
|
|
|
epgListAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { |
|
|
|
|
@Override |
|
|
|
|
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { |
|
|
|
|
epgListAdapter.setSelectedEpgIndex(position); |
|
|
|
|
Date date = liveEpgDateAdapter.getSelectedIndex() < 0 ? new Date() : |
|
|
|
|
liveEpgDateAdapter.getData().get(liveEpgDateAdapter.getSelectedIndex()).getDateParamVal(); |
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); |
|
|
|
|
@ -1008,6 +1011,10 @@ public class LivePlayActivity extends BaseActivity { |
|
|
|
|
String shiyiStartdate = targetDate + selectedData.originStart.replace(":", "") + "30"; |
|
|
|
|
String shiyiEnddate = targetDate + selectedData.originEnd.replace(":", "") + "30"; |
|
|
|
|
Date now = new Date(); |
|
|
|
|
if(new Date().compareTo(selectedData.startdateTime) < 0){ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
epgListAdapter.setSelectedEpgIndex(position); |
|
|
|
|
if (now.compareTo(selectedData.startdateTime) >= 0 && now.compareTo(selectedData.enddateTime) <= 0) { |
|
|
|
|
mVideoView.release(); |
|
|
|
|
isSHIYI = false; |
|
|
|
|
@ -1059,6 +1066,7 @@ public class LivePlayActivity extends BaseActivity { |
|
|
|
|
sBar = (SeekBar) findViewById(R.id.pb_progressbar); |
|
|
|
|
sBar.setMax(shiyi_time_c*1000); |
|
|
|
|
sBar.setProgress((int) mVideoView.getCurrentPosition()); |
|
|
|
|
// long dd = mVideoView.getDuration();
|
|
|
|
|
tv_currentpos.setText(durationToString((int)mVideoView.getCurrentPosition())); |
|
|
|
|
tv_duration.setText(durationToString(shiyi_time_c*1000)); |
|
|
|
|
showProgressBars(true); |
|
|
|
|
|