diff --git a/app/build.gradle b/app/build.gradle
index 9c373ad88..1b85e907f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'img-optimizer'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
-
+apply plugin: 'com.alibaba.arouter'
android {
dexOptions {
jumboMode = true
diff --git a/build.gradle b/build.gradle
index 830820683..7d45ccc5a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,6 +22,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
+ classpath "com.alibaba:arouter-register:1.0.2"
}
diff --git a/common/src/main/java/com/yunbao/common/utils/NobleUtil.java b/common/src/main/java/com/yunbao/common/utils/NobleUtil.java
index 868b3984a..8f05a4a9e 100644
--- a/common/src/main/java/com/yunbao/common/utils/NobleUtil.java
+++ b/common/src/main/java/com/yunbao/common/utils/NobleUtil.java
@@ -34,4 +34,29 @@ public class NobleUtil {
}
return "未开通";
}
+ public static int getNobleBackgroundId(int id){
+ switch (id){
+ case 1:return R.mipmap.img_aristocrat_nanjue;
+ case 2:return R.mipmap.img_aristocrat_zijue;
+ case 3:return R.mipmap.img_aristocrat_houjue;
+ case 4:return R.mipmap.img_aristocrat_gongjue;
+ case 5:return R.mipmap.img_aristocrat_guowang;
+ case 6:return R.mipmap.img_aristocrat_huangdi;
+ case 7:return R.mipmap.img_aristocrat_chaohuang;
+ }
+ return R.mipmap.img_aristocrat_notopen;
+ }
+
+ public static int getUserCardTitleBackgroundId(int id) {
+ switch (id){
+ case 1:return R.drawable.bg_user_card_title_nanjue;
+ case 2:return R.drawable.bg_user_card_title_zijue;
+ case 3:return R.drawable.bg_user_card_title_houjue;
+ case 4:return R.drawable.bg_user_card_title_gongjue;
+ case 5:return R.drawable.bg_user_card_title_guowang;
+ case 6:return R.drawable.bg_user_card_title_huangdi;
+ case 7:return R.drawable.bg_user_card_title_chaohuang;
+ }
+ return 0;
+ }
}
diff --git a/common/src/main/res/drawable/bg_user_card_title_chaohuang.xml b/common/src/main/res/drawable/bg_user_card_title_chaohuang.xml
new file mode 100644
index 000000000..1c307508e
--- /dev/null
+++ b/common/src/main/res/drawable/bg_user_card_title_chaohuang.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/drawable/bg_user_card_title_gongjue.xml b/common/src/main/res/drawable/bg_user_card_title_gongjue.xml
new file mode 100644
index 000000000..960451c09
--- /dev/null
+++ b/common/src/main/res/drawable/bg_user_card_title_gongjue.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/drawable/bg_user_card_title_guowang.xml b/common/src/main/res/drawable/bg_user_card_title_guowang.xml
new file mode 100644
index 000000000..7dc1571a7
--- /dev/null
+++ b/common/src/main/res/drawable/bg_user_card_title_guowang.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/drawable/bg_user_card_title_houjue.xml b/common/src/main/res/drawable/bg_user_card_title_houjue.xml
new file mode 100644
index 000000000..aa351b6e1
--- /dev/null
+++ b/common/src/main/res/drawable/bg_user_card_title_houjue.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/drawable/bg_user_card_title_huangdi.xml b/common/src/main/res/drawable/bg_user_card_title_huangdi.xml
new file mode 100644
index 000000000..195166451
--- /dev/null
+++ b/common/src/main/res/drawable/bg_user_card_title_huangdi.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/drawable/bg_user_card_title_nanjue.xml b/common/src/main/res/drawable/bg_user_card_title_nanjue.xml
new file mode 100644
index 000000000..c3b447a7c
--- /dev/null
+++ b/common/src/main/res/drawable/bg_user_card_title_nanjue.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/drawable/bg_user_card_title_zijue.xml b/common/src/main/res/drawable/bg_user_card_title_zijue.xml
new file mode 100644
index 000000000..406b21b29
--- /dev/null
+++ b/common/src/main/res/drawable/bg_user_card_title_zijue.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_chaohuang.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_chaohuang.png
new file mode 100644
index 000000000..a8bea716c
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_chaohuang.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_gongjue.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_gongjue.png
new file mode 100644
index 000000000..88c051df7
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_gongjue.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_guowang.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_guowang.png
new file mode 100644
index 000000000..d6282e9ae
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_guowang.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_houjue.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_houjue.png
new file mode 100644
index 000000000..efd5ef8f0
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_houjue.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_huangdi.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_huangdi.png
new file mode 100644
index 000000000..14da24bfc
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_huangdi.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_nanjue.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_nanjue.png
new file mode 100644
index 000000000..98819b426
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_nanjue.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_notopen.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_notopen.png
new file mode 100644
index 000000000..f32017d2d
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_notopen.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_aristocrat_zijue.png b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_zijue.png
new file mode 100644
index 000000000..57653a507
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_aristocrat_zijue.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_fans_default.png b/common/src/main/res/mipmap-xxhdpi/img_fans_default.png
new file mode 100644
index 000000000..da577ef1d
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_fans_default.png differ
diff --git a/common/src/main/res/mipmap-xxhdpi/img_honor_default.png b/common/src/main/res/mipmap-xxhdpi/img_honor_default.png
new file mode 100644
index 000000000..54e920549
Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/img_honor_default.png differ
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 1d641d097..fd0da52f7 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -707,6 +707,7 @@
主播等級
用户等級
貴族等級
+ 粉絲團
榮譽墻
連接已斷開,請重新開播
空空如也
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java
index 98a0992bd..ffaaa9ce8 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java
@@ -98,7 +98,6 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
private String mToUid;
private String mStream;
private int mType;
- private int guardNumber;
private TextView mFollowText;
private TextView mName;
private TextView mID;
@@ -112,6 +111,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
private TextView mGuard;
private TextView mUnion;
private TextView mHonorVal;
+ private TextView mNobleTitleVal;
private ImageView mFollowImage;
private ImageView mSex;
private ImageView good_nub_ico;
@@ -122,9 +122,13 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
private ImageView mAvatar;
private ImageView shawl;
private ImageView honorIcon;
+ private ImageView mTitleBg;
private UserBean mUserBean;
private LinearLayout mGuardLayout;
private LinearLayout mUnionLayout;
+ private LinearLayout mNobleIconLayout;
+ private LinearLayout mUserLevelLayout;
+ private LinearLayout mHonorLayout;
private boolean mFollowing;
GifImageView btn_live;
SVGAImageView gift_svga;
@@ -174,7 +178,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
getType();
initView();
initListener();
- initGuardList();
+ //initGuardList();
LayoutInflater inflater = LayoutInflater.from(mContext);
View bottomView = null;
if (mType == TYPE_AUD_ANC) {
@@ -233,6 +237,13 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
mUnionLayout = mRootView.findViewById(R.id.btn_union);
mUnion = mRootView.findViewById(R.id.union_val);
mHonorVal = mRootView.findViewById(R.id.honor_val);
+ mUserLevelLayout = mRootView.findViewById(R.id.user_level_layout);
+ mNobleIconLayout = mRootView.findViewById(R.id.noble_icon_layout);
+ mNobleTitleVal = mRootView.findViewById(R.id.noble_title_val);
+ mHonorLayout = mRootView.findViewById(R.id.honor_layout);
+ mTitleBg = mRootView.findViewById(R.id.title_bg);
+ mHonorLayout.setOnClickListener(v -> forwardHomePage());
+
}
private void initListener() {
@@ -245,6 +256,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
mAvatar.setOnClickListener(this);
mReport.setOnClickListener(this);
mGuardLayout.setOnClickListener(this);
+ btn_live.setOnClickListener(this);
}
private void loadData() {
@@ -296,6 +308,11 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
mUnionLayout.setVisibility(View.VISIBLE);
}
mNoble.setVisibility(View.GONE);
+ mUserLevelLayout.setBackgroundResource(R.drawable.bg_user_card_lv);
+ mNobleTitleVal.setText(R.string.live_noble_fens_anchor);
+ mNobleIconLayout.setBackgroundResource(R.drawable.bg_user_card_fans);
+ } else {
+ mUserLevelLayout.setBackgroundResource(R.drawable.bg_user_card_au_lv);
}
mName.setText(obj.getString("user_nicename"));
if (mUserBean.getGoodnum() != null && !mUserBean.getGoodnum().equals("")) {
@@ -334,11 +351,18 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
} else {
mNoble.setVisibility(View.GONE);
}
- mGuard.setText(String.format(mGuard.getText().toString(), guardNumber));
+ mGuard.setText(String.format(mGuard.getText().toString(), obj.getInteger("guard_num")));
mFansVal.setText(WordUtil.getString(R.string.fans) + ":" + mUserBean.getFans());
mPraise.setText(WordUtil.getString(R.string.praise) + ":" + obj.getInteger("user_love_num"));
mSignDesc.setText(mUserBean.getSignature());
- mNobleVal.setText(NobleUtil.nobleIdToStringName(Integer.parseInt(mUserBean.getNoble_id())));
+ if (isAnchor) {
+ mNobleVal.setText("" + obj.getInteger("level_fans_num"));
+ } else {
+ mNobleVal.setText(NobleUtil.nobleIdToStringName(Integer.parseInt(mUserBean.getNoble_id())));
+ if (obj.getInteger("noble_id") != 0) {
+ mTitleBg.setBackgroundResource(NobleUtil.getUserCardTitleBackgroundId(obj.getInteger("noble_id")));
+ }
+ }
ImgLoader.displayAvatar(mContext, obj.getString("avatar"), mAvatar);
JSONObject dress = obj.getJSONObject("dress");
@@ -348,7 +372,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
} else {
mLiveIcon2.setVisibility(View.INVISIBLE);
}
- if (dress.containsKey("medal")) {
+ if (dress.containsKey("medal") && !isAnchor) {
JSONObject item = null;
for (Object medal : dress.getJSONArray("medal")) {
JSONObject _item = (JSONObject) medal;
@@ -359,20 +383,22 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
}
if (item != null) {
String url = item.getString("display_src");
- if (item.containsKey("noble_medal") && !isAnchor) {
+ if (item.containsKey("noble_medal")) {
mNoble.setVisibility(View.VISIBLE);
ImgLoader.display(mContext, item.getString("noble_medal"), mNoble);
}
if (url != null) {
url = url.replace("qny.shayucm.com", "downs.yaoulive.com");
- mNobleIcon.setVisibility(View.VISIBLE);
- ImgLoader.display(mContext, url, mNobleIcon);
- } else {
- mNobleIcon.setVisibility(View.INVISIBLE);
+ try {
+ mNobleIconLayout.setBackgroundResource(NobleUtil.getNobleBackgroundId(obj.getInteger("noble_id")));
+ } catch (Exception e) {
+ mNobleIconLayout.setBackgroundResource(NobleUtil.getNobleBackgroundId(0));
+ }
}
}
} else {
- mNobleIcon.setVisibility(View.INVISIBLE);
+ mNobleIconLayout.setVisibility(View.VISIBLE);
+ mNobleIcon.setVisibility(View.VISIBLE);
}
if (dress.containsKey("medal_no")) {
JSONObject item = null;
@@ -380,11 +406,8 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
item = dress.getJSONArray("medal_no").getJSONObject(0);
String url = item.getString("display_src");
url = url.replace("qny.shayucm.com", "downs.yaoulive.com");
- honorIcon.setVisibility(View.VISIBLE);
ImgLoader.display(mContext, url, honorIcon);
}
- } else {
- honorIcon.setVisibility(View.INVISIBLE);
}
mFollowing = obj.getIntValue("isattention") == 1;
@@ -393,6 +416,7 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
if (dress.getJSONArray("wraps").size() >= 1) {
JSONObject display = (JSONObject) dress.getJSONArray("wraps").get(0);
+ shawl.setTag("test");
ImgLoader.display(mContext, display.getString("display_src"), shawl);
}
if (dress.getJSONArray("avatar_frame").size() == 1) {
@@ -504,18 +528,78 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
LiveReportActivity.forward(mContext, mToUid);
}
- private void initGuardList() {
- LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() {
+
+ private void gotoLive(String live_id) {
+ DialogUitl.showSimpleDialog(mContext, "是否確認前往對方直播間?", new DialogUitl.SimpleCallback() {
@Override
- public void onSuccess(int code, String msg, String[] info) {
- List list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
- if (list != null) {
- guardNumber = list.size();
- }
+ public void onConfirmClick(Dialog dialog, String content) {
+ RongChatRoomClient.getInstance().quitChatRoom("g" + mLiveUid, new IRongCoreCallback.OperationCallback() {
+ @Override
+ public void onSuccess() {
+ Log.i("tx", "退出成功");
+ //连接socket
+ LiveHttpUtil.qBackRoom(mLiveUid, mStream, new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+
+ }
+ });
+ }
+
+ @Override
+ public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) {
+
+ }
+ });
+ V2TIMManager.getInstance().quitGroup("g" + mLiveUid, new V2TIMCallback() {
+ @Override
+ public void onSuccess() {
+
+ Log.i("tx", "退出成功" + mLiveUid);
+ //连接socket
+ LiveHttpUtil.qBackRoom(mLiveUid, mStream, new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+
+ }
+ });
+ }
+
+ @Override
+ public void onError(int code, String desc) {
+ Log.i("tx", "退出失败");
+ }
+ });
+ LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if (code == 0 && info.length > 0) {
+ LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
+
+ if (mCheckLivePresenter == null) {
+ mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
+ @Override
+ public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
+ if (liveBean == null) {
+ return;
+ }
+ LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null);
+ dismiss();
+ EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal));
+ }
+ });
+ }
+ mCheckLivePresenter.checkLive(liveBean);
+ }
+ }
+ });
+
+
}
});
}
+
@Override
public void onClick(View v) {
int i = v.getId();
@@ -529,6 +613,8 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
forwardHomePage();
} else if (i == R.id.btn_guard) {
((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity);
+ } else if (i == R.id.btn_live) {
+ gotoLive(mToUid);
}
}
}
diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java
index d04997f10..fb22ab1b5 100644
--- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java
@@ -1,6 +1,13 @@
package com.yunbao.live.views;
-import android.app.Activity;
+import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
+import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
+import static com.yunbao.live.activity.LiveActivity.mLiveRyLinkMicPkPresenter;
+import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.inputStreamList;
+import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.inputStreamList1;
+import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.leaveDRRoom;
+import static cn.rongcloud.rtc.base.RCRTCLiveRole.BROADCASTER;
+
import android.app.Dialog;
import android.content.Context;
import android.content.res.Resources;
@@ -39,7 +46,6 @@ import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil;
import com.yunbao.live.momo.TencentTRTCBeautyManager;
import com.yunbao.live.presenter.LiveRyLinkMicPkPresenter;
-import com.yunbao.live.socket.SocketRyLinkMicPkUtil;
import com.yunbao.live.socket.SocketSendBean;
import java.util.ArrayList;
@@ -48,38 +54,22 @@ import java.util.List;
import cn.rongcloud.rtc.api.RCRTCConfig;
import cn.rongcloud.rtc.api.RCRTCEngine;
import cn.rongcloud.rtc.api.RCRTCMixConfig;
-import cn.rongcloud.rtc.api.RCRTCOtherRoom;
import cn.rongcloud.rtc.api.RCRTCRemoteUser;
import cn.rongcloud.rtc.api.RCRTCRoom;
import cn.rongcloud.rtc.api.RCRTCRoomConfig;
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
import cn.rongcloud.rtc.api.callback.IRCRTCResultDataCallback;
import cn.rongcloud.rtc.api.callback.IRCRTCRoomEventsListener;
-import cn.rongcloud.rtc.api.callback.IRCRTCVideoOutputFrameListener;
import cn.rongcloud.rtc.api.stream.RCRTCInputStream;
import cn.rongcloud.rtc.api.stream.RCRTCLiveInfo;
-import cn.rongcloud.rtc.api.stream.RCRTCVideoInputStream;
import cn.rongcloud.rtc.api.stream.RCRTCVideoStreamConfig;
import cn.rongcloud.rtc.api.stream.RCRTCVideoView;
-import cn.rongcloud.rtc.base.RCRTCMediaType;
import cn.rongcloud.rtc.base.RCRTCParamsType;
import cn.rongcloud.rtc.base.RCRTCRoomType;
-import cn.rongcloud.rtc.base.RCRTCStream;
-import cn.rongcloud.rtc.base.RCRTCVideoFrame;
import cn.rongcloud.rtc.base.RTCErrorCode;
import cn.rongcloud.rtc.core.CameraVideoCapturer;
import cn.rongcloud.rtc.core.RendererCommon;
-import static cn.rongcloud.rtc.base.RCRTCLiveRole.BROADCASTER;
-import static cn.rongcloud.rtc.core.RendererCommon.ScalingType.SCALE_ASPECT_FILL;
-import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
-import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
-import static com.yunbao.live.activity.LiveActivity.mLiveRyLinkMicPkPresenter;
-import static com.yunbao.live.activity.LiveRyAnchorActivity.mLivePushViewHolder;
-import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.inputStreamList;
-import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.inputStreamList1;
-import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.leaveDRRoom;
-
/**
* Created by cxf on 2018/10/7.
* 腾讯云直播推流
@@ -200,7 +190,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.onLinkDRMicPkApply(userBean);
} else {
- mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePushViewHolder, true, liveActivityContainer);
+ mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, LivePushRyViewHolder.this, true, liveActivityContainer);
mLiveRyLinkMicPkPresenter.onLinkDRMicPkApply(userBean);
}
} else if (extra.equals("LiveDRPK1")) {
@@ -504,7 +494,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
RCRTCVideoStreamConfig videoConfigBuilder = RCRTCVideoStreamConfig.Builder.create()
//设置分辨率
- .setVideoResolution(RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_480_720)
+ .setVideoResolution(RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_480_640)
//设置帧率
.setVideoFps(RCRTCParamsType.RCRTCVideoFps.Fps_30)
//设置最小码率,480P下推荐200
@@ -519,9 +509,20 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
RCRTCVideoView rongRTCVideoView = new RCRTCVideoView(contexts);
rongRTCVideoView.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FILL);
RCRTCEngine.getInstance().getDefaultVideoStream().setVideoView(rongRTCVideoView);
- RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(null);
+ RCRTCEngine.getInstance().getDefaultVideoStream().startCamera(new IRCRTCResultDataCallback() {
+ @Override
+ public void onSuccess(Boolean data) {
+ //设置摄像头最大缩放比例
+ boolean zoom = RCRTCEngine.getInstance().getDefaultVideoStream().setCameraZoomFactor(1.0f);
+ // ToastUtil.show("设置比例="+zoom);
+ }
+
+ @Override
+ public void onFailed(RTCErrorCode errorCode) {
+ }
+ });
//设置摄像头最大缩放比例
- RCRTCEngine.getInstance().getDefaultVideoStream().setCameraZoomFactor(RCRTCEngine.getInstance().getDefaultVideoStream().getCameraMaxZoomFactor());
+ // RCRTCEngine.getInstance().getDefaultVideoStream().setCameraZoomFactor(RCRTCEngine.getInstance().getDefaultVideoStream().getCameraMaxZoomFactor());
mPreView.addView(rongRTCVideoView);
tencentTRTCBeautyManager = new TencentTRTCBeautyManager(mContext);
diff --git a/live/src/main/res/drawable/bg_user_card_au_lv.xml b/live/src/main/res/drawable/bg_user_card_au_lv.xml
new file mode 100644
index 000000000..ca5e67b38
--- /dev/null
+++ b/live/src/main/res/drawable/bg_user_card_au_lv.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/dialog_new_live_user.xml b/live/src/main/res/layout/dialog_new_live_user.xml
index 629330d43..12fa23217 100644
--- a/live/src/main/res/layout/dialog_new_live_user.xml
+++ b/live/src/main/res/layout/dialog_new_live_user.xml
@@ -11,6 +11,14 @@
android:layout_marginTop="52dp"
android:background="@drawable/bg_live_user">
+
+ android:layout_marginStart="6dp" />
+ android:src="@mipmap/icon_chat_face"
+ android:visibility="visible" />
+ android:src="@mipmap/img_fans_default"
+ android:visibility="invisible" />
+ android:src="@mipmap/img_honor_default"
+ android:visibility="visible" />
+ android:layout_height="wrap_content"
+ android:layout_marginTop="13dp" />