调整播放器
This commit is contained in:
parent
7070f5c1b4
commit
ee6a4288b0
@ -1,6 +1,7 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -475,6 +476,9 @@ public class EnterRoomInfoModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getIsconnection() {
|
||||
if(StringUtil.isEmpty(isconnection)){
|
||||
isconnection="0";
|
||||
}
|
||||
return isconnection;
|
||||
}
|
||||
|
||||
|
@ -119,4 +119,20 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
public void setClarityType(int clarityType) {
|
||||
this.clarityType = clarityType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "EnterRoomNewModel{" +
|
||||
"liveInfo=" + liveInfo +
|
||||
", enterRoomInfo=" + enterRoomInfo +
|
||||
", rankHour=" + rankHour +
|
||||
", newPeopleTask=" + newPeopleTask +
|
||||
", wishList=" + wishList +
|
||||
", guardUserAvatar=" + guardUserAvatar +
|
||||
", activeList=" + activeList +
|
||||
", isUseHotCard='" + isUseHotCard + '\'' +
|
||||
", liveRoomActivityModels=" + liveRoomActivityModels +
|
||||
", clarityType=" + clarityType +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -493,6 +493,44 @@ public class LiveBean implements Parcelable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "uid: " + uid + " , userNiceName: " + userNiceName + " ,playUrl: " + pull;
|
||||
return "LiveBean{" +
|
||||
"uid='" + uid + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", avatarThumb='" + avatarThumb + '\'' +
|
||||
", userNiceName='" + userNiceName + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", stream='" + stream + '\'' +
|
||||
", pull='" + pull + '\'' +
|
||||
", thumb='" + thumb + '\'' +
|
||||
", nums='" + nums + '\'' +
|
||||
", sex=" + sex +
|
||||
", distance='" + distance + '\'' +
|
||||
", levelAnchor=" + levelAnchor +
|
||||
", type=" + type +
|
||||
", typeVal='" + typeVal + '\'' +
|
||||
", goodNum='" + goodNum + '\'' +
|
||||
", gameAction=" + gameAction +
|
||||
", game='" + game + '\'' +
|
||||
", islive='" + islive + '\'' +
|
||||
", isTop='" + isTop + '\'' +
|
||||
", pk_avatar_thumb='" + pk_avatar_thumb + '\'' +
|
||||
", landscape=" + landscape +
|
||||
", hot_num='" + hot_num + '\'' +
|
||||
", content_pic_size_one='" + content_pic_size_one + '\'' +
|
||||
", content_pic_size_two='" + content_pic_size_two + '\'' +
|
||||
", content_pic_size_three='" + content_pic_size_three + '\'' +
|
||||
", is_week='" + is_week + '\'' +
|
||||
", img='" + img + '\'' +
|
||||
", url='" + url + '\'' +
|
||||
", drpk_status='" + drpk_status + '\'' +
|
||||
", is_rong=" + is_rong +
|
||||
", isattention='" + isattention + '\'' +
|
||||
", recommendCardtype='" + recommendCardtype + '\'' +
|
||||
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
|
||||
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
|
||||
", params=" + params +
|
||||
", mWeekList=" + mWeekList +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
@Override
|
||||
public void setLiveEnterRoomNewModel(EnterRoomNewModel data) {
|
||||
super.setLiveEnterRoomNewModel(data);
|
||||
mPlayer.clearFrame();
|
||||
isPk=data.getEnterRoomInfo().getIsconnection().equals("1");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -283,9 +283,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
if (playModel != PLAY_MODEL_DEF && !url.contains(videoFps[0] + ".flv")) {
|
||||
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
||||
if (landscape == VIDEO_VERTICAL) {
|
||||
url = url.replace(".flv", videoRatioVertical[playModel] + videoFps[0] + ".flv");
|
||||
waitNextUrl = url.replace(".flv", videoRatioVertical[playModel] + videoFps[0] + ".flv");
|
||||
} else if (landscape == VIDEO_HORIZONTAL) {
|
||||
url = url.replace(".flv", videoRatioHorizontal[playModel] + videoFps[0] + ".flv");
|
||||
waitNextUrl = url.replace(".flv", videoRatioHorizontal[playModel] + videoFps[0] + ".flv");
|
||||
}
|
||||
} else if (!url.contains(videoFps[0] + ".flv")) {
|
||||
mPlayer.setViewResizeMode(false);
|
||||
@ -311,7 +311,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
public void switchStream(String url, int playModel) {
|
||||
srcUrl = url;
|
||||
PLAY_MODEL = playModel;
|
||||
Log.i(TAG, "switchStream: " + " url:" + url + " playModel: " + playModel + " landscape: " + landscape + " videoLandscape = " + videoLandscape);
|
||||
Log.i(TAG, "switchStream: " + " url:" + url + " playModel: " + playModel + " landscape: " + landscape + " videoLandscape = " + videoLandscape + " ispk = " + isPk+" bean = "+roomModel.getEnterRoomInfo().getIsconnection());
|
||||
if (playModel != PLAY_MODEL_DEF && !url.contains(videoFps[0] + ".flv")) {
|
||||
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
||||
if (landscape == VIDEO_VERTICAL && !isPk) {
|
||||
@ -487,6 +487,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
public void setPkview() {
|
||||
Log.i("收到socket--->", "变成16:9");
|
||||
String url = srcUrl;
|
||||
isPk = true;
|
||||
switchStreamPk(true);
|
||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
|
||||
params.height = vHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user