開播設置,修改開播接口新增分辨率設置參數
@@ -31,7 +31,7 @@ import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.live.dialog.LiveBeautyDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveRoomTypeDialogFragment;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
@@ -213,7 +213,7 @@ public class LiveTRTCAnchorActivity extends TRTCBaseActivity {
|
||||
return;
|
||||
}
|
||||
String title = mEditTitle.getText().toString().trim();
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, null, new HttpCallback() {
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, null,0, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, final String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
package com.yunbao.live.bean;
|
||||
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.live.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/8.
|
||||
* 直播房间类型
|
||||
*/
|
||||
|
||||
public class LiveRoomTypeBean {
|
||||
|
||||
private int mId;
|
||||
private String mName;
|
||||
private int mCheckedIcon;
|
||||
private int mUnCheckedIcon;
|
||||
private boolean mChecked;
|
||||
|
||||
public LiveRoomTypeBean() {
|
||||
}
|
||||
|
||||
public LiveRoomTypeBean(int id, String name) {
|
||||
mId = id;
|
||||
mName = name;
|
||||
}
|
||||
|
||||
public LiveRoomTypeBean(int id, String name, int checkedIcon, int unCheckedIcon) {
|
||||
mId = id;
|
||||
mName = name;
|
||||
mCheckedIcon = checkedIcon;
|
||||
mUnCheckedIcon = unCheckedIcon;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return mId;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
mId = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return mName;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
mName = name;
|
||||
}
|
||||
|
||||
public int getCheckedIcon() {
|
||||
return mCheckedIcon;
|
||||
}
|
||||
|
||||
public void setCheckedIcon(int checkedIcon) {
|
||||
mCheckedIcon = checkedIcon;
|
||||
}
|
||||
|
||||
public int getUnCheckedIcon() {
|
||||
return mUnCheckedIcon;
|
||||
}
|
||||
|
||||
public void setUnCheckedIcon(int unCheckedIcon) {
|
||||
mUnCheckedIcon = unCheckedIcon;
|
||||
}
|
||||
|
||||
public boolean isChecked() {
|
||||
return mChecked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked) {
|
||||
mChecked = checked;
|
||||
}
|
||||
|
||||
public static List<LiveRoomTypeBean> getLiveTypeList(String[][] liveTypes) {
|
||||
List<LiveRoomTypeBean> list = new ArrayList<>();
|
||||
if (liveTypes != null) {
|
||||
for (String[] arr : liveTypes) {
|
||||
LiveRoomTypeBean bean = new LiveRoomTypeBean(Integer.parseInt(arr[0]), arr[1]);
|
||||
switch (bean.getId()) {
|
||||
case Constants.LIVE_TYPE_NORMAL:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_normal_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_normal_2);
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PWD:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_pwd_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_pwd_2);
|
||||
break;
|
||||
case Constants.LIVE_TYPE_PAY:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_pay_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_pay_2);
|
||||
break;
|
||||
case Constants.LIVE_TYPE_TIME:
|
||||
bean.setCheckedIcon(R.mipmap.icon_live_type_time_1);
|
||||
bean.setUnCheckedIcon(R.mipmap.icon_live_type_time_2);
|
||||
break;
|
||||
}
|
||||
list.add(bean);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveReadyClassAdapter;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveRoomTypeAdapter;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/8.
|
||||
|
||||
@@ -47,10 +47,11 @@ public class LiveHttpUtil {
|
||||
|
||||
/**
|
||||
* 获取直播用户日榜/周榜
|
||||
* @param liveUid 主播uid
|
||||
*
|
||||
* @param liveUid 主播uid
|
||||
* @param callback 回调
|
||||
*/
|
||||
public static void getUserRankList(String liveUid,HttpCallback callback){
|
||||
public static void getUserRankList(String liveUid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Contribute.index", LiveHttpConsts.GET_USER_LIST)
|
||||
.params("uid", liveUid)
|
||||
.execute(callback);
|
||||
@@ -685,7 +686,7 @@ public class LiveHttpUtil {
|
||||
* @param file 封面图片文件
|
||||
* @param callback
|
||||
*/
|
||||
public static void newcreateRoom(String title, int liveClassId, int type, int typeVal, File file, HttpCallback callback) {
|
||||
public static void newcreateRoom(String title, int liveClassId, int type, int typeVal, File file, int clarityType, HttpCallback callback) {
|
||||
|
||||
PostRequest<JsonBean> request = HttpClient.getInstance().post("Live.createRoom2", LiveHttpConsts.CREATE_ROOM)
|
||||
.params("title", title)
|
||||
@@ -693,7 +694,8 @@ public class LiveHttpUtil {
|
||||
.params("type", type)
|
||||
.params("landscape", "2")
|
||||
.params("class_type", "0")
|
||||
.params("type_val", typeVal);
|
||||
.params("type_val", typeVal)
|
||||
.params("clarityType ", clarityType);
|
||||
if (file != null) {
|
||||
request.params("file", file);
|
||||
}
|
||||
@@ -902,16 +904,17 @@ public class LiveHttpUtil {
|
||||
/**
|
||||
* 获取用户贵族喇叭的数量
|
||||
*/
|
||||
public static void nobleUseTrumpet(String trumpet_msg,String anchor_id,HttpCallback callback) {
|
||||
public static void nobleUseTrumpet(String trumpet_msg, String anchor_id, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Noble.nobleUseTrumpet", "nobleUseTrumpet")
|
||||
.params("", trumpet_msg)
|
||||
.params("", anchor_id)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户贵族喇叭的数量
|
||||
*/
|
||||
public static void getStarChallengeStatus(String liveUid,HttpCallback callback) {
|
||||
public static void getStarChallengeStatus(String liveUid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("StarChallenge.getStarChallengeStatus", "StarChallengeStatus")
|
||||
.params("liveUid", liveUid)
|
||||
.execute(callback);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import static com.yunbao.live.event.LiveAudienceEvent.LiveAudienceType.WISH_LIST_UPDATE;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -23,6 +25,7 @@ import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.LiveClassBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@@ -37,21 +40,25 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.common.views.LiveClarityCustomPopup;
|
||||
import com.yunbao.common.views.LiveOpenCustomPopup;
|
||||
import com.yunbao.common.views.LiveRobotSettingCustomPopup;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.faceunity.FaceManager;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.live.dialog.LiveFaceUnityDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewRoomClassDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewRoomTypeDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveNewWishListDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTimeDialogFragment;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
@@ -78,6 +85,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
private TextView faceTextView;//提示人脸未检测到的TextView
|
||||
private ImageView imgClarity;
|
||||
private int selectClarity = 1;
|
||||
private LiveOpenCustomPopup liveOpenCustomPopup;
|
||||
|
||||
public LiveNewReadyRyViewHolder(Context context, ViewGroup parentView, int liveSdk) {
|
||||
super(context, parentView, liveSdk);
|
||||
@@ -269,6 +277,9 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
liveClarity.setText(R.string.ultra_hd);
|
||||
break;
|
||||
}
|
||||
if (liveOpenCustomPopup != null) {
|
||||
liveOpenCustomPopup.setSelectClarity(selectClarity);
|
||||
}
|
||||
}
|
||||
|
||||
public void setManager(FaceManager manager) {
|
||||
@@ -299,8 +310,156 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
} else if (i == R.id.btn_room_type) {
|
||||
chooseLiveType();
|
||||
} else if (i == R.id.btn_start_live) {
|
||||
startLive();
|
||||
// startLive();
|
||||
liveOpenCustomPopup = new LiveOpenCustomPopup(mContext, selectClarity, classBean, liveRoomTypeBean)
|
||||
.setCallBack(new LiveOpenCustomPopup.LiveOpenCallBack() {
|
||||
@Override
|
||||
public void startLive(LiveRoomTypeBean liveRoomTypeModel, LiveClassBean classModel) {
|
||||
if (classModel != null) {
|
||||
classBean = classModel;
|
||||
mLiveClassID = classBean.getId();
|
||||
}
|
||||
liveRoomTypeBean = liveRoomTypeModel;
|
||||
mLiveType = liveRoomTypeModel.getId();
|
||||
startLiveInit();
|
||||
liveOpenCustomPopup = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectClarity(int selectClarity) {
|
||||
LiveClarityCustomPopup liveClarityCustomPopup = new LiveClarityCustomPopup(mContext, selectClarity);
|
||||
new XPopup.Builder(mContext)
|
||||
.setPopupCallback(new XPopupCallback() {
|
||||
@Override
|
||||
public void onCreated(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(BasePopupView popupView) {
|
||||
setSelectClarity(liveClarityCustomPopup.getSelectClarity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDismiss(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed(BasePopupView popupView) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyBoardStateChanged(BasePopupView popupView, int height) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrag(BasePopupView popupView, int value, float percent, boolean upOrLeft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickOutside(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
})
|
||||
.asCustom(liveClarityCustomPopup)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openRobot() {
|
||||
LiveRobotSettingCustomPopup liveRobotSettingCustomPopup = new LiveRobotSettingCustomPopup(mContext);
|
||||
new XPopup.Builder(mContext)
|
||||
.setPopupCallback(new XPopupCallback() {
|
||||
@Override
|
||||
public void onCreated(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(BasePopupView popupView) {
|
||||
if (liveOpenCustomPopup != null) {
|
||||
liveOpenCustomPopup.initDate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDismiss(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed(BasePopupView popupView) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyBoardStateChanged(BasePopupView popupView, int height) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrag(BasePopupView popupView, int value, float percent, boolean upOrLeft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickOutside(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
})
|
||||
.asCustom(liveRobotSettingCustomPopup)
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openLiveRoomType(LiveRoomTypeBean liveRoomTypeModel) {
|
||||
liveRoomTypeBean = liveRoomTypeModel;
|
||||
mLiveType = liveRoomTypeModel.getId();
|
||||
chooseLiveType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openLiveClass(LiveClassBean classModel) {
|
||||
if (classModel != null) {
|
||||
classBean = classModel;
|
||||
mLiveClassID = classBean.getId();
|
||||
}
|
||||
chooseLiveClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openWishlist() {
|
||||
//点击心愿单
|
||||
openWishListWindow();
|
||||
}
|
||||
});
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(liveOpenCustomPopup)
|
||||
.show();
|
||||
} else if (i == R.id.btn_locaiton) {
|
||||
switchLocation();
|
||||
} else if (i == R.id.btn_horizontally) {
|
||||
@@ -337,6 +496,16 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
|
||||
if (mContext instanceof LiveRyAnchorActivity) {
|
||||
fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "RY");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void updateStart(LiveAudienceEvent event) {
|
||||
if (event.getType() == WISH_LIST_UPDATE) {
|
||||
if (liveOpenCustomPopup != null) {
|
||||
liveOpenCustomPopup.initDate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,6 +593,9 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
classBean = bean;
|
||||
mLiveClassID = classBean.getId();
|
||||
mLiveClass.setText(bean.getName());
|
||||
if (liveOpenCustomPopup != null) {
|
||||
liveOpenCustomPopup.setClassBean(classBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveRoomTypeDialogFragment");
|
||||
@@ -443,6 +615,8 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
/**
|
||||
* 选择直播类型
|
||||
*/
|
||||
private LiveRoomTypeBean liveRoomTypeBean = new LiveRoomTypeBean(0, WordUtil.getString(R.string.live_room_public));
|
||||
|
||||
private void chooseLiveType() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(Constants.CHECKED_ID, mLiveType);
|
||||
@@ -451,6 +625,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
fragment.setCallback(new CommonCallback<LiveRoomTypeBean>() {
|
||||
@Override
|
||||
public void callback(LiveRoomTypeBean bean) {
|
||||
liveRoomTypeBean = bean;
|
||||
switch (bean.getId()) {
|
||||
case Constants.LIVE_TYPE_NORMAL:
|
||||
onLiveTypeNormal(bean);
|
||||
@@ -465,6 +640,9 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
onLiveTypeTime(bean);
|
||||
break;
|
||||
}
|
||||
if (liveOpenCustomPopup != null) {
|
||||
liveOpenCustomPopup.setLiveRoomTypeBean(liveRoomTypeBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveRoomTypeDialogFragment");
|
||||
@@ -560,7 +738,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
/**
|
||||
* 点击开始直播按钮
|
||||
*/
|
||||
private void startLive() {
|
||||
private void startLiveInit() {
|
||||
boolean startPreview = ((LiveRyAnchorActivity) mContext).isStartPreview();
|
||||
// if (!startPreview) {
|
||||
// ToastUtil.show(R.string.please_wait);
|
||||
@@ -586,7 +764,7 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
||||
return;
|
||||
}
|
||||
String title = mEditTitle.getText().toString().trim();
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, new HttpCallback() {
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, selectClarity + 1, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, final String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
|
||||
@@ -565,7 +565,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
//设置分辨率
|
||||
.setVideoResolution(RCRTCParamsType.RCRTCVideoResolution.RESOLUTION_480_640)
|
||||
//设置帧率
|
||||
.setVideoFps(RCRTCParamsType.RCRTCVideoFps.Fps_30)
|
||||
.setVideoFps(RCRTCParamsType.RCRTCVideoFps.Fps_24)
|
||||
//设置最小码率,480P下推荐200
|
||||
.setMinRate(250)
|
||||
//设置最大码率,480P下推荐900
|
||||
@@ -732,7 +732,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
|
||||
int height = 1280;
|
||||
normal.setWidth(width); //视频宽
|
||||
normal.setHeight(height); //视频高
|
||||
normal.setFps(fps); //视频帧率
|
||||
normal.setFps(25); //视频帧率
|
||||
|
||||
//2. 合流画布设置
|
||||
//(请参照画布和声音配置示例代码)
|
||||
|
||||
@@ -36,7 +36,7 @@ import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveChooseClassActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.adapter.LiveReadyShareAdapter;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.live.dialog.LiveRoomTypeDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTimeDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveWishListDialogFragment;
|
||||
@@ -471,7 +471,7 @@ public class LiveReadyRyViewHolder extends AbsViewHolder implements View.OnClick
|
||||
return;
|
||||
}
|
||||
String title = mEditTitle.getText().toString().trim();
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, new HttpCallback() {
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile,0, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, final String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
|
||||
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -17,12 +18,17 @@ import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSendCallback;
|
||||
import com.tencent.trtc.TRTCCloudDef;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@@ -42,7 +48,6 @@ import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveChooseClassActivity;
|
||||
import com.yunbao.live.adapter.LiveReadyShareAdapter;
|
||||
import com.yunbao.live.bean.LiveRoomTypeBean;
|
||||
import com.yunbao.live.dialog.LiveRoomTypeDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveTimeDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveWishListDialogFragment;
|
||||
@@ -51,10 +56,6 @@ import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_DISABLE;
|
||||
import static com.tencent.trtc.TRTCCloudDef.TRTC_VIDEO_MIRROR_TYPE_ENABLE;
|
||||
import static com.yunbao.live.views.LivePushTxViewHolder.mTRTCCloud;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/7.
|
||||
* 开播前准备
|
||||
@@ -491,7 +492,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
||||
return;
|
||||
}
|
||||
String title = mEditTitle.getText().toString().trim();
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, new HttpCallback() {
|
||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, 0, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, final String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
@@ -535,7 +536,7 @@ public class LiveReadyViewHolder extends AbsViewHolder implements View.OnClickLi
|
||||
@Override
|
||||
public void onError(Response<JsonBean> response) {
|
||||
super.onError(response);
|
||||
System.out.println("tx 开播失败 = "+response);
|
||||
System.out.println("tx 开播失败 = " + response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 883 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 955 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |