修复连麦用户端默认用小流导致画面模糊的问题
This commit is contained in:
parent
eaafcdd444
commit
7226d54277
@ -186,9 +186,7 @@ public class LiveExoPlayerManager {
|
||||
public void onPlayerError(@NonNull PlaybackException error) {
|
||||
Player.Listener.super.onPlayerError(error);
|
||||
error.printStackTrace();
|
||||
String url=LiveExoPlayerManager.this.url;
|
||||
LiveExoPlayerManager.this.url=null;
|
||||
startUrl(url);
|
||||
replay();
|
||||
}
|
||||
});
|
||||
|
||||
@ -251,13 +249,12 @@ public class LiveExoPlayerManager {
|
||||
Player.Listener.super.onIsLoadingChanged(isLoading);
|
||||
Log.i(TAG, "onIsLoadingChanged: 2 " + isLoading);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerError(@NonNull PlaybackException error) {
|
||||
Player.Listener.super.onPlayerError(error);
|
||||
error.printStackTrace();
|
||||
String url=LiveExoPlayerManager.this.url;
|
||||
LiveExoPlayerManager.this.url=null;
|
||||
startUrl(url);
|
||||
replay();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -338,6 +335,7 @@ public class LiveExoPlayerManager {
|
||||
public void play() {
|
||||
getNowPlayer().play();
|
||||
}
|
||||
|
||||
public void replay() {
|
||||
String tmp = url;
|
||||
url = null;
|
||||
|
@ -80,7 +80,9 @@ import cn.rongcloud.rtc.base.RCRTCMediaType;
|
||||
import cn.rongcloud.rtc.base.RCRTCParamsType;
|
||||
import cn.rongcloud.rtc.base.RCRTCRemoteVideoFrame;
|
||||
import cn.rongcloud.rtc.base.RCRTCRoomType;
|
||||
import cn.rongcloud.rtc.base.RCRTCStreamType;
|
||||
import cn.rongcloud.rtc.base.RTCErrorCode;
|
||||
import cn.rongcloud.rtc.center.stream.RCRTCAudioInputStreamImpl;
|
||||
|
||||
public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
|
||||
@ -1031,6 +1033,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
if (userinputStreamList1.size() == 0) {
|
||||
//如果远端用户发布的是视频流,创建显示视图RCRTCVideoView,并添加到布局中显示
|
||||
RCRTCVideoView remoteView = new RCRTCVideoView(contexts);
|
||||
((RCRTCVideoInputStream) stream).setStreamType(RCRTCStreamType.NORMAL);
|
||||
((RCRTCVideoInputStream) stream).setVideoView(remoteView);
|
||||
((RCRTCVideoInputStream) stream).setVideoFrameListener(new IRCRTCVideoInputFrameListener() {
|
||||
@Override
|
||||
@ -1040,7 +1043,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
|
||||
"timestampNs:" + videoFrame.getTimestampNs() + "\n" +
|
||||
"分辨率:" + videoFrame.getBuffer().getHeight() + "x" + videoFrame.getBuffer().getWidth() + "\n" +
|
||||
"当前时间:" + new SimpleDateFormat("HH:mm:ss", Locale.CHINA).format(new Date()) + "\n";
|
||||
System.out.println("debugText = " + debugText);
|
||||
Log.d("ry", "onFrame: " + debugText);
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
debugView.setText(debugText);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user