调整播放器
This commit is contained in:
parent
7070f5c1b4
commit
ee6a4288b0
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.common.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -475,6 +476,9 @@ public class EnterRoomInfoModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getIsconnection() {
|
public String getIsconnection() {
|
||||||
|
if(StringUtil.isEmpty(isconnection)){
|
||||||
|
isconnection="0";
|
||||||
|
}
|
||||||
return isconnection;
|
return isconnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,4 +119,20 @@ public class EnterRoomNewModel extends BaseModel {
|
|||||||
public void setClarityType(int clarityType) {
|
public void setClarityType(int clarityType) {
|
||||||
this.clarityType = 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
|
@Override
|
||||||
public String toString() {
|
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
|
@Override
|
||||||
public void setLiveEnterRoomNewModel(EnterRoomNewModel data) {
|
public void setLiveEnterRoomNewModel(EnterRoomNewModel data) {
|
||||||
super.setLiveEnterRoomNewModel(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")) {
|
if (playModel != PLAY_MODEL_DEF && !url.contains(videoFps[0] + ".flv")) {
|
||||||
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
||||||
if (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) {
|
} 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")) {
|
} else if (!url.contains(videoFps[0] + ".flv")) {
|
||||||
mPlayer.setViewResizeMode(false);
|
mPlayer.setViewResizeMode(false);
|
||||||
@ -311,7 +311,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
public void switchStream(String url, int playModel) {
|
public void switchStream(String url, int playModel) {
|
||||||
srcUrl = url;
|
srcUrl = url;
|
||||||
PLAY_MODEL = playModel;
|
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")) {
|
if (playModel != PLAY_MODEL_DEF && !url.contains(videoFps[0] + ".flv")) {
|
||||||
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
mPlayer.setViewResizeMode(landscape == VIDEO_VERTICAL);
|
||||||
if (landscape == VIDEO_VERTICAL && !isPk) {
|
if (landscape == VIDEO_VERTICAL && !isPk) {
|
||||||
@ -487,6 +487,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
public void setPkview() {
|
public void setPkview() {
|
||||||
Log.i("收到socket--->", "变成16:9");
|
Log.i("收到socket--->", "变成16:9");
|
||||||
String url = srcUrl;
|
String url = srcUrl;
|
||||||
|
isPk = true;
|
||||||
switchStreamPk(true);
|
switchStreamPk(true);
|
||||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
|
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
|
||||||
params.height = vHeight;
|
params.height = vHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user