| | |
| | | import com.weikou.beibeivideo.ui.video.FunshionPlayerFragment; |
| | | import com.weikou.beibeivideo.ui.video.VideoPlayerActivity; |
| | | import com.weikou.beibeivideo.util.BeibeiConstant; |
| | | import com.weikou.beibeivideo.util.UmengEventUtil; |
| | | import com.weikou.beibeivideo.util.VideoUtil; |
| | | import com.weikou.beibeivideo.util.ad.FullVideoAdManager; |
| | | import com.weikou.beibeivideo.util.ui.IPageEventListener; |
| | |
| | | |
| | | private boolean playerLock;//播放器是否锁屏 |
| | | |
| | | private String from; |
| | | |
| | | @Override |
| | | protected void onSaveInstanceState(Bundle outState) { |
| | | outState.putString("flash exit", "VideoDetailActivity"); |
| | |
| | | "video_info"); |
| | | if (videoInfo != null) |
| | | videoInfo.setVideoDetailList(null); |
| | | |
| | | from = getIntent().getStringExtra("from"); |
| | | UmengEventUtil.videoDetail(getApplicationContext(), from); |
| | | |
| | | if (getIntent().getBooleanExtra("isFromWatchHistory", false)) { |
| | | Cursor cursor = getContentResolver().query( |
| | | WatchHistoryTable.CONTENT_URI, null, |
| | |
| | | if (!progressDialog.isShowing()) { |
| | | progressDialog.show(); |
| | | } |
| | | getVideoDetail(this, videoInfo.getId(), videoInfo.getThirdType(), false); |
| | | getVideoDetail(this, videoInfo.getId(), videoInfo.getThirdType(), false, changeVideoEvent.getFrom()); |
| | | } |
| | | |
| | | public void onEventMainThread(Play info) { |
| | |
| | | } |
| | | |
| | | private void getVideoDetail(final Context context, String videoId, |
| | | String videoThirdType, final boolean isSetup) { |
| | | String videoThirdType, final boolean isSetup, final String fromName) { |
| | | int position = getIntent().getIntExtra( |
| | | "playing_position", 0); |
| | | SharedPreferences preferences = context.getSharedPreferences("user", |
| | |
| | | String uid = preferences.getString("uid", ""); |
| | | String loginid = preferences.getString("LoginUid", ""); |
| | | BeibeiVideoAPI.getVideoDetail(context, uid, resourceId, videoId, position, loginid, |
| | | videoThirdType, new BasicTextHttpResponseHandler() { |
| | | videoThirdType, fromName, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | JSONObject data = jsonObject.optJSONObject("Data"); |
| | | boolean pptv = data.optBoolean("pptv", false); |
| | | if (pptv) { |
| | | UmengEventUtil.pptvPlay(getApplicationContext()); |
| | | String playUrl = data.optString("playUrl"); |
| | | fl_pptv.setVisibility(View.VISIBLE); |
| | | ll_other.setVerticalGravity(View.GONE); |
| | |
| | | if (VideoUtil.videoEpisodeList == null |
| | | || VideoUtil.videoEpisodeList.isEmpty()) { |
| | | getVideoDetail(this, videoInfo.getId(), videoInfo.getThirdType(), |
| | | true); |
| | | true, from); |
| | | } else { |
| | | findViewById(android.R.id.content).postDelayed(new Runnable() { |
| | | |