| | |
| | | import com.bytedance.sdk.openadsdk.TTAdSdk; |
| | | import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd; |
| | | import com.bytedance.sdk.openadsdk.TTNativeExpressAd; |
| | | import com.funshion.video.parser.FunshionWebPlayerFragment; |
| | | import com.google.gson.FieldNamingPolicy; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | } |
| | | |
| | | } else if (playUrl.getResource().getName().contains("风行")) { |
| | | |
| | | if (playUrl.getPlayType() == 0) { |
| | | Toast.makeText(VideoDetailActivity2.this, "此节目不可播!", |
| | | Toast.LENGTH_LONG).show(); |
| | |
| | | } else if (playUrl.getPlayType() == 2) {//SDK播放 |
| | | //播放风行视频 |
| | | //添加风行播放页 |
| | | mFunshionPlayerFragment = new FunshionPlayerFragment(); |
| | | Bundle bundle = new Bundle(); |
| | | bundle.putSerializable("videoInfo", videoInfo); |
| | | bundle.putSerializable("playUrl", playUrl); |
| | | bundle.putInt("position", mPosition); |
| | | bundle.putBoolean("collect", false); |
| | | bundle.putSerializable("resource", resource); |
| | | mFunshionPlayerFragment.setArguments(bundle); |
| | | if (!mFunshionPlayerFragment.isAdded()) { |
| | | getSupportFragmentManager().beginTransaction().replace(R.id.fragment_video_play_container, mFunshionPlayerFragment).commit(); |
| | | } |
| | | fl_video_play_background.setVisibility(View.GONE); |
| | | // mFunshionPlayerFragment = new FunshionPlayerFragment(); |
| | | // Bundle bundle = new Bundle(); |
| | | // bundle.putSerializable("videoInfo", videoInfo); |
| | | // bundle.putSerializable("playUrl", playUrl); |
| | | // bundle.putInt("position", mPosition); |
| | | // bundle.putBoolean("collect", false); |
| | | // bundle.putSerializable("resource", resource); |
| | | // mFunshionPlayerFragment.setArguments(bundle); |
| | | // if (!mFunshionPlayerFragment.isAdded()) { |
| | | // getSupportFragmentManager().beginTransaction().replace(R.id.fragment_video_play_container, mFunshionPlayerFragment).commit(); |
| | | // } |
| | | // fl_video_play_background.setVisibility(View.GONE); |
| | | |
| | | |
| | | // 风行网页播放器 |
| | | // iv_select_play.setVisibility(View.GONE); |
| | | // iv_background.setClickable(false); |
| | | // hideImage(); |
| | | // getSupportFragmentManager().beginTransaction().replace(R.id.fragment_video_play_container, new FunshionWebPlayerFragment("测试标题", "http://www.fun.tv/vplay/g-1018345/")).commit(); |
| | | // return; |
| | | } |
| | | |
| | | } else { |
| | |
| | | Log.i(TAG, "clickBack"); |
| | | setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); |
| | | findViewById(R.id.fl_video_detail).setVisibility(View.VISIBLE); |
| | | fl_video_play_background.setVisibility(View.VISIBLE); |
| | | iv_select_play.setVisibility(View.VISIBLE); |
| | | |
| | | // fl_video_play_background.setVisibility(View.VISIBLE); |
| | | // iv_select_play.setVisibility(View.VISIBLE); |
| | | try { |
| | | Glide.with(getApplicationContext()).load(R.drawable.ic_select_play) |
| | | .into(iv_select_play); |
| | |
| | | (int) ((SystemCommon.getScreenWidth(this) * 9) / 16)); |
| | | findViewById(R.id.fragment_video_play_container1).setLayoutParams( |
| | | params); |
| | | |
| | | if (playUrl != null && playUrl.getResource().getName().contains("爱奇艺")) { |
| | | iv_background.setClickable(true); |
| | | if (mIQYVideoPlayerFragment != null) |
| | |
| | | if (newConfig == null) |
| | | return; |
| | | if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {//横屏 |
| | | tv_back.setVisibility(View.GONE); |
| | | findViewById(R.id.fl_video_detail).setVisibility(View.GONE); |
| | | findViewById(R.id.v_status_bar).setVisibility(View.GONE); |
| | | ViewGroup.LayoutParams params1 = findViewById(R.id.v_status_bar).getLayoutParams(); |
| | |
| | | if (mFunshionPlayerFragment != null) |
| | | mFunshionPlayerFragment.requestLayout(); |
| | | } else { |
| | | tv_back.setVisibility(View.VISIBLE); |
| | | findViewById(R.id.v_status_bar).setVisibility(View.VISIBLE); |
| | | findViewById(R.id.fl_video_detail).setVisibility(View.VISIBLE); |
| | | ViewGroup.LayoutParams params1 = findViewById(R.id.v_status_bar).getLayoutParams(); |