diff --git a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java index dc2cd8c05..1bd62a09b 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java @@ -157,6 +157,9 @@ public class LiveExoPlayerManager { mainView.setPlayer(player1); status = MODEL_PLAY1; isSwitchUrl = false; + if(getNextPlayer().isPlaying()){ + getNextPlayer().stop(); + } if (listener != null) { listener.onIsPlayingChanged(true); } @@ -224,6 +227,9 @@ public class LiveExoPlayerManager { //ToastUtil.show(String.format(Locale.CHINA, "从加载到播放 = %.3f,最大耗时 = %.3f", tmp, log_buffer_max_time)); log_buffer_time = -1; status = MODEL_PLAY2; + if(getNextPlayer().isPlaying()){ + getNextPlayer().stop(); + } isSwitchUrl = false; if (listener != null) { listener.onIsPlayingChanged(true);