From 50f83939cc795dcc973cebe6d49261b0dc7e09a3 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Mon, 31 Oct 2022 15:55:52 +0800 Subject: [PATCH] test --- .../live/views/LivePlayRyViewHolder.java | 2 +- .../live/views/PortraitLiveManager.java | 26 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java index 3d934d59f..f2230631f 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -196,7 +196,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { public void play(String url) { Log.e("purl121", url); - if (TextUtils.isEmpty(url) || mVideoView == null) { + if (TextUtils.isEmpty(url) || mVideoView == null || true) { return; } diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 67b717693..b3c61b5a9 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -238,19 +238,21 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe .setParametersModel(openParametersModel .setmLiveType(mLiveType) .setmLiveTypeVal(mLiveTypeVal))); - mLivePlayViewHolder = new LivePlayRyViewHolder(mContext, playContainer, mIntent.getIntExtra("landscape", 0)); - mLivePlayViewHolder.addToParent(); - mLivePlayViewHolder.subscribeActivityLifeCycle(); - mLiveRoomViewHolder = new LiveRoomViewHolder(false, 1, mContext, mContainer, mSecondPage.findViewById(R.id.gift_gif), mSecondPage.findViewById(R.id.gift_svga), mContainerWrap, mContext.getWindowManager()); - mLiveRoomViewHolder.subscribeActivityLifeCycle(); - mLiveAudienceViewHolder = new LiveAudienceViewHolder(mContext, mContainer); - mLiveAudienceViewHolder.addToParent(); - mLiveRoomViewHolder.addToParent(); - mLiveAudienceViewHolder.subscribeActivityLifeCycle(); - mLiveLinkMicPresenter = new LiveLinkMicPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, mLiveAudienceViewHolder.getContentView()); - mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, null); + if (mLivePlayViewHolder == null) { + mLivePlayViewHolder = new LivePlayRyViewHolder(mContext, playContainer, mIntent.getIntExtra("landscape", 0)); + mLiveRoomViewHolder = new LiveRoomViewHolder(false, 1, mContext, mContainer, mSecondPage.findViewById(R.id.gift_gif), mSecondPage.findViewById(R.id.gift_svga), mContainerWrap, mContext.getWindowManager()); + mLiveAudienceViewHolder = new LiveAudienceViewHolder(mContext, mContainer); + mLiveLinkMicPresenter = new LiveLinkMicPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, mLiveAudienceViewHolder.getContentView()); + mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePlayViewHolder, false, mLiveSDK, null); + mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null); + mLivePlayViewHolder.addToParent(); + mLivePlayViewHolder.subscribeActivityLifeCycle(); + mLiveRoomViewHolder.subscribeActivityLifeCycle(); + mLiveAudienceViewHolder.addToParent(); + mLiveRoomViewHolder.addToParent(); + mLiveAudienceViewHolder.subscribeActivityLifeCycle(); + } - mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null); //直播间背景 ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack, 400, 600); //ImageLoadUtils.loadUrlToBlur(mContext,mLiveBean.getAvatar(),400,600,liveBack);