Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f3a565feda
@ -96,9 +96,7 @@ import static com.yunbao.live.views.LiveRyAnchorViewHolder.btn_dr_pk_nub;
|
||||
import static com.yunbao.live.views.LiveRyAnchorViewHolder.btn_start_dr_pk;
|
||||
import static com.yunbao.live.views.LiveRyAnchorViewHolder.btn_start_dr_pk_view;
|
||||
|
||||
//import cn.rongcloud.rtc.jni.video.RCRect;
|
||||
|
||||
//import cn.rongcloud.rtc.jni.video.RCRect;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/7.
|
||||
@ -146,7 +144,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
@Override
|
||||
protected void main() {
|
||||
super.main();
|
||||
// isRy = true;
|
||||
Intent intent = getIntent();
|
||||
mLiveSDK = intent.getIntExtra(Constants.LIVE_SDK, Constants.LIVE_SDK_KSY);
|
||||
mLiveKsyConfigBean = intent.getParcelableExtra(Constants.LIVE_KSY_CONFIG);
|
||||
@ -164,21 +161,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mLiveBean.setGoodNum(u.getGoodName());
|
||||
mLiveBean.setCity(u.getCity());
|
||||
mBeautySdkType = CommonAppConfig.getInstance().getBeautySdkType();
|
||||
//添加推流预览控件
|
||||
// if (mLiveSDK == Constants.LIVE_SDK_TX) {
|
||||
// if ("3".equals(mBeautySdkType)){
|
||||
// mLivePushViewHolder = new LivePushTxViewHolder360Beauty(mContext, (ViewGroup) findViewById(R.id.preview_container));
|
||||
// }
|
||||
// else {
|
||||
|
||||
mLivePushViewHolder = new LivePushRyViewHolder(mContext, (ViewGroup) findViewById(R.id.preview_container));
|
||||
|
||||
|
||||
// }
|
||||
// } else {
|
||||
// mLivePushViewHolder = new LivePushKsyViewHolder(mContext, (ViewGroup) findViewById(R.id.preview_container), mLiveKsyConfigBean);
|
||||
// }
|
||||
|
||||
mLivePushViewHolder.addToParent();
|
||||
mLivePushViewHolder.subscribeActivityLifeCycle();
|
||||
mContainerWrap = (ViewGroup) findViewById(R.id.container_wrap);
|
||||
@ -190,7 +175,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mLiveReadyViewHolder.addToParent();
|
||||
mLiveReadyViewHolder.subscribeActivityLifeCycle();
|
||||
mLiveLinkMicPresenter = new LiveLinkMicPresenter(mContext, mLivePushViewHolder, true, mLiveSDK, mContainer);
|
||||
// mLiveLinkMicPresenter.setLiveUid(mLiveUid);
|
||||
mLiveLinkMicAnchorPresenter = new LiveLinkMicAnchorPresenter(mContext, mLivePushViewHolder, true, mLiveSDK, mContainer);
|
||||
mLivePushViewHolder.setLivePushListener(new LivePushListener() {
|
||||
@Override
|
||||
@ -268,10 +252,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
|
||||
if (code == 0) {
|
||||
//添加水印
|
||||
// RCRect rect = new RCRect(0.5f, 0.5f, 0.2f);
|
||||
// boolean e = RCRTCEngine.getInstance().getDefaultVideoStream().setWatermark(fromText(50, mNameText), rect);
|
||||
// Log.e("ry", e + "设置Watermark");
|
||||
btn_start_dr_pk.setVisibility(View.VISIBLE);
|
||||
dr_pk_view.setVisibility(View.VISIBLE);
|
||||
final SocketSendBean msg1 = new SocketSendBean()
|
||||
@ -437,7 +417,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mrr = 0;
|
||||
t.mirrorType = TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
||||
}
|
||||
// mTRTCCloud.setLocalRenderParams(t);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -485,41 +464,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
* 设置美颜
|
||||
*/
|
||||
public void beauty() {
|
||||
// Log.d("设置美颜","type="+mBeautySdkType);
|
||||
// if (mLiveBeautyViewHolder == null) {
|
||||
//// if (CommonAppConfig.getInstance().isTiBeautyEnable()) {
|
||||
//// mLiveBeautyViewHolder = new TiBeautyViewHolder(mContext, mContainer);
|
||||
//// } else {
|
||||
//// mLiveBeautyViewHolder = new DefaultBeautyViewHolder(mContext, mContainer);
|
||||
//// }
|
||||
//// String mBeautySdkType= CommonAppConfig.getInstance().getBeautySdkType();
|
||||
// if ("2".equals(mBeautySdkType)) {
|
||||
// mLiveBeautyViewHolder = new TiBeautyViewHolder(mContext, mContainer);
|
||||
// } else if ("3".equals(mBeautySdkType)){
|
||||
//// mLiveBeautyViewHolder = new Beauty360ViewHolder(mContext, mContainer);
|
||||
// mLiveBeautyViewHolder = new Beauty360ViewHolder(this, mContainer);
|
||||
// }else {
|
||||
// mLiveBeautyViewHolder = new DefaultBeautyViewHolder(mContext, mContainer);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// mLiveBeautyViewHolder.setVisibleListener(new BeautyViewHolder.VisibleListener() {
|
||||
// @Override
|
||||
// public void onVisibleChanged(boolean visible) {
|
||||
// if (mLiveReadyViewHolder != null) {
|
||||
// if (visible) {
|
||||
// mLiveReadyViewHolder.hide();
|
||||
// } else {
|
||||
// mLiveReadyViewHolder.show();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// if (mLivePushViewHolder != null) {
|
||||
// mLiveBeautyViewHolder.setEffectListener(mLivePushViewHolder.getEffectListener());
|
||||
// }
|
||||
// }
|
||||
// mLiveBeautyViewHolder.show();
|
||||
if (mLiveReadyViewHolder != null) {
|
||||
mLiveReadyViewHolder.hide();
|
||||
}
|
||||
@ -590,7 +534,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
hasGame = mGameList.size() > 0;
|
||||
}
|
||||
bundle.putBoolean(Constants.HAS_GAME, hasGame);
|
||||
// bundle.putBoolean("isRy", true);
|
||||
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
|
||||
fragment.setArguments(bundle);
|
||||
fragment.setFunctionClickListener(this);
|
||||
@ -620,11 +563,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
ToastUtil.show(R.string.live_link_mic_cannot_game);
|
||||
return;
|
||||
}
|
||||
// if (mGamePresenter != null) {
|
||||
// GameDialogFragment fragment = new GameDialogFragment();
|
||||
// fragment.setGamePresenter(mGamePresenter);
|
||||
// fragment.show(getSupportFragmentManager(), "GameDialogFragment");
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
@ -677,13 +615,8 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
if (mLiveAnchorViewHolder == null) {
|
||||
mLiveAnchorViewHolder = new LiveRyAnchorViewHolder(mContext, mContainer);
|
||||
mLiveAnchorViewHolder.addToParent();
|
||||
// mLiveAnchorViewHolder.setUnReadCount(((LiveActivity) mContext).getImUnReadCount());
|
||||
}
|
||||
mLiveBottomViewHolder = mLiveAnchorViewHolder;
|
||||
|
||||
//连接socket
|
||||
// if (mSocketClient == null) {
|
||||
|
||||
mSocketRyClient = new SocketRyClient(mLiveUid, this);
|
||||
CommonAppContext.Ingroup = 1;
|
||||
|
||||
@ -696,8 +629,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
mLiveLinkMicAnchorPresenter.setSelfStream(mStream);
|
||||
}
|
||||
if (mLiveRyLinkMicPkPresenter != null) {
|
||||
// mLiveRyLinkMicPkPresenter.setSocketClient(mSocketRyClient);
|
||||
// mLiveRyLinkMicPkPresenter.setLiveUid(mLiveUid);
|
||||
mLiveRyLinkMicPkPresenter.setSelfStream(mStream);
|
||||
}
|
||||
// }
|
||||
@ -734,19 +665,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
//游戏相关
|
||||
if (CommonAppConfig.GAME_ENABLE) {
|
||||
mGameList = JSON.parseArray(obj.getString("game_switch"), Integer.class);
|
||||
// GameParam param = new GameParam();
|
||||
// param.setContext(mContext);
|
||||
// param.setParentView(mContainerWrap);
|
||||
// param.setTopView(mContainer);
|
||||
// param.setInnerContainer(mLiveRoomViewHolder.getInnerContainer());
|
||||
// param.setGameActionListener(new GameActionListenerImpl(LiveAnchorActivity.this, mSocketClient));
|
||||
// param.setLiveUid(mLiveUid);
|
||||
// param.setStream(mStream);
|
||||
// param.setAnchor(true);
|
||||
// param.setCoinName(mCoinName);
|
||||
// param.setObj(obj);
|
||||
// mGamePresenter = new GamePresenter(param);
|
||||
// mGamePresenter.setGameList(mGameList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -926,15 +844,10 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
if (mLiveLinkMicPresenter != null) {
|
||||
mLiveLinkMicPresenter.release();
|
||||
}
|
||||
|
||||
// if (mGamePresenter != null) {
|
||||
// mGamePresenter.release();
|
||||
// }
|
||||
mLiveMusicViewHolder = null;
|
||||
mLiveReadyViewHolder = null;
|
||||
mLivePushViewHolder = null;
|
||||
mLiveLinkMicPresenter = null;
|
||||
// mGamePresenter = null;
|
||||
super.release();
|
||||
}
|
||||
|
||||
@ -993,16 +906,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
release();
|
||||
}
|
||||
|
||||
// @Subscribe(threadMode = ThreadMode.MAIN)
|
||||
// public void onGameWindowChangedEvent(GameWindowChangedEvent e) {
|
||||
// if (mLiveRoomViewHolder != null) {
|
||||
// mLiveRoomViewHolder.setOffsetY(e.getGameViewHeight());
|
||||
// }
|
||||
// if (mLiveAnchorViewHolder != null) {
|
||||
// mLiveAnchorViewHolder.setGameBtnVisible(e.isOpen());
|
||||
// }
|
||||
// }
|
||||
|
||||
public void setBtnFunctionDark() {
|
||||
if (mLiveAnchorViewHolder != null) {
|
||||
mLiveAnchorViewHolder.setBtnFunctionDark();
|
||||
@ -1272,15 +1175,6 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
|
||||
*/
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLinkMicTxMixStreamEvent(LinkMicTxMixStreamEvent e) {
|
||||
// if ("3".equals(mBeautySdkType)) {
|
||||
// if (mLivePushViewHolder != null && mLivePushViewHolder instanceof LivePushTxViewHolder360Beauty) {
|
||||
// ((LivePushTxViewHolder360Beauty) mLivePushViewHolder).onLinkMicTxMixStreamEvent(e.getType(), e.getToStream());
|
||||
// }
|
||||
// } else {
|
||||
// if (mLivePushViewHolder != null && mLivePushViewHolder instanceof LivePushTxViewHolder) {
|
||||
//// ((LivePushTxViewHolder) mLivePushViewHolder).onLinkMicTxMixStreamEvent(e.getType(), e.getToStream());
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
@ -543,6 +543,7 @@ public class SocketRyChatUtil {
|
||||
@Override
|
||||
public void onSuccess(Message message) {
|
||||
Log.i("tx", "发送成功");
|
||||
if (SocketRyClient.mSocketHandler != null)
|
||||
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
|
||||
}
|
||||
|
||||
|
@ -877,6 +877,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mChatRecyclerView.setLayoutParams(params1);
|
||||
}
|
||||
// fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator());
|
||||
//主播页面隐藏头部
|
||||
if (mContext instanceof LiveRyAnchorActivity) {
|
||||
findViewById(R.id.hour_rank_layout).setVisibility(View.GONE);
|
||||
findViewById(R.id.live_wks_layout).setVisibility(View.GONE);
|
||||
findViewById(R.id.wish_list_layout).setVisibility(View.GONE);
|
||||
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void showBanner2() {
|
||||
|
@ -855,8 +855,23 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
@Override
|
||||
public void onLinkMicPkStart(String pkUid, String pkhead, String pkname) {
|
||||
if (mLiveRyLinkMicPkPresenter != null && mLiveRoomViewHolder != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
Log.e("tasdsdg", liveID + "1111" + CommonAppConfig.getInstance().getUid());
|
||||
if (!liveID.equals(CommonAppConfig.getInstance().getUid())) {
|
||||
mLiveRoomViewHolder.setOtherInfo(pkUid, pkhead, pkname);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 4000);//3秒后执行Runnable中的run方法
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinkMicPkClose(int i) {
|
||||
@ -880,7 +895,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
|
||||
@Override
|
||||
public void onLinkMicPkEnd(String winUid) {
|
||||
|
||||
if (mLiveRyLinkMicPkPresenter != null) {
|
||||
mLiveRyLinkMicPkPresenter.onLinkMicPkEnd(winUid);
|
||||
mLiveRoomViewHolder.setDelOtherInfo();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -206,12 +206,12 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="40dp"
|
||||
android:visibility="visible"
|
||||
android:layout_gravity="end|center"
|
||||
android:layout_marginRight="-3dp"
|
||||
android:overScrollMode="never" />
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_more"
|
||||
|
Loading…
Reference in New Issue
Block a user