修复连麦下麦时会画面卡住的问题

This commit is contained in:
zlzw 2023-01-11 11:34:15 +08:00
parent 9f9c02b7e7
commit eaafcdd444
2 changed files with 7 additions and 2 deletions

View File

@ -338,6 +338,11 @@ public class LiveExoPlayerManager {
public void play() {
getNowPlayer().play();
}
public void replay(){
String tmp=url;
url=null;
startUrl(tmp);
}
public void clearFrame() {
mainView.setKeepContentOnPlayerReset(false);

View File

@ -263,8 +263,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
if (!mPlayer.isPlaying()) {
new Handler(Looper.getMainLooper())
.postDelayed(() -> {
mPlayer.stop();
mPlayer.play();
mPlayer.replay();
// ToastUtil.show("强制播放" + val);
}, 100);
}
@ -1041,6 +1040,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);
new Handler(Looper.getMainLooper()).post(() -> {
debugView.setText(debugText);