視頻跳轉

This commit is contained in:
hch 2024-03-20 18:23:39 +08:00
parent 434474bd98
commit 0e83f4fbaf

View File

@ -6,14 +6,23 @@ import android.content.Intent;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView; import android.widget.ImageView;
import com.alibaba.fastjson.JSON;
import com.binioter.guideview.Guide; import com.binioter.guideview.Guide;
import com.binioter.guideview.GuideBuilder; import com.binioter.guideview.GuideBuilder;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.adapter.CommentAdapter;
import com.yunbao.common.bean.ActiveBean; 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.L;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.video.R; import com.yunbao.video.R;
import com.yunbao.common.bean.VideoBean; import com.yunbao.common.bean.VideoBean;
import com.yunbao.video.utils.LottieComponent; import com.yunbao.video.utils.LottieComponent;
@ -21,6 +30,7 @@ import com.yunbao.video.utils.VideoStorge;
import com.yunbao.video.views.VideoScrollViewHolder; import com.yunbao.video.views.VideoScrollViewHolder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
@ -54,6 +64,28 @@ public class VideoPlayActivity extends AbsVideoPlayActivity {
context.startActivity(intent); context.startActivity(intent);
} }
public static void forwardSingle(Context context, String id) {
LiveNetManager.get(context).getDynamicInfo(id, new com.yunbao.common.http.base.HttpCallback<ActiveBean>() {
@Override
public void onSuccess(ActiveBean data) {
List<ActiveBean> 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 @Override
protected int getLayoutId() { protected int getLayoutId() {