调整画质选择UI逻辑
This commit is contained in:
@@ -708,25 +708,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
@Override
|
||||
public void onDismiss(BasePopupView popupView) {
|
||||
int selectClarity = liveClarityCustomPopup.getSelectClarity();
|
||||
if (selectClarity == PLAY_MODEL) return;
|
||||
if (selectClarity == 2) {
|
||||
new DialogUitl.Builder(mContext)
|
||||
.setTitle("超高清提示")
|
||||
.setContent("在網速不穩定的情況下,選擇超高清將會有可能導致直播間畫面卡頓,是否確認選擇?")
|
||||
.setConfrimString("堅持選擇")
|
||||
.setCancelString("返回")
|
||||
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
switchStream(srcUrl, selectClarity);
|
||||
dialog.dismiss();
|
||||
showToast();
|
||||
}
|
||||
}).build().show();
|
||||
} else {
|
||||
switchStream(srcUrl, selectClarity);
|
||||
showToast();
|
||||
}
|
||||
if (selectClarity == PLAY_MODEL || PLAY_MODEL == PLAY_MODEL_DEF) return;
|
||||
switchStream(srcUrl, selectClarity);
|
||||
showToast();
|
||||
}
|
||||
|
||||
private void showToast() {
|
||||
|
||||
@@ -71,7 +71,6 @@ public abstract class LiveRoomPlayViewHolder extends AbsViewHolder implements IL
|
||||
}
|
||||
|
||||
public void setLiveEnterRoomNewModel(EnterRoomNewModel data) {
|
||||
data.setClarityType(2);
|
||||
this.roomModel = data;
|
||||
}
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
landscape = data.getLiveInfo().getLandscape();
|
||||
mLivePlayViewHolder.setLiveBeanLandscape(landscape);
|
||||
mLivePlayViewHolder.setLiveEnterRoomNewModel(data);
|
||||
mLivePlayViewHolder.switchStream(mLiveBean.getPull(), data.getClarityType() - 1);
|
||||
mLivePlayViewHolder.switchStream(mLiveBean.getPull(), (data.getClarityType() - 1)==2?1:(data.getClarityType() - 1));
|
||||
//是否热度卡加成
|
||||
liveHandler.postDelayed(() -> mLiveRoomViewHolder.getIsHot(data.getIsUseHotCard()), 700);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user