| | |
| | | |
| | | private void getVideoDetail(final Context context, String videoId, |
| | | String videoThirdType, final boolean isSetup) { |
| | | int position = getIntent().getIntExtra( |
| | | "playing_position", 0); |
| | | SharedPreferences preferences = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE); |
| | | String uid = preferences.getString("uid", ""); |
| | | String loginid = preferences.getString("LoginUid", ""); |
| | | BeibeiVideoAPI.getVideoDetail(context, uid, resourceId, videoId, loginid, |
| | | BeibeiVideoAPI.getVideoDetail(context, uid, resourceId, videoId, position, loginid, |
| | | videoThirdType, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | |
| | | JSONObject data = jsonObject.optJSONObject("Data"); |
| | | boolean pptv = data.optBoolean("pptv", false); |
| | | if (pptv) { |
| | | String playUrl = data.optString("playUrl"); |
| | | fl_pptv.setVisibility(View.VISIBLE); |
| | | ll_other.setVerticalGravity(View.GONE); |
| | | getSupportFragmentManager().beginTransaction().replace(R.id.fl_pptv, new PPTVPlayFragment()).commit(); |
| | | PPTVPlayFragment pptvPlayFragment = new PPTVPlayFragment(); |
| | | Bundle bundle = new Bundle(); |
| | | bundle.putString("playUrl", playUrl); |
| | | bundle.putString("videoId",data.optString("videoId")); |
| | | pptvPlayFragment.setArguments(bundle); |
| | | getSupportFragmentManager().beginTransaction().replace(R.id.fl_pptv, pptvPlayFragment).commit(); |
| | | if (progressDialog.isShowing()) { |
| | | progressDialog.dismiss(); |
| | | } |