调整播放器拉升问题4
This commit is contained in:
parent
207811c41d
commit
93e2a8af02
@ -111,6 +111,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
static int vHeight;//视频高
|
static int vHeight;//视频高
|
||||||
private TextView debugView;
|
private TextView debugView;
|
||||||
private LiveExoPlayerManager mPlayer;
|
private LiveExoPlayerManager mPlayer;
|
||||||
|
private boolean isPk = false;
|
||||||
|
|
||||||
//0未申请1申请中2连麦中
|
//0未申请1申请中2连麦中
|
||||||
RCRTCRoom rcrtcRoom;
|
RCRTCRoom rcrtcRoom;
|
||||||
@ -335,13 +336,23 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
purl = url;
|
purl = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean tmpPk = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void switchStreamPk(boolean isPk) {
|
public void switchStreamPk(boolean isPk) {
|
||||||
super.switchStreamPk(isPk);
|
super.switchStreamPk(isPk);
|
||||||
if (isPk && !srcUrl.contains(videoFps[0] + ".flv")) {
|
if (isPk && !srcUrl.contains(videoFps[0] + ".flv") && !tmpPk) {
|
||||||
|
tmpPk = true;
|
||||||
mPlayer.setViewResizeMode(false);
|
mPlayer.setViewResizeMode(false);
|
||||||
String url = srcUrl.replace(".flv", videoRatioHorizontal[PLAY_MODEL] + videoFps[0] + ".flv");
|
String url;
|
||||||
switchStream(url,PLAY_MODEL);
|
if (PLAY_MODEL != -1) {
|
||||||
|
url = srcUrl.replace(".flv", videoRatioHorizontal[PLAY_MODEL] + videoFps[0] + ".flv");
|
||||||
|
} else {
|
||||||
|
url = srcUrl.replace(".flv", videoRatioHorizontal[1] + videoFps[0] + ".flv");
|
||||||
|
}
|
||||||
|
mPlayer.switchUrl(url);
|
||||||
|
} else if (!isPk) {
|
||||||
|
tmpPk = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,6 +475,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
if (PLAY_MODEL != -1) {
|
if (PLAY_MODEL != -1) {
|
||||||
url = url.replace(".flv", videoRatioHorizontal[PLAY_MODEL] + videoFps[0] + ".flv");
|
url = url.replace(".flv", videoRatioHorizontal[PLAY_MODEL] + videoFps[0] + ".flv");
|
||||||
}
|
}
|
||||||
|
isPk = true;
|
||||||
mPlayer.setViewResizeMode(false);
|
mPlayer.setViewResizeMode(false);
|
||||||
mPlayer.switchUrl(url);
|
mPlayer.switchUrl(url);
|
||||||
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
|
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mVideoView.getLayoutParams();
|
||||||
@ -477,7 +489,8 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
|||||||
public synchronized void setPkEndview() {
|
public synchronized void setPkEndview() {
|
||||||
|
|
||||||
Log.i("收收收", landscape + "");
|
Log.i("收收收", landscape + "");
|
||||||
|
isPk = false;
|
||||||
|
tmpPk = false;
|
||||||
if (landscape == 2) {
|
if (landscape == 2) {
|
||||||
Log.i("收到socket--->", "还原9:16");
|
Log.i("收到socket--->", "还原9:16");
|
||||||
String url = srcUrl;
|
String url = srcUrl;
|
||||||
|
Loading…
Reference in New Issue
Block a user