From 0e83f4fbafc68617ea844adddd950f06333eed63 Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Wed, 20 Mar 2024 18:23:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A6=96=E9=A0=BB=E8=B7=B3=E8=BD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../video/activity/VideoPlayActivity.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/video/src/main/java/com/yunbao/video/activity/VideoPlayActivity.java b/video/src/main/java/com/yunbao/video/activity/VideoPlayActivity.java index 1601f9cfc..668314b62 100644 --- a/video/src/main/java/com/yunbao/video/activity/VideoPlayActivity.java +++ b/video/src/main/java/com/yunbao/video/activity/VideoPlayActivity.java @@ -6,14 +6,23 @@ import android.content.Intent; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; +import android.view.inputmethod.InputMethodManager; import android.widget.ImageView; +import com.alibaba.fastjson.JSON; import com.binioter.guideview.Guide; import com.binioter.guideview.GuideBuilder; import com.yunbao.common.Constants; +import com.yunbao.common.adapter.CommentAdapter; import com.yunbao.common.bean.ActiveBean; +import com.yunbao.common.bean.CommentBean; +import com.yunbao.common.http.CommonHttpUtil; +import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.utils.L; +import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.SpUtil; +import com.yunbao.common.utils.ToastUtil; import com.yunbao.video.R; import com.yunbao.common.bean.VideoBean; import com.yunbao.video.utils.LottieComponent; @@ -21,6 +30,7 @@ import com.yunbao.video.utils.VideoStorge; import com.yunbao.video.views.VideoScrollViewHolder; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; /** @@ -54,6 +64,28 @@ public class VideoPlayActivity extends AbsVideoPlayActivity { context.startActivity(intent); } + public static void forwardSingle(Context context, String id) { + LiveNetManager.get(context).getDynamicInfo(id, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(ActiveBean data) { + List list = new ArrayList<>(); + list.add(data); + VideoStorge.getInstance().put(Constants.VIDEO_SINGLE, list); + Intent intent = new Intent(context, VideoPlayActivity.class); + intent.putExtra(Constants.VIDEO_POSITION, 0); + intent.putExtra(Constants.VIDEO_KEY, Constants.VIDEO_SINGLE); + intent.putExtra(Constants.VIDEO_PAGE, 1); + context.startActivity(intent); + } + + @Override + public void onError(String error) { + + } + }); + } + + @Override protected int getLayoutId() {