修复因为更换渲染层导致在切换分辨率时会黑屏的问题

This commit is contained in:
zlzw 2023-01-07 10:13:34 +08:00
parent 80993c7d2d
commit 2393a53466

View File

@ -35,8 +35,6 @@ public class LiveExoPlayerManager {
this.mContext = mContext;
player1 = new ExoPlayer.Builder(mContext).build();
player2 = new ExoPlayer.Builder(mContext).build();
player1.setVideoScalingMode(VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING);
player2.setVideoScalingMode(VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING);
handler = new Handler(Looper.getMainLooper());
setListener();
setAnalyticsListener();
@ -49,6 +47,7 @@ public class LiveExoPlayerManager {
public void setMainView(StyledPlayerView mainView) {
this.mainView = mainView;
this.mainView.setKeepContentOnPlayerReset(true);
}
private void setAnalyticsListener() {