| | |
| | | import com.weikou.beibeivideo.entity.VideoDetailInfo; |
| | | import com.weikou.beibeivideo.entity.VideoInfo; |
| | | import com.weikou.beibeivideo.entity.VideoResource; |
| | | import com.weikou.beibeivideo.entity.video.ChangeVideoEvent; |
| | | import com.weikou.beibeivideo.ui.BaseActivity; |
| | | import com.weikou.beibeivideo.ui.ad.PlayVideoPreADFragment; |
| | | import com.weikou.beibeivideo.ui.common.ShareActivity; |
| | | import com.weikou.beibeivideo.ui.mine.FXBrowserActivity; |
| | | import com.weikou.beibeivideo.ui.video.VideoPlayerBrowserActivity; |
| | | import com.weikou.beibeivideo.ui.video.VideoPlayerActivity; |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | | import com.weikou.beibeivideo.util.VideoUtil; |
| | |
| | | public void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | | setContentView(R.layout.video_detail_activity); |
| | | VideoUtil.videoEpisodeList.clear(); |
| | | VideoUtil.clearVideoEpisodeList(this); |
| | | /* |
| | | * 计算状态栏高度并设置 |
| | | */ |
| | |
| | | return; |
| | | } else if (playUrl.getPlayType() == 1) { |
| | | Intent intent = new Intent(VideoDetailActivity.this, |
| | | FXBrowserActivity.class); |
| | | VideoPlayerBrowserActivity.class); |
| | | intent.putExtra("url", playUrl.getUrl()); |
| | | startActivity(intent); |
| | | saveWatchHistory("风行"); |
| | |
| | | new TypeToken<VideoInfo>() { |
| | | }.getType()); |
| | | if (videoInfo != null) { |
| | | VideoUtil.videoEpisodeList.clear(); |
| | | VideoUtil.videoEpisodeList.addAll(videoInfo.getVideoDetailList()); |
| | | VideoUtil.saveVideoEpisodeList(BeibeiVideoApplication.application,videoInfo.getVideoDetailList(),false); |
| | | } |
| | | // 附加字段 |
| | | if (jsonObject.optJSONObject("Extra1") != null) { |
| | |
| | | .optString("Aid")); |
| | | info.setVid(jsonObject.getJSONObject("Data") |
| | | .optString("Vid")); |
| | | info.setCode(jsonObject.getJSONObject("Data") |
| | | .optString("Code")); |
| | | playUrl = info; |
| | | if (videoInfo == null) { |
| | | return; |
| | |
| | | checkConfiguration(getResources().getConfiguration()); |
| | | } |
| | | |
| | | public static class ChangeVideoEvent { |
| | | private VideoInfo videoInfo; |
| | | |
| | | private String tag; |
| | | |
| | | public VideoInfo getVideoInfo() { |
| | | return videoInfo; |
| | | } |
| | | |
| | | public void setVideoInfo(VideoInfo videoInfo) { |
| | | this.videoInfo = videoInfo; |
| | | } |
| | | |
| | | public String getTag() { |
| | | return tag; |
| | | } |
| | | |
| | | public void setTag(String tag) { |
| | | this.tag = tag; |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onClick(View v) { |