From c015459cf1c94a6622b27172136833e93e1003ee Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Sep 2023 14:27:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=92=AD=E6=94=BE=E5=99=A8url=E7=82=BA?= =?UTF-8?q?=E7=A9=BA=E6=99=82=E4=B8=8D=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/utils/LiveExoPlayerManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 e68e8434b..839be869d 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java @@ -21,6 +21,7 @@ import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.StyledPlayerView; import com.google.android.exoplayer2.video.VideoSize; import com.lzf.easyfloat.EasyFloat; +import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.R; @@ -393,7 +394,7 @@ public class LiveExoPlayerManager { * @param url 地址 */ public void startUrl(String url) { - if (url != null && url.equals(this.url)) return; + if (!StringUtil.isEmpty(url) && url.equals(this.url)) return; if (task != null) { task.cancel(); task = null; @@ -421,7 +422,7 @@ public class LiveExoPlayerManager { * @param url 地址 */ public void switchUrl(String url) { - if (url != null && url.equals(this.url)) return; + if (!StringUtil.isEmpty(url) && url.equals(this.url)) return; if (task != null) { task.cancel(); task = null;