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() {