修改主播端选择分辨率的方法,接口新增参数
This commit is contained in:
parent
2f413e260e
commit
d26a687385
@ -215,6 +215,9 @@ public class CommonHttpUtil {
|
|||||||
if (obj.containsKey("isup")) {
|
if (obj.containsKey("isup")) {
|
||||||
APKManager.get().setAPKIsUp(obj.getInteger("isup"));
|
APKManager.get().setAPKIsUp(obj.getInteger("isup"));
|
||||||
}
|
}
|
||||||
|
if (obj.containsKey("clarity")) {
|
||||||
|
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||||
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
||||||
|
@ -18,7 +18,6 @@ import com.yunbao.common.manager.base.BaseCacheManager;
|
|||||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.VersionUtil;
|
|
||||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@ -40,8 +39,21 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
private final String IS_HINT = "is_hint";
|
private final String IS_HINT = "is_hint";
|
||||||
private final String IS_HINT2 = "is_hint2";
|
private final String IS_HINT2 = "is_hint2";
|
||||||
private final String SELECT_CLARITY = "selectClarity";
|
private final String SELECT_CLARITY = "selectClarity";
|
||||||
|
private final String CLARITY = "clarity";
|
||||||
|
|
||||||
|
|
||||||
|
public void setClarity(String clarity) {
|
||||||
|
put(CLARITY, clarity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1080p开播分辨率:clarity 0关闭 1开启
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean getClarity() {
|
||||||
|
return TextUtils.equals(getString(CLARITY), "1");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置清晰度
|
* 设置清晰度
|
||||||
|
@ -16,7 +16,6 @@ import com.lxj.xpopup.core.BottomPopupView;
|
|||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -40,11 +39,10 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param banSelect 禁止选项,{@link #BAN_720} 禁止高清和超高清。 {@link #BAN_1080} 禁止超高清
|
* @param banSelect 禁止选项,{@link #BAN_720} 禁止高清和超高清。 {@link #BAN_1080} 禁止超高清
|
||||||
* @param isUser 是否为观众,true 观众,false 主播
|
* @param isUser 是否为观众,true 观众,false 主播
|
||||||
*/
|
*/
|
||||||
public LiveClarityCustomPopup(@NonNull Context context, int selectClarity, int banSelect,boolean isUser) {
|
public LiveClarityCustomPopup(@NonNull Context context, int selectClarity, int banSelect, boolean isUser) {
|
||||||
super(context);
|
super(context);
|
||||||
this.banSelect = banSelect;
|
this.banSelect = banSelect;
|
||||||
if (selectClarity == -1) {
|
if (selectClarity == -1) {
|
||||||
@ -111,11 +109,11 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
|||||||
});
|
});
|
||||||
//高清
|
//高清
|
||||||
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
|
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
|
||||||
if(lineHd.getTag()!=null){
|
if (lineHd.getTag() != null) {
|
||||||
if(isUser){//用户端
|
if (isUser) {//用户端
|
||||||
ToastUtil.show(R.string.live_user_ban_hd);
|
ToastUtil.show(R.string.live_user_ban_hd);
|
||||||
}else{//主播端
|
} else {//主播端
|
||||||
ToastUtil.show("");
|
ToastUtil.show(R.string.function_is_suspended);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -146,11 +144,11 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
|||||||
});
|
});
|
||||||
//超高清
|
//超高清
|
||||||
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
|
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
|
||||||
if(lineFhd.getTag()!=null){
|
if (lineFhd.getTag() != null) {
|
||||||
if(isUser){//用户端
|
if (isUser) {//用户端
|
||||||
ToastUtil.show(R.string.live_user_ban_fhd);
|
ToastUtil.show(R.string.live_user_ban_fhd);
|
||||||
}else{//主播端
|
} else {//主播端
|
||||||
ToastUtil.show("");
|
ToastUtil.show(R.string.function_is_suspended);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1000,4 +1000,5 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="updating" >updating</string>
|
<string name="updating" >updating</string>
|
||||||
<string name="live_user_ban_fhd" >There is no choice, the anchor is not turned on FHD live.</string>
|
<string name="live_user_ban_fhd" >There is no choice, the anchor is not turned on FHD live.</string>
|
||||||
<string name="live_user_ban_hd" >There is no choice, the anchor is not turned on HD live.</string>
|
<string name="live_user_ban_hd" >There is no choice, the anchor is not turned on HD live.</string>
|
||||||
|
<string name="function_is_suspended" >Sorry, this feature is on hold.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1020,4 +1020,5 @@
|
|||||||
<string name="updating" >更新中</string>
|
<string name="updating" >更新中</string>
|
||||||
<string name="live_user_ban_fhd" >無法選擇,該主播未開啟超高清直播。</string>
|
<string name="live_user_ban_fhd" >無法選擇,該主播未開啟超高清直播。</string>
|
||||||
<string name="live_user_ban_hd" >無法選擇,該主播未開啟高清直播。</string>
|
<string name="live_user_ban_hd" >無法選擇,該主播未開啟高清直播。</string>
|
||||||
|
<string name="function_is_suspended" >抱歉,該功能暫停使用中。</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -11,7 +11,7 @@ ext {
|
|||||||
//正式
|
//正式
|
||||||
|
|
||||||
// serverHost : "https://napi.yaoulive.com",
|
// serverHost : "https://napi.yaoulive.com",
|
||||||
// 測試
|
//
|
||||||
serverHost : "https://ceshi.yaoulive.com",
|
serverHost : "https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
//腾讯地图
|
//腾讯地图
|
||||||
@ -25,7 +25,7 @@ ext {
|
|||||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||||
|
|
||||||
// true表示谷歌支付 false
|
// true表示谷歌支付 false
|
||||||
isGooglePlay : false,
|
isGooglePlay : true,
|
||||||
//是否上报异常日志
|
//是否上报异常日志
|
||||||
isUploadLog : false
|
isUploadLog : false
|
||||||
]
|
]
|
||||||
|
@ -9,8 +9,6 @@ import android.os.Bundle;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.format.Formatter;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
@ -34,7 +32,6 @@ import com.yunbao.common.http.HttpCallback;
|
|||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.ProcessImageUtil;
|
import com.yunbao.common.utils.ProcessImageUtil;
|
||||||
@ -63,12 +60,8 @@ import org.greenrobot.eventbus.Subscribe;
|
|||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||||
import cn.rongcloud.rtc.api.callback.IRCRTCStatusReportListener;
|
|
||||||
import cn.rongcloud.rtc.api.report.StatusBean;
|
|
||||||
import cn.rongcloud.rtc.api.report.StatusReport;
|
|
||||||
import cn.rongcloud.rtc.api.stream.RCRTCCameraOutputStream;
|
import cn.rongcloud.rtc.api.stream.RCRTCCameraOutputStream;
|
||||||
import cn.rongcloud.rtc.api.stream.RCRTCVideoStreamConfig;
|
import cn.rongcloud.rtc.api.stream.RCRTCVideoStreamConfig;
|
||||||
import cn.rongcloud.rtc.base.RCRTCParamsType;
|
import cn.rongcloud.rtc.base.RCRTCParamsType;
|
||||||
@ -220,7 +213,11 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
ViewClicksAntiShake
|
ViewClicksAntiShake
|
||||||
.clicksAntiShake(
|
.clicksAntiShake(
|
||||||
findViewById(R.id.btn_live_clarity), () -> {
|
findViewById(R.id.btn_live_clarity), () -> {
|
||||||
LiveClarityCustomPopup liveClarityCustomPopup = new LiveClarityCustomPopup(mContext, IMLoginManager.get(mContext).getSelectClarity());
|
|
||||||
|
LiveClarityCustomPopup liveClarityCustomPopup =
|
||||||
|
new LiveClarityCustomPopup(mContext,
|
||||||
|
IMLoginManager.get(mContext).getSelectClarity(),
|
||||||
|
IMLoginManager.get(mContext).getClarity() ? 0 : LiveClarityCustomPopup.BAN_1080, false);
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.setPopupCallback(new XPopupCallback() {
|
.setPopupCallback(new XPopupCallback() {
|
||||||
@Override
|
@Override
|
||||||
@ -330,7 +327,6 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (!canClick()) {
|
if (!canClick()) {
|
||||||
@ -377,7 +373,10 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void selectClarity(int selectClarity) {
|
public void selectClarity(int selectClarity) {
|
||||||
LiveClarityCustomPopup liveClarityCustomPopup = new LiveClarityCustomPopup(mContext, selectClarity);
|
LiveClarityCustomPopup liveClarityCustomPopup =
|
||||||
|
new LiveClarityCustomPopup(mContext,
|
||||||
|
IMLoginManager.get(mContext).getSelectClarity(),
|
||||||
|
IMLoginManager.get(mContext).getClarity() ? 0 : LiveClarityCustomPopup.BAN_1080, false);
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.setPopupCallback(new XPopupCallback() {
|
.setPopupCallback(new XPopupCallback() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user