admin
2022-01-28 760aee20870a34e6130a1c12237c5b747e2b00bd
library-video/src/main/java/com/yeshi/video/ui/VideoEpisodeFragment.java
@@ -31,8 +31,11 @@
import com.qq.e.comm.util.AdError;
import com.umeng.analytics.MobclickAgent;
import com.viewpagerindicator.TabPageIndicator;
import com.yeshi.base.entity.ad.AdPositionEnum;
import com.yeshi.base.entity.video.VideoInfo;
import com.yeshi.base.utils.BeibeiConstant;
import com.yeshi.base.utils.JsonUtil;
import com.yeshi.base.utils.ad.AdUtil;
import com.yeshi.base.utils.ad.GDTConstant;
import com.yeshi.base.utils.http.BasicTextHttpResponseHandler;
import com.yeshi.video.R;
@@ -262,7 +265,7 @@
            }
        });
        if (BeibeiConstant.ADSHOW) {
        if (AdUtil.getAdType(getContext(), AdPositionEnum.other) != null) {
//            loadAD1();
            loadAD();
        }
@@ -302,10 +305,7 @@
                                                 Header[] headers, JSONObject jsonObject)
                            throws Exception {
                        if (jsonObject.getBoolean("IsPost")) {
                            Gson gson = new GsonBuilder().setFieldNamingPolicy(
                                    FieldNamingPolicy.UPPER_CAMEL_CASE)
                                    .create();
                            List<VideoInfo> videoInfos = gson.fromJson(
                            List<VideoInfo> videoInfos = JsonUtil.videoGson.fromJson(
                                    jsonObject.getJSONObject("Data")
                                            .getJSONArray("data").toString(),
                                    new TypeToken<List<VideoInfo>>() {
@@ -335,10 +335,7 @@
                                                 Header[] headers, JSONObject jsonObject)
                            throws Exception {
                        if (jsonObject.getBoolean("IsPost")) {
                            Gson gson = new GsonBuilder().setFieldNamingPolicy(
                                    FieldNamingPolicy.UPPER_CAMEL_CASE)
                                    .create();
                            List<VideoInfo> videoInfos = gson.fromJson(
                            List<VideoInfo> videoInfos = JsonUtil.videoGson.fromJson(
                                    jsonObject.getJSONObject("Data")
                                            .getJSONArray("data").toString(),
                                    new TypeToken<List<VideoInfo>>() {
@@ -375,10 +372,7 @@
                                                 Header[] headers, JSONObject jsonObject)
                            throws Exception {
                        if (jsonObject.getBoolean("IsPost")) {
                            Gson gson = new GsonBuilder().setFieldNamingPolicy(
                                    FieldNamingPolicy.UPPER_CAMEL_CASE)
                                    .create();
                            List<VideoInfo> videoInfos = gson.fromJson(
                            List<VideoInfo> videoInfos = JsonUtil.videoGson.fromJson(
                                    jsonObject.getJSONObject("Data")
                                            .getJSONArray("data").toString(),
                                    new TypeToken<List<VideoInfo>>() {
@@ -398,7 +392,6 @@
    public void onResume() {
        super.onResume();
        EventBus.getDefault().register(this);
        MobclickAgent.onPageStart("播放详情—选集");
    }
    @Override
@@ -407,7 +400,6 @@
        EventBus.getDefault().unregister(this);
        isShowMore = false;
        page_varietyshow = 0;
        MobclickAgent.onPageEnd("播放详情—选集");
    }
    public void onEventMainThread(VideoInfo info) {
@@ -524,8 +516,10 @@
    private void loadAD() {
        if (AdUtil.getAdType(getContext(), AdPositionEnum.other) == null)
            return;
        NativeExpressAD nativeExpressAD = new NativeExpressAD(getContext(), new ADSize(ADSize.FULL_WIDTH, ADSize.AUTO_HEIGHT),
                GDTConstant.GDT_APP_ID, GDTConstant.GDT_HOME_AND_PLAY_BIG_PICTURE, new NativeExpressAD.NativeExpressADListener() {
                GDTConstant.GDT_HOME_AND_PLAY_BIG_PICTURE, new NativeExpressAD.NativeExpressADListener() {
            @Override
            public void onADLoaded(final List<NativeExpressADView> list) {
                if (list.size() > 1) {