fix [修复-去掉视频封面]
This commit is contained in:
parent
b52e1cea66
commit
c35832487d
@ -87,9 +87,11 @@ public class VideoPlayViewHolder extends AbsViewHolder implements View.OnClickLi
|
|||||||
@Override
|
@Override
|
||||||
public void onVideoSizeChanged(VideoSize videoSize) {
|
public void onVideoSizeChanged(VideoSize videoSize) {
|
||||||
Player.Listener.super.onVideoSizeChanged(videoSize);
|
Player.Listener.super.onVideoSizeChanged(videoSize);
|
||||||
if (mActionListener != null) {
|
/*if (mActionListener != null) {
|
||||||
mActionListener.onVideoSize(videoSize.height, videoSize.width);
|
mActionListener.onVideoSize(videoSize.height, videoSize.width);
|
||||||
}
|
}*/
|
||||||
|
L.e("onVideoSizeChanged————Height----"+videoSize.height);
|
||||||
|
L.e("onVideoSizeChanged————Width----"+videoSize.width);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -164,6 +166,12 @@ public class VideoPlayViewHolder extends AbsViewHolder implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 循环播放
|
* 循环播放
|
||||||
*/
|
*/
|
||||||
|
@ -7,6 +7,7 @@ import android.os.Bundle;
|
|||||||
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -32,6 +33,7 @@ import com.yunbao.common.http.CommonHttpUtil;
|
|||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
@ -229,9 +231,9 @@ public class VideoPlayWrapViewHolder extends AbsViewHolder implements View.OnCli
|
|||||||
}
|
}
|
||||||
mVideoBean = bean;
|
mVideoBean = bean;
|
||||||
if (payload == null) {
|
if (payload == null) {
|
||||||
if (mCover != null) {
|
/*if (mCover != null) {
|
||||||
setCoverImage();
|
setCoverImage();
|
||||||
}
|
}*/
|
||||||
if (mTitle != null) {
|
if (mTitle != null) {
|
||||||
mTitle.setText(String.valueOf(JSONObject.parseObject(bean.getContent()).get("msg")));
|
mTitle.setText(String.valueOf(JSONObject.parseObject(bean.getContent()).get("msg")));
|
||||||
}
|
}
|
||||||
@ -303,6 +305,8 @@ public class VideoPlayWrapViewHolder extends AbsViewHolder implements View.OnCli
|
|||||||
mCover.requestLayout();
|
mCover.requestLayout();
|
||||||
}
|
}
|
||||||
mCover.setImageDrawable(drawable);
|
mCover.setImageDrawable(drawable);
|
||||||
|
L.e("setCoverImage————Height----"+mCover.getHeight());
|
||||||
|
L.e("setCoverImage————Width----"+mCover.getWidth());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,17 +352,20 @@ public class VideoPlayWrapViewHolder extends AbsViewHolder implements View.OnCli
|
|||||||
* 获取到视频首帧回调
|
* 获取到视频首帧回调
|
||||||
*/
|
*/
|
||||||
public void onFirstFrame() {
|
public void onFirstFrame() {
|
||||||
if (mCover != null && mCover.getVisibility() == View.VISIBLE) {
|
/*if (mCover != null && mCover.getVisibility() == View.VISIBLE) {
|
||||||
mCover.setVisibility(View.INVISIBLE);
|
mCover.setVisibility(View.INVISIBLE);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSetVideoCoverSize(int height, int width) {
|
public void onSetVideoCoverSize(int height, int width) {
|
||||||
if (mCover != null) {
|
/* if (mCover != null) {
|
||||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mCover.getLayoutParams();
|
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mCover.getLayoutParams();
|
||||||
params.width = width;
|
params.width = width;
|
||||||
params.height = height;
|
params.height = height;
|
||||||
}
|
}
|
||||||
|
if (mCover != null) {
|
||||||
|
setCoverImage();
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -376,13 +383,13 @@ public class VideoPlayWrapViewHolder extends AbsViewHolder implements View.OnCli
|
|||||||
* 滑入屏幕
|
* 滑入屏幕
|
||||||
*/
|
*/
|
||||||
public void onPageInWindow() {
|
public void onPageInWindow() {
|
||||||
if (mCover != null) {
|
/*if (mCover != null) {
|
||||||
if (mCover.getVisibility() != View.VISIBLE) {
|
if (mCover.getVisibility() != View.VISIBLE) {
|
||||||
mCover.setVisibility(View.VISIBLE);
|
mCover.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
mCover.setImageDrawable(null);
|
mCover.setImageDrawable(null);
|
||||||
setCoverImage();
|
setCoverImage();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user