修改主播端选择分辨率的方法,接口新增参数
This commit is contained in:
@@ -215,6 +215,9 @@ public class CommonHttpUtil {
|
||||
if (obj.containsKey("isup")) {
|
||||
APKManager.get().setAPKIsUp(obj.getInteger("isup"));
|
||||
}
|
||||
if (obj.containsKey("clarity")) {
|
||||
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||
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.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.views.floatingview.APPEasyFloat;
|
||||
|
||||
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_HINT2 = "is_hint2";
|
||||
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.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
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 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);
|
||||
this.banSelect = banSelect;
|
||||
if (selectClarity == -1) {
|
||||
@@ -111,11 +109,11 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
||||
});
|
||||
//高清
|
||||
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
|
||||
if(lineHd.getTag()!=null){
|
||||
if(isUser){//用户端
|
||||
if (lineHd.getTag() != null) {
|
||||
if (isUser) {//用户端
|
||||
ToastUtil.show(R.string.live_user_ban_hd);
|
||||
}else{//主播端
|
||||
ToastUtil.show("");
|
||||
} else {//主播端
|
||||
ToastUtil.show(R.string.function_is_suspended);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -146,11 +144,11 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
||||
});
|
||||
//超高清
|
||||
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
|
||||
if(lineFhd.getTag()!=null){
|
||||
if(isUser){//用户端
|
||||
if (lineFhd.getTag() != null) {
|
||||
if (isUser) {//用户端
|
||||
ToastUtil.show(R.string.live_user_ban_fhd);
|
||||
}else{//主播端
|
||||
ToastUtil.show("");
|
||||
} else {//主播端
|
||||
ToastUtil.show(R.string.function_is_suspended);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1000,4 +1000,5 @@ Limited ride And limited avatar frame</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_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>
|
||||
|
||||
@@ -1020,4 +1020,5 @@
|
||||
<string name="updating" >更新中</string>
|
||||
<string name="live_user_ban_fhd" >無法選擇,該主播未開啟超高清直播。</string>
|
||||
<string name="live_user_ban_hd" >無法選擇,該主播未開啟高清直播。</string>
|
||||
<string name="function_is_suspended" >抱歉,該功能暫停使用中。</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user